Progression System
BIN
Travesty/Fish/AmaticSC-Bold.ttf
Normal file
BIN
Travesty/Fish/Fish-prototype.png
Normal file
After Width: | Height: | Size: 200 KiB |
35
Travesty/Fish/Fish-prototype.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Fish-prototype.png-af0893e0131a816cd007e582a80df245.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Fish/Fish-prototype.png"
|
||||
dest_files=[ "res://.import/Fish-prototype.png-af0893e0131a816cd007e582a80df245.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
@ -3,40 +3,59 @@ export var swim_length = 150
|
||||
export var swim_cooldown = 1
|
||||
|
||||
var destination # The position the fish will move to _on_SwimTimer_timeout()
|
||||
|
||||
var pellets_consumed = 0 # Tracks the number of clean pellets eaten
|
||||
var invincible = false # Used during cutscenes such as returning home, etc
|
||||
var poisoned = false # Used in Hazards/Poison/Poison.gd to determine if fish is dying of poison
|
||||
var poison_mutation = false # True when fish can eat and shoot poison pellets
|
||||
var poison_mutation = true # True when fish can eat and shoot poison pellets
|
||||
var pellets = 0 # Tracks the number of poison pellets eaten but not shot yet
|
||||
onready var mouth = $Positions/Mouth.position # Used for eating and shooting poison pellets
|
||||
onready var mouth_inhale = $Positions/MouthInhale.position # Used for eating poison pellets
|
||||
onready var tail = $Positions/Tail.position # Used for shooting poison pellets
|
||||
onready var house = get_node("/root/Tank/House")
|
||||
onready var house_eyes = get_node("/root/Tank/House/HouseEyes")
|
||||
onready var house_left = get_node("/root/Tank/House/HouseLeft")
|
||||
onready var house_right = get_node("/root/Tank/House/HouseRight")
|
||||
onready var house_left_entrance = get_node("/root/Tank/House/LeftEntrance")
|
||||
onready var house_right_entrance = get_node("/root/Tank/House/RightEntrance")
|
||||
|
||||
|
||||
func _ready():
|
||||
$SwimTimer.wait_time = swim_cooldown
|
||||
$HungerTimer.start()
|
||||
|
||||
|
||||
func _on_SwimTimer_timeout() -> void:
|
||||
# Swim toward mouse
|
||||
destination = Vector2(move_toward(position.x, get_global_mouse_position().x, swim_length), move_toward(position.y, get_global_mouse_position().y, swim_length))
|
||||
$Tween.interpolate_property(self, "position", position, destination, 1, Tween.TRANS_CUBIC, Tween.EASE_IN_OUT)
|
||||
$Tween.start()
|
||||
if not invincible:
|
||||
var new_y = clamp(move_toward(position.y, get_global_mouse_position().y, swim_length), 110, 1040)
|
||||
#destination = Vector2(move_toward(position.x, get_global_mouse_position().x, swim_length), move_toward(position.y, get_global_mouse_position().y, swim_length))
|
||||
destination = Vector2(move_toward(position.x, get_global_mouse_position().x, swim_length), new_y)
|
||||
$TweenSwim.interpolate_property(self, "position", position, destination, 1, Tween.TRANS_CUBIC, Tween.EASE_IN_OUT)
|
||||
$TweenSwim.start()
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if destination:
|
||||
# Smoothly rotate Fish to face mouse
|
||||
var v = get_global_mouse_position() - global_position
|
||||
var v
|
||||
if invincible: # Smoothly rotate fish to face destination
|
||||
v = destination - global_position
|
||||
else: # Smoothly rotate fish to face mouse
|
||||
v = get_global_mouse_position() - global_position
|
||||
var angle = v.angle() + deg2rad(270)
|
||||
# if global_position.x < get_global_mouse_position().x:
|
||||
# $AnimatedSprite.flip_v = false
|
||||
# else:
|
||||
# $AnimatedSprite.flip_v = true
|
||||
if rad2deg(angle) < 180 or rad2deg(angle) > 360:
|
||||
$Sprite.flip_v = true
|
||||
$AnimatedSprite.flip_v = true
|
||||
else:
|
||||
$Sprite.flip_v = false
|
||||
$AnimatedSprite.flip_v = false
|
||||
var rotation_speed = PI * 0.75 # PI = 180 degrees
|
||||
var angle_delta = rotation_speed * delta
|
||||
angle = lerp_angle(global_rotation, angle + 1.57, 1.0)
|
||||
angle = clamp(angle, global_rotation - angle_delta, global_rotation + angle_delta)
|
||||
global_rotation = angle
|
||||
$ThoughtBubble.global_rotation = 0
|
||||
|
||||
|
||||
func fire_pellet() -> void:
|
||||
@ -45,12 +64,49 @@ func fire_pellet() -> void:
|
||||
if pellets > 0: # But usually we require fish to eat pellets before he shoots them
|
||||
var poison_scene = load("res://Hazards/Poison/Poison.tscn")
|
||||
var poison = poison_scene.instance()
|
||||
poison.friendly = true # This will prevent the fish from auto-eating it the second it spawns
|
||||
poison.projectile = true # This will prevent the fish from auto-eating it the second it spawns
|
||||
get_parent().add_child(poison) # We add this projectile to the /tank/ so they don't move with the fish
|
||||
poison.position = $Positions/Tail.get_global_position() # 'position' returns the local position, but we need where it's at in relation to the tank
|
||||
poison.apply_central_impulse(velocity * ($Positions/Tail.get_global_position() - $Positions/Mouth.get_global_position()))
|
||||
pellets -= 1
|
||||
|
||||
|
||||
func kill(cause: String) -> void:
|
||||
queue_free()
|
||||
func go_inside() -> void:
|
||||
invincible = true
|
||||
destination = house_left_entrance.get_global_position()
|
||||
$TweenSwim.stop_all()
|
||||
$TweenHome.interpolate_property(self, "position", position, destination, 1.5, Tween.TRANS_SINE, Tween.EASE_OUT, 1.5)
|
||||
$TweenHome.start()
|
||||
yield($TweenHome, "tween_completed")
|
||||
house_right.z_index = 1
|
||||
destination = house_right_entrance.get_global_position()
|
||||
$TweenInside.interpolate_property(self, "position", position, destination, 1.5, Tween.TRANS_SINE, Tween.EASE_OUT)
|
||||
$TweenInside.start()
|
||||
yield($TweenInside, "tween_completed")
|
||||
visible = false
|
||||
house_eyes.visible = true
|
||||
$TweenSleep.interpolate_property(get_parent(), "modulate", get_parent().modulate, Color(0,0,0,1), 2, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
$TweenSleep.start()
|
||||
yield($TweenSleep, "tween_completed")
|
||||
|
||||
|
||||
func reset_hunger() -> void:
|
||||
if get_parent().phase == get_parent().Phase.CLEAN:
|
||||
$HungerTimer.start()
|
||||
pellets_consumed += 1
|
||||
if pellets_consumed > 5:
|
||||
get_parent().blackout()
|
||||
|
||||
|
||||
func belly_up(_cause: String) -> void:
|
||||
print("You died on account of " + _cause + ". :(")
|
||||
# flip fish upside-down
|
||||
# modulate tank red
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
|
||||
func _on_HungerTimer_timeout() -> void:
|
||||
if get_parent().phase == get_parent().Phase.CLEAN:
|
||||
belly_up("starvation")
|
||||
else:
|
||||
$HungerTimer.stop()
|
||||
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 16 KiB |
@ -1,7 +1,17 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://Fish/Fish.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Fish/Fish.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Fish/Fish2.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Fish/Thasadith-BoldItalic.ttf" type="DynamicFontData" id=4]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 1 ), ExtResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 2.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 17.0
|
||||
@ -9,7 +19,12 @@ height = 88.0
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
radius = 21.0
|
||||
height = 100.0
|
||||
height = 80.0
|
||||
|
||||
[sub_resource type="DynamicFont" id=4]
|
||||
size = 24
|
||||
use_filter = true
|
||||
font_data = ExtResource( 4 )
|
||||
|
||||
[node name="Fish" type="KinematicBody2D"]
|
||||
collision_layer = 2
|
||||
@ -17,10 +32,12 @@ collision_mask = 28
|
||||
script = ExtResource( 2 )
|
||||
swim_length = 200
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( -26, 7 )
|
||||
scale = Vector2( 0.1, 0.1 )
|
||||
texture = ExtResource( 1 )
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -12, -17 )
|
||||
scale = Vector2( -0.5, 0.5 )
|
||||
frames = SubResource( 3 )
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
@ -31,24 +48,51 @@ shape = SubResource( 1 )
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["Fish"]]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( -18, 3 )
|
||||
position = Vector2( -8, 1 )
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="SwimTimer" type="Timer" parent="."]
|
||||
autostart = true
|
||||
|
||||
[node name="Tween" type="Tween" parent="."]
|
||||
[node name="TweenSwim" type="Tween" parent="."]
|
||||
|
||||
[node name="TweenHome" type="Tween" parent="."]
|
||||
|
||||
[node name="TweenInside" type="Tween" parent="."]
|
||||
|
||||
[node name="TweenSleep" type="Tween" parent="."]
|
||||
|
||||
[node name="Positions" type="Node2D" parent="."]
|
||||
|
||||
[node name="Mouth" type="Position2D" parent="Positions"]
|
||||
position = Vector2( 50, 13 )
|
||||
position = Vector2( 56, 1 )
|
||||
|
||||
[node name="MouthInhale" type="Position2D" parent="Positions"]
|
||||
position = Vector2( 79, 15 )
|
||||
position = Vector2( 85, 1 )
|
||||
|
||||
[node name="Tail" type="Position2D" parent="Positions"]
|
||||
position = Vector2( -72, 0 )
|
||||
position = Vector2( -53, 0 )
|
||||
|
||||
[node name="HungerTimer" type="Timer" parent="."]
|
||||
wait_time = 15.0
|
||||
one_shot = true
|
||||
|
||||
[node name="ThoughtBubble" type="Sprite" parent="."]
|
||||
|
||||
[node name="Thought" type="RichTextLabel" parent="ThoughtBubble"]
|
||||
margin_left = -137.0
|
||||
margin_top = -172.0
|
||||
margin_right = 138.0
|
||||
margin_bottom = -80.0
|
||||
custom_colors/default_color = Color( 0.945098, 0.352941, 0.160784, 1 )
|
||||
custom_constants/line_separation = -6
|
||||
custom_fonts/normal_font = SubResource( 4 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "[center]Wait, something's wrong with these flakes! [shake]
|
||||
Must... resist... eating...!"
|
||||
text = "Wait, something's wrong with these flakes!
|
||||
Must... resist... eating...!"
|
||||
|
||||
[connection signal="timeout" from="SwimTimer" to="." method="_on_SwimTimer_timeout"]
|
||||
[connection signal="timeout" from="HungerTimer" to="." method="_on_HungerTimer_timeout"]
|
||||
|
BIN
Travesty/Fish/Fish2.png
Normal file
After Width: | Height: | Size: 16 KiB |
@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Castle_Left.png-f97b9ec37f152374cad2f149e7292134.stex"
|
||||
path="res://.import/Fish2.png-e0aaf728e9e8541e84719f9b27484369.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Tank/Castle_Left.png"
|
||||
dest_files=[ "res://.import/Castle_Left.png-f97b9ec37f152374cad2f149e7292134.stex" ]
|
||||
source_file="res://Fish/Fish2.png"
|
||||
dest_files=[ "res://.import/Fish2.png-e0aaf728e9e8541e84719f9b27484369.stex" ]
|
||||
|
||||
[params]
|
||||
|
BIN
Travesty/Fish/Thasadith-BoldItalic.ttf
Normal file
@ -58,7 +58,7 @@ tracks/3/keys = {
|
||||
extents = Vector2( 22.25, 28.25 )
|
||||
|
||||
[node name="Fork" type="Sprite"]
|
||||
position = Vector2( 550, 577 )
|
||||
position = Vector2( 550, 570 )
|
||||
rotation = 3.14159
|
||||
scale = Vector2( 2, 2 )
|
||||
texture = ExtResource( 2 )
|
||||
@ -67,7 +67,7 @@ region_rect = Rect2( 0, -400, 300, 470 )
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="ForkAbove" type="Sprite" parent="."]
|
||||
position = Vector2( 216.5, 286 )
|
||||
position = Vector2( 220.499, 278.001 )
|
||||
texture = ExtResource( 2 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 200, 10, 300, 100 )
|
||||
|
@ -1,9 +1,9 @@
|
||||
extends RigidBody2D
|
||||
|
||||
export var poisoned_color : Color = Color(0,200,0,255)
|
||||
export var poisoned_color : Color = Color(0,0.78,0,1)
|
||||
var fish : Node
|
||||
var direction
|
||||
var friendly = false
|
||||
var projectile = false
|
||||
|
||||
func _ready():
|
||||
fish = get_node("/root/Tank/Fish")
|
||||
@ -14,21 +14,23 @@ func _on_Hitbox_area_entered(area: Area2D) -> void:
|
||||
if area.is_in_group("TankFloor"):
|
||||
$DissolveTimer.start()
|
||||
|
||||
if not friendly:
|
||||
if area.is_in_group("Fish") and fish.poisoned == false and not fish.poison_mutation:
|
||||
if not projectile and area.is_in_group("Fish") and not fish.invincible:
|
||||
if fish.poisoned == false and not fish.poison_mutation: # Eat the pellet as poison
|
||||
print("A poison pellet has inflicted poison on the fish.")
|
||||
fish.poisoned = true
|
||||
visible = false
|
||||
$PoisonTimer.start()
|
||||
$TweenPoison.interpolate_property(area.get_parent(), "modulate", modulate, poisoned_color, 2.0, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
$TweenPoison.interpolate_property(area.get_parent(), "modulate", Color(1,1,1,1), poisoned_color, 2.0, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
$TweenPoison.start()
|
||||
elif area.is_in_group("Fish") and fish.poison_mutation and fish.pellets < 10:
|
||||
elif fish.poison_mutation or get_parent().phase == get_parent().Phase.CLEAN: # Eat the pellet as ammo
|
||||
fish.reset_hunger()
|
||||
fish.pellets += 1
|
||||
#$TweenEat.interpolate_property(self, "position", position, get_node("/root/Tank/Fish/Positions/MouthInhale").get_global_position(), 0.5, Tween.TRANS_EXPO, Tween.EASE_IN, 0.5)
|
||||
$TweenEat.interpolate_property(self, "position", position, get_node("/root/Tank/Fish/Positions/Mouth").get_global_position(), 0.5, Tween.TRANS_EXPO, Tween.EASE_IN)
|
||||
$TweenEat.interpolate_property(self, "scale", scale, Vector2(0.1, 0.1), 0.5, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
$TweenEat.start()
|
||||
print(get_node("/root/Tank/Fish/Positions/Mouth").get_global_position())
|
||||
$Crunch.pitch_scale = rand_range(0.8, 1.2)
|
||||
$Crunch.play()
|
||||
yield($TweenEat, "tween_completed")
|
||||
queue_free()
|
||||
|
||||
@ -39,12 +41,10 @@ static func choose(choices):
|
||||
|
||||
func _on_Timer_timeout() -> void:
|
||||
if fish:
|
||||
print("Fish died of poison.")
|
||||
fish.kill("poison")
|
||||
fish.belly_up("poison")
|
||||
|
||||
|
||||
func _on_DissolveTimer_timeout() -> void:
|
||||
print(modulate.a)
|
||||
$TweenDissolve.interpolate_property(self, "modulate:a", modulate.a, 0, 3, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
$TweenDissolve.start()
|
||||
yield($TweenDissolve, "tween_completed")
|
||||
|
@ -1,9 +1,10 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://Hazards/Poison/PoisonFood3.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Hazards/Poison/PoisonFood1.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Hazards/Poison/PoisonFood2.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Hazards/Poison/Poison.gd" type="Script" id=4]
|
||||
[ext_resource path="res://Hazards/Poison/crunch.6.ogg" type="AudioStream" id=5]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
@ -19,11 +20,12 @@ extents = Vector2( 17.5, 19 )
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
extents = Vector2( 28, 25 )
|
||||
|
||||
[node name="Poison" type="RigidBody2D"]
|
||||
self_modulate = Color( 0, 0.784314, 0, 1 )
|
||||
[node name="Poison" type="RigidBody2D" groups=["Pellets"]]
|
||||
modulate = Color( 0, 0.862745, 0, 1 )
|
||||
collision_layer = 16
|
||||
collision_mask = 6
|
||||
script = ExtResource( 4 )
|
||||
poisoned_color = Color( 0.529412, 1, 0.529412, 1 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 1 )
|
||||
@ -43,7 +45,6 @@ wait_time = 2.0
|
||||
one_shot = true
|
||||
|
||||
[node name="DissolveTimer" type="Timer" parent="."]
|
||||
wait_time = 5.0
|
||||
|
||||
[node name="TweenPoison" type="Tween" parent="."]
|
||||
|
||||
@ -53,6 +54,9 @@ wait_time = 5.0
|
||||
|
||||
[node name="TweenDissolve" type="Tween" parent="."]
|
||||
|
||||
[node name="Crunch" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 5 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Poison_body_entered"]
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="timeout" from="PoisonTimer" to="." method="_on_Timer_timeout"]
|
||||
|
BIN
Travesty/Hazards/Poison/crunch.6.ogg
Normal file
15
Travesty/Hazards/Poison/crunch.6.ogg.import
Normal file
@ -0,0 +1,15 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/crunch.6.ogg-f54e41bf7d73700f35310d873892c300.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Hazards/Poison/crunch.6.ogg"
|
||||
dest_files=[ "res://.import/crunch.6.ogg-f54e41bf7d73700f35310d873892c300.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
@ -1,9 +1,28 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
func _ready():
|
||||
$AnimationPlayer.play("Stab")
|
||||
$Timer.start()
|
||||
|
||||
|
||||
func _on_Hitbox_area_entered(area: Area2D) -> void:
|
||||
if area.is_in_group("Fish"):
|
||||
area.kill()
|
||||
|
||||
|
||||
func _on_Timer_timeout():
|
||||
_reposition()
|
||||
yield($Tween, "tween_completed")
|
||||
$AnimationPlayer.play("Stab")
|
||||
yield($AnimationPlayer, "animation_finished")
|
||||
$AnimationPlayer.play_backwards("Stab")
|
||||
yield($AnimationPlayer, "animation_finished")
|
||||
$Timer.wait_time = rand_range(.3,1.5)
|
||||
$Timer.start()
|
||||
|
||||
|
||||
func _reposition() -> void:
|
||||
var tween_duration = rand_range(.3,1.5)
|
||||
$Tween.interpolate_property($Tentacle, "position:y", $Tentacle.position.y, rand_range(0, 900), tween_duration, Tween.TRANS_BACK, Tween.EASE_IN_OUT)
|
||||
$Tween.start()
|
||||
yield($Tween, "tween_completed")
|
||||
|
@ -1,26 +1,13 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://Hazards/Squid/Squid.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Hazards/Squid/Squid2.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Hazards/Squid/Tentacle.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Hazards/Squid/Squid.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Tentacle:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( -900, 0 ) ]
|
||||
}
|
||||
[ext_resource path="res://Tank/Water.png" type="Texture" id=4]
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
resource_name = "Stab"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Tentacle:position:x")
|
||||
tracks/0/interp = 1
|
||||
@ -28,7 +15,7 @@ tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 1 ),
|
||||
"times": PoolRealArray( 0, 0.3 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ -900.0, 0.0 ]
|
||||
@ -37,11 +24,22 @@ tracks/0/keys = {
|
||||
[node name="Squid" type="Node2D"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="DELETEME" type="Sprite" parent="."]
|
||||
texture = ExtResource( 4 )
|
||||
centered = false
|
||||
|
||||
[node name="Tentacle" type="Sprite" parent="."]
|
||||
position = Vector2( -900, 0 )
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="Tentacle"]
|
||||
visible = false
|
||||
position = Vector2( 900, 0 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Tentacle/Hitbox"]
|
||||
polygon = PoolVector2Array( 202, 11, 430, 2, 666, 10, 880, 40, 1008, 76, 1019, 100, 992, 121, 336, 163, 8, 200, 9, 34 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
@ -50,12 +48,19 @@ __meta__ = {
|
||||
}
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/RESET = SubResource( 3 )
|
||||
anims/Stab = SubResource( 2 )
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
one_shot = true
|
||||
|
||||
[node name="Tween" type="Tween" parent="."]
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="."]
|
||||
visible = false
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hitbox"]
|
||||
polygon = PoolVector2Array( 202, 11, 430, 2, 666, 10, 880, 40, 1008, 76, 1019, 100, 992, 121, 336, 163, 8, 200, 9, 34 )
|
||||
polygon = PoolVector2Array( 131, 9, 234, 56, 364, 67, 413, 149, 592, 41, 699, 37, 779, 65, 835, 93, 863, 144, 701, 177, 731, 252, 746, 331, 731, 405, 684, 477, 801, 528, 846, 694, 917, 775, 979, 770, 1207, 512, 1280, 498, 1285, 518, 1191, 596, 1123, 773, 1079, 832, 1231, 815, 1355, 875, 1415, 973, 1407, 1022, 1321, 943, 1120, 926, 903, 961, 1031, 1045, 1052, 1078, -1, 1081, 4, 179, 70, 30 )
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="area_entered" from="Tentacle/Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
||||
|
BIN
Travesty/Hazards/Squid/Squid2.png
Normal file
After Width: | Height: | Size: 295 KiB |
@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Castle_Right.png-9b5a745734b15e929ca664c0d4ba6780.stex"
|
||||
path="res://.import/Squid2.png-b924d565294c5c36119c8ca1bae39cfb.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Tank/Castle_Right.png"
|
||||
dest_files=[ "res://.import/Castle_Right.png-9b5a745734b15e929ca664c0d4ba6780.stex" ]
|
||||
source_file="res://Hazards/Squid/Squid2.png"
|
||||
dest_files=[ "res://.import/Squid2.png-b924d565294c5c36119c8ca1bae39cfb.stex" ]
|
||||
|
||||
[params]
|
||||
|
BIN
Travesty/Tank/House_Eyes.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
35
Travesty/Tank/House_Eyes.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/House_Eyes.png-b4ba06ca1cf31aeafa3a4117952ceb89.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Tank/House_Eyes.png"
|
||||
dest_files=[ "res://.import/House_Eyes.png-b4ba06ca1cf31aeafa3a4117952ceb89.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
35
Travesty/Tank/House_Left.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/House_Left.png-c405cd5a6718f7d80cf99206ba2cd3f3.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Tank/House_Left.png"
|
||||
dest_files=[ "res://.import/House_Left.png-c405cd5a6718f7d80cf99206ba2cd3f3.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
BIN
Travesty/Tank/House_Left_B.png
Normal file
After Width: | Height: | Size: 84 KiB |
35
Travesty/Tank/House_Left_B.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/House_Left_B.png-a92c6bd7f6de1ce72acd7efdcf42ddae.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Tank/House_Left_B.png"
|
||||
dest_files=[ "res://.import/House_Left_B.png-a92c6bd7f6de1ce72acd7efdcf42ddae.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
35
Travesty/Tank/House_Right.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/House_Right.png-2be295d01d3bd9625dc12e2960fd3372.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Tank/House_Right.png"
|
||||
dest_files=[ "res://.import/House_Right.png-2be295d01d3bd9625dc12e2960fd3372.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
BIN
Travesty/Tank/House_Right_B.png
Normal file
After Width: | Height: | Size: 83 KiB |
35
Travesty/Tank/House_Right_B.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/House_Right_B.png-e8381f48b59a5212df7e36010f83c8da.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Tank/House_Right_B.png"
|
||||
dest_files=[ "res://.import/House_Right_B.png-e8381f48b59a5212df7e36010f83c8da.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
@ -1,13 +1,16 @@
|
||||
extends Node2D
|
||||
|
||||
#enum { PLAYING, GOING_IN, INSIDE, COMING_OUT}
|
||||
#var status = PLAYING
|
||||
|
||||
enum Phase { START, CLEAN, POISON, KNIFE, SQUID, HEATER, ANGLER, NEXT }
|
||||
var phase = Phase.START
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
randomize()
|
||||
var keyscene = load("res://Star/Star.tscn")
|
||||
var keyspawns = get_tree().get_nodes_in_group("KeySpawners")
|
||||
for keyspawn in keyspawns:
|
||||
var key = keyscene.instance()
|
||||
key.position = random_position(keyspawn)
|
||||
add_child(key)
|
||||
modulate = Color(0,0,0,1)
|
||||
blackout()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
@ -23,9 +26,50 @@ static func random_position(area: CollisionShape2D) -> Vector2:
|
||||
return Vector2(_x, _y)
|
||||
|
||||
|
||||
|
||||
func _on_HazardTimer_timeout() -> void:
|
||||
if phase == Phase.CLEAN or phase == Phase.POISON:
|
||||
var poison_scene = load("res://Hazards/Poison/Poison.tscn")
|
||||
var poison = poison_scene.instance()
|
||||
if phase == Phase.CLEAN:
|
||||
poison.modulate = Color(1,1,1,1)
|
||||
add_child(poison)
|
||||
poison.position = random_position($HazardSpawner)
|
||||
|
||||
|
||||
func blackout() -> void:
|
||||
if not phase == Phase.START:
|
||||
yield($Fish.go_inside(), "completed")
|
||||
if not modulate == Color(0,0,0,1):
|
||||
$TweenBlackout.interpolate_property(self, "modulate", modulate, Color(0,0,0,1), 2, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
$TweenBlackout.start()
|
||||
yield($TweenBlackout, "tween_completed")
|
||||
next_phase()
|
||||
$House/HouseEyes.visible = false
|
||||
$House/HouseRight.z_index = $House/HouseLeft.z_index
|
||||
print(phase)
|
||||
if phase == Phase.POISON:
|
||||
$SurvivePoisonTimer.start()
|
||||
if not phase == Phase.CLEAN:
|
||||
$Fish.position = $House/RightEntrance.get_global_position() + Vector2(0,-100)
|
||||
$Fish.global_rotation_degrees = 180
|
||||
$Fish/AnimatedSprite.flip_v = true
|
||||
$Fish.visible = true
|
||||
$Fish.destination = $House/LeftEntrance.get_global_position()+Vector2(0,-100)
|
||||
$Fish/TweenSwim.interpolate_property($Fish, "position", $Fish.get_global_position(), $House/LeftEntrance.get_global_position()+Vector2(0,-100), 2, Tween.TRANS_CUBIC, Tween.EASE_IN_OUT)
|
||||
$Fish/TweenSwim.start()
|
||||
$TweenBlackout.interpolate_property(self, "modulate", modulate, Color(1,1,1,1), 2, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||
$TweenBlackout.start()
|
||||
yield($TweenBlackout, "tween_completed")
|
||||
$Fish.invincible = false
|
||||
|
||||
|
||||
func next_phase() -> void:
|
||||
if phase == Phase.CLEAN: # Clean tank of pellets before poison phase
|
||||
var pellets = get_tree().get_nodes_in_group("Pellets")
|
||||
for pellet in pellets:
|
||||
pellet.queue_free()
|
||||
phase += 1
|
||||
|
||||
|
||||
func _on_SurvivePoisonTimer_timeout() -> void:
|
||||
blackout()
|
||||
|
@ -1,9 +1,13 @@
|
||||
[gd_scene load_steps=9 format=2]
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://Tank/AquariumBG.jpg" type="Texture" id=1]
|
||||
[ext_resource path="res://Tank/Water.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Tank/Tank.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Hazards/Fork/Fork.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Fish/Fish.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://Tank/Gravel.png" type="Texture" id=5]
|
||||
[ext_resource path="res://Tank/Travis.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Tank/House_Left_B.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Tank/House_Eyes.png" type="Texture" id=8]
|
||||
[ext_resource path="res://Tank/House_Right_B.png" type="Texture" id=9]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 20, 540 )
|
||||
@ -21,10 +25,28 @@ extents = Vector2( 960, 10 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="AquariumBg" type="Sprite" parent="."]
|
||||
position = Vector2( 960, 540 )
|
||||
z_index = -2
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
|
||||
[node name="Travis" type="Sprite" parent="AquariumBg"]
|
||||
visible = false
|
||||
position = Vector2( 0, 93 )
|
||||
texture = ExtResource( 6 )
|
||||
centered = false
|
||||
|
||||
[node name="Gravel" type="Sprite" parent="AquariumBg"]
|
||||
position = Vector2( 0, 914 )
|
||||
texture = ExtResource( 5 )
|
||||
centered = false
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="AquariumBg"]
|
||||
margin_right = 1920.0
|
||||
margin_bottom = 100.0
|
||||
color = Color( 0.588235, 0.588235, 0.980392, 1 )
|
||||
|
||||
[node name="Edges" type="StaticBody2D" parent="." groups=["Tank"]]
|
||||
visible = false
|
||||
collision_layer = 4
|
||||
collision_mask = 18
|
||||
|
||||
@ -63,14 +85,51 @@ margin_bottom = 115.0
|
||||
color = Color( 0.588235, 0.588235, 0.980392, 1 )
|
||||
|
||||
[node name="Fish" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 596, 543 )
|
||||
|
||||
[node name="Fork" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 617, 494 )
|
||||
|
||||
[node name="TankFloor" type="Area2D" parent="." groups=["TankFloor"]]
|
||||
visible = false
|
||||
position = Vector2( 960, 1070 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TankFloor"]
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="House" type="Node2D" parent="."]
|
||||
position = Vector2( 1321, 709 )
|
||||
z_index = -1
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="HouseLeft" type="Sprite" parent="House"]
|
||||
position = Vector2( -135, 161 )
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
z_index = -1
|
||||
texture = ExtResource( 7 )
|
||||
|
||||
[node name="HouseRight" type="Sprite" parent="House"]
|
||||
position = Vector2( 135, 161 )
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
z_index = -1
|
||||
texture = ExtResource( 9 )
|
||||
|
||||
[node name="HouseEyes" type="Sprite" parent="House"]
|
||||
visible = false
|
||||
position = Vector2( 0, 228 )
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
z_index = 2
|
||||
texture = ExtResource( 8 )
|
||||
|
||||
[node name="LeftEntrance" type="Position2D" parent="House"]
|
||||
position = Vector2( -228, 245 )
|
||||
|
||||
[node name="RightEntrance" type="Position2D" parent="House"]
|
||||
position = Vector2( 160, 245 )
|
||||
|
||||
[node name="TweenBlackout" type="Tween" parent="."]
|
||||
|
||||
[node name="SurvivePoisonTimer" type="Timer" parent="."]
|
||||
wait_time = 60.0
|
||||
|
||||
[connection signal="timeout" from="HazardSpawner/HazardTimer" to="." method="_on_HazardTimer_timeout"]
|
||||
[connection signal="timeout" from="SurvivePoisonTimer" to="." method="_on_SurvivePoisonTimer_timeout"]
|
||||
|
8
Travesty/default_bus_layout.tres
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_resource type="AudioBusLayout" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="AudioEffectLowPassFilter" id=1]
|
||||
resource_name = "LowPassFilter"
|
||||
|
||||
[resource]
|
||||
bus/0/effect/0/effect = SubResource( 1 )
|
||||
bus/0/effect/0/enabled = true
|