Added Piranha Scene and such
BIN
Travesty/Ending/Shenron_Water.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
35
Travesty/Ending/Shenron_Water.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Shenron_Water.png-28a2de56f695ec9a6bb7dac5ed84c458.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Ending/Shenron_Water.png"
|
||||||
|
dest_files=[ "res://.import/Shenron_Water.png-28a2de56f695ec9a6bb7dac5ed84c458.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
|
@ -110,3 +110,7 @@ func _on_HungerTimer_timeout() -> void:
|
|||||||
belly_up("starvation")
|
belly_up("starvation")
|
||||||
else:
|
else:
|
||||||
$HungerTimer.stop()
|
$HungerTimer.stop()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_ThoughtTimer_timeout() -> void:
|
||||||
|
$ThoughtBubble.visible = false
|
||||||
|
@ -23,6 +23,8 @@ height = 80.0
|
|||||||
|
|
||||||
[sub_resource type="DynamicFont" id=4]
|
[sub_resource type="DynamicFont" id=4]
|
||||||
size = 24
|
size = 24
|
||||||
|
outline_size = 1
|
||||||
|
outline_color = Color( 0, 0, 0, 1 )
|
||||||
use_filter = true
|
use_filter = true
|
||||||
font_data = ExtResource( 4 )
|
font_data = ExtResource( 4 )
|
||||||
|
|
||||||
@ -36,7 +38,6 @@ swim_length = 200
|
|||||||
position = Vector2( -12, -17 )
|
position = Vector2( -12, -17 )
|
||||||
scale = Vector2( -0.5, 0.5 )
|
scale = Vector2( -0.5, 0.5 )
|
||||||
frames = SubResource( 3 )
|
frames = SubResource( 3 )
|
||||||
frame = 1
|
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
@ -82,7 +83,7 @@ one_shot = true
|
|||||||
|
|
||||||
[node name="Thought" type="RichTextLabel" parent="ThoughtBubble"]
|
[node name="Thought" type="RichTextLabel" parent="ThoughtBubble"]
|
||||||
margin_left = -137.0
|
margin_left = -137.0
|
||||||
margin_top = -172.0
|
margin_top = -200.0
|
||||||
margin_right = 138.0
|
margin_right = 138.0
|
||||||
margin_bottom = -80.0
|
margin_bottom = -80.0
|
||||||
custom_colors/default_color = Color( 0.945098, 0.352941, 0.160784, 1 )
|
custom_colors/default_color = Color( 0.945098, 0.352941, 0.160784, 1 )
|
||||||
@ -94,5 +95,10 @@ Must... resist... eating...!"
|
|||||||
text = "Wait, something's wrong with these flakes!
|
text = "Wait, something's wrong with these flakes!
|
||||||
Must... resist... eating...!"
|
Must... resist... eating...!"
|
||||||
|
|
||||||
|
[node name="ThoughtTimer" type="Timer" parent="ThoughtBubble"]
|
||||||
|
wait_time = 8.0
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
[connection signal="timeout" from="SwimTimer" to="." method="_on_SwimTimer_timeout"]
|
[connection signal="timeout" from="SwimTimer" to="." method="_on_SwimTimer_timeout"]
|
||||||
[connection signal="timeout" from="HungerTimer" to="." method="_on_HungerTimer_timeout"]
|
[connection signal="timeout" from="HungerTimer" to="." method="_on_HungerTimer_timeout"]
|
||||||
|
[connection signal="timeout" from="ThoughtBubble/ThoughtTimer" to="." method="_on_ThoughtTimer_timeout"]
|
||||||
|
@ -1,22 +1,48 @@
|
|||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
export var hp : int = 3 # Number of hits before dying
|
export var hp : int = 3 # Number of hits before dying
|
||||||
export var dash_duration : int = 3 # Duration of charge tween in seconds
|
export var dash_duration : int = 2 # Duration of charge tween in seconds
|
||||||
onready var fish = get_node("/root/Tank/Fish")
|
onready var fish = get_node("/root/Tank/Fish")
|
||||||
|
var charging = false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
pass
|
$ChargeTimer.start()
|
||||||
|
$Sprite.flip_h = true
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
# look at fish like how Fish.tscn looks at get_global_mouse_position() in Fish.gd's _process
|
var v
|
||||||
pass
|
v = fish.get_global_position() - global_position
|
||||||
|
var angle = v.angle() + deg2rad(270)
|
||||||
|
if rad2deg(angle) < 180 or rad2deg(angle) > 360:
|
||||||
|
if not charging:
|
||||||
|
$Sprite.flip_v = true
|
||||||
|
elif not charging:
|
||||||
|
$Sprite.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)
|
||||||
|
if not charging:
|
||||||
|
global_rotation = angle
|
||||||
|
|
||||||
|
|
||||||
func _on_ChargeTimer_timeout() -> void:
|
func _on_ChargeTimer_timeout() -> void:
|
||||||
# $Tween self toward fish.get_global_position()
|
var destination = $ChargeDestination.get_global_position()
|
||||||
$Tween.interpolate_property(self, "position", get_global_position(), fish.get_global_position(), dash_duration, Tween.TRANS_CIRC, Tween.EASE_OUT_IN)
|
print("destination=" + str(destination))
|
||||||
pass
|
destination.x = clamp(destination.x, 200, 1720)
|
||||||
|
destination.y = clamp(destination.y, 200, 880)
|
||||||
|
print("clamped destination=" + str(destination))
|
||||||
|
print("position=" + str(position))
|
||||||
|
print("global_pos=" + str(global_position))
|
||||||
|
$Tween.interpolate_property(self, "position", global_position, destination, dash_duration, Tween.TRANS_EXPO, Tween.EASE_IN)
|
||||||
|
$Tween.start()
|
||||||
|
charging = true
|
||||||
|
yield($Tween, "tween_completed")
|
||||||
|
charging = false
|
||||||
|
$ChargeTimer.start()
|
||||||
|
|
||||||
|
|
||||||
func _on_Hurtbox_area_entered(area: Area2D) -> void:
|
func _on_Hurtbox_area_entered(area: Area2D) -> void:
|
||||||
@ -28,18 +54,20 @@ func _on_Hurtbox_area_entered(area: Area2D) -> void:
|
|||||||
func _on_Hitbox_area_entered(area: Area2D) -> void:
|
func _on_Hitbox_area_entered(area: Area2D) -> void:
|
||||||
if area.is_in_group("Fish"):
|
if area.is_in_group("Fish"):
|
||||||
if fish.electrified:
|
if fish.electrified:
|
||||||
hp -= 1
|
hp-=1 #below is flash feedback on hit
|
||||||
|
$TweenColor.interpolate_property(self, "modulate", modulate, Color(0,0,0,1), .085)
|
||||||
|
$TweenColor.start()
|
||||||
|
yield($TweenColor, "tween_completed")
|
||||||
|
$TweenColor.interpolate_property(self, "modulate", modulate, Color(1,1,1,1), .085)
|
||||||
|
$TweenColor.start()
|
||||||
if hp < 1: # kill angler
|
if hp < 1: # kill angler
|
||||||
_death()
|
_death()
|
||||||
else: # damage angler
|
|
||||||
# Modulate self across all white > yellow > black and maybe?
|
|
||||||
$TweenColor.interpolate_property(self, "modulate", modulate, Color(0,0,0,1))
|
|
||||||
$Tween.start()
|
|
||||||
|
|
||||||
|
|
||||||
func _death():
|
func _death():
|
||||||
# do something to make it obvious he died
|
$ChargeTimer.stop() #stop charging when dead
|
||||||
# probably replacing his eyes with X_X's
|
$Sprite.flip_v = true
|
||||||
# flipping him upside-down, maybe like: $AnimatedSprite.flip_v = true
|
charging = true #hack to stop rotating
|
||||||
# floating him to top ($Tween probably)
|
$Tween.interpolate_property(self, "position", get_global_position(),Vector2(get_global_position().x,100), dash_duration, Tween.TRANS_LINEAR, Tween.EASE_IN)
|
||||||
pass
|
# probably replacing his eyes with X_X's SKIP DO THIS
|
||||||
|
$Tween.start()
|
||||||
|
@ -8,6 +8,7 @@ radius = 25.0
|
|||||||
height = 108.0
|
height = 108.0
|
||||||
|
|
||||||
[node name="Angler" type="Node2D"]
|
[node name="Angler" type="Node2D"]
|
||||||
|
position = Vector2( 133, 108 )
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
@ -18,7 +19,8 @@ texture = ExtResource( 2 )
|
|||||||
[node name="Tween" type="Tween" parent="."]
|
[node name="Tween" type="Tween" parent="."]
|
||||||
|
|
||||||
[node name="ChargeTimer" type="Timer" parent="."]
|
[node name="ChargeTimer" type="Timer" parent="."]
|
||||||
wait_time = 4.0
|
wait_time = 2.5
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
[node name="Hitbox" type="Area2D" parent="."]
|
[node name="Hitbox" type="Area2D" parent="."]
|
||||||
|
|
||||||
@ -32,6 +34,11 @@ position = Vector2( 10, -3 )
|
|||||||
rotation = 1.5708
|
rotation = 1.5708
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="ChargeDestination" type="Position2D" parent="."]
|
||||||
|
position = Vector2( 1665, -24 )
|
||||||
|
|
||||||
|
[node name="TweenColor" type="Tween" parent="."]
|
||||||
|
|
||||||
[connection signal="timeout" from="ChargeTimer" to="." method="_on_ChargeTimer_timeout"]
|
[connection signal="timeout" from="ChargeTimer" to="." method="_on_ChargeTimer_timeout"]
|
||||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
extends Sprite
|
extends Sprite
|
||||||
|
|
||||||
|
|
||||||
onready var tank = get_node("/root/Tank")
|
onready var tank = get_node("/root/Tank")
|
||||||
onready var spawner = get_node("/root/Tank/HazardSpawner")
|
onready var spawner = get_node("/root/Tank/HazardSpawner")
|
||||||
var playingforwards = true
|
var playingforwards = true
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
#func _ready() -> void:
|
||||||
$Timer.start()
|
# $Timer.start()
|
||||||
|
#
|
||||||
|
#
|
||||||
func _on_Timer_timeout() -> void:
|
#func _on_Timer_timeout() -> void:
|
||||||
_reposition()
|
# _reposition()
|
||||||
yield($Tween, "tween_completed")
|
# yield($Tween, "tween_completed")
|
||||||
_stab()
|
# _stab()
|
||||||
yield($AnimationPlayer, "animation_finished")
|
# yield($AnimationPlayer, "animation_finished")
|
||||||
_retract()
|
# _retract()
|
||||||
|
|
||||||
|
|
||||||
func _reposition() -> void:
|
func _reposition() -> void:
|
||||||
|
34
Travesty/Hazards/Heater/Heater.gd
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
enum { TOP, MID, BOT }
|
||||||
|
var active_channel = TOP
|
||||||
|
onready var fish = get_node("/root/Tank/Fish")
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Timer_timeout() -> void:
|
||||||
|
active_channel += 1
|
||||||
|
|
||||||
|
if active_channel == TOP:
|
||||||
|
var areas = $TopChannel.get_overlapping_areas()
|
||||||
|
for area in areas:
|
||||||
|
if area.is_in_group("Fish"):
|
||||||
|
var destination = $TopChannel/CollisionShape2D.position - $TopChannel/CollisionShape2D.extents
|
||||||
|
$TweenPush.interpolate_property(fish, "position:x", position.x, destination.x, 1.5, Tween.TRANS_CIRC, Tween.EASE_IN_OUT)
|
||||||
|
print("Pushing fish back!")
|
||||||
|
fish.get_node("TweenSwim").stop_all()
|
||||||
|
if active_channel == MID:
|
||||||
|
var areas = $MidChannel.get_overlapping_areas()
|
||||||
|
for area in areas:
|
||||||
|
if area.is_in_group("Fish"):
|
||||||
|
print("Pushing fish back!")
|
||||||
|
fish.get_node("TweenSwim").stop_all()
|
||||||
|
if active_channel == BOT:
|
||||||
|
var areas = $TopChannel.get_overlapping_areas()
|
||||||
|
for area in areas:
|
||||||
|
if area.is_in_group("Fish"):
|
||||||
|
print("Pushing fish back!")
|
||||||
|
fish.get_node("TweenSwim").stop_all()
|
40
Travesty/Hazards/Heater/Heater.tscn
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Hazards/Heater/Heater2.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Hazards/Heater/Heater3.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://Hazards/Heater/Heater1.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://Hazards/Heater/Heater.gd" type="Script" id=4]
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id=1]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ ExtResource( 3 ), ExtResource( 1 ), ExtResource( 2 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "default",
|
||||||
|
"speed": 5.0
|
||||||
|
} ]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id=2]
|
||||||
|
radius = 81.0
|
||||||
|
height = 714.0
|
||||||
|
|
||||||
|
[node name="Heater" type="Node2D"]
|
||||||
|
script = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="PivotPoint" type="Position2D" parent="."]
|
||||||
|
position = Vector2( 3, -494 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="AnimatedSprite" parent="PivotPoint"]
|
||||||
|
position = Vector2( 0, 494 )
|
||||||
|
frames = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="Hitbox" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||||
|
position = Vector2( 0, 29 )
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="Timer" type="Timer" parent="."]
|
||||||
|
|
||||||
|
[node name="TweenPush" type="Tween" parent="."]
|
||||||
|
|
||||||
|
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
BIN
Travesty/Hazards/Heater/Heater1.png
Normal file
After Width: | Height: | Size: 29 KiB |
35
Travesty/Hazards/Heater/Heater1.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Heater1.png-dae6580e355aabcfbecd8fd28855d76c.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Heater/Heater1.png"
|
||||||
|
dest_files=[ "res://.import/Heater1.png-dae6580e355aabcfbecd8fd28855d76c.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/Hazards/Heater/Heater2.png
Normal file
After Width: | Height: | Size: 54 KiB |
35
Travesty/Hazards/Heater/Heater2.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Heater2.png-6a4f25b59a74d865bf5f070f41941c5f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Heater/Heater2.png"
|
||||||
|
dest_files=[ "res://.import/Heater2.png-6a4f25b59a74d865bf5f070f41941c5f.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/Hazards/Heater/Heater3.png
Normal file
After Width: | Height: | Size: 56 KiB |
35
Travesty/Hazards/Heater/Heater3.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Heater3.png-f85b7365979e755d8005ac5fc3ea170c.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Heater/Heater3.png"
|
||||||
|
dest_files=[ "res://.import/Heater3.png-f85b7365979e755d8005ac5fc3ea170c.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/Hazards/Knife/Fork.png
Normal file
After Width: | Height: | Size: 33 KiB |
35
Travesty/Hazards/Knife/Fork.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Fork.png-fdf3f45883c3a6a97f4f0f7ae68e5ef9.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Knife/Fork.png"
|
||||||
|
dest_files=[ "res://.import/Fork.png-fdf3f45883c3a6a97f4f0f7ae68e5ef9.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/Hazards/Knife/Fork2.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
35
Travesty/Hazards/Knife/Fork2.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Fork2.png-65b19b1b134a5c993075d0aac12306d2.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Knife/Fork2.png"
|
||||||
|
dest_files=[ "res://.import/Fork2.png-65b19b1b134a5c993075d0aac12306d2.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
|
35
Travesty/Hazards/Knife/Knife.gd
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
extends Sprite
|
||||||
|
|
||||||
|
onready var tank = get_node("/root/Tank")
|
||||||
|
onready var spawner = get_node("/root/Tank/HazardSpawner")
|
||||||
|
var playingforwards = true
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$Timer.start()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Timer_timeout() -> void:
|
||||||
|
_reposition()
|
||||||
|
yield($Tween, "tween_completed")
|
||||||
|
_stab()
|
||||||
|
yield($AnimationPlayer, "animation_finished")
|
||||||
|
_retract()
|
||||||
|
|
||||||
|
|
||||||
|
func _reposition() -> void:
|
||||||
|
var tween_duration = 1
|
||||||
|
$Tween.interpolate_property(self, "position:x", position.x, rand_range(400, 2000), tween_duration, Tween.TRANS_BACK, Tween.EASE_IN_OUT)
|
||||||
|
$Tween.start()
|
||||||
|
|
||||||
|
|
||||||
|
func _stab() -> void:
|
||||||
|
$AnimationPlayer.play("Stab")
|
||||||
|
|
||||||
|
|
||||||
|
func _retract() -> void:
|
||||||
|
$AnimationPlayer.play_backwards("Stab")
|
||||||
|
|
||||||
|
|
||||||
|
func destroy() -> void:
|
||||||
|
queue_free()
|
BIN
Travesty/Hazards/Knife/Knife.png
Normal file
After Width: | Height: | Size: 13 KiB |
35
Travesty/Hazards/Knife/Knife.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Knife.png-f70fc2a8b7fa12ed79d50974e2cc9809.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Knife/Knife.png"
|
||||||
|
dest_files=[ "res://.import/Knife.png-f70fc2a8b7fa12ed79d50974e2cc9809.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
|
89
Travesty/Hazards/Knife/Knife.tscn
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Hazards/Knife/Knife.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://Hazards/Fork/Fork.png" type="Texture" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=2]
|
||||||
|
resource_name = "Stab"
|
||||||
|
length = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:region_rect")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.05 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Rect2( 0, -400, 300, 470 ), Rect2( 0, 0, 300, 470 ) ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("ForkAbove:region_rect")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.05 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Rect2( 200, 10, 300, 100 ), Rect2( 200, 410, 300, 100 ) ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/path = NodePath(".")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( ),
|
||||||
|
"transitions": PoolRealArray( ),
|
||||||
|
"values": [ ]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/path = NodePath("Hitbox:position")
|
||||||
|
tracks/3/interp = 2
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.5 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, 0 ), Vector2( 0, -400 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=3]
|
||||||
|
extents = Vector2( 22.25, 28.25 )
|
||||||
|
|
||||||
|
[node name="Fork" type="Sprite"]
|
||||||
|
position = Vector2( 550, 570 )
|
||||||
|
rotation = 3.14159
|
||||||
|
scale = Vector2( 2, 2 )
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 0, -400, 300, 470 )
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="ForkAbove" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 220.499, 278.001 )
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 200, 10, 300, 100 )
|
||||||
|
|
||||||
|
[node name="Timer" type="Timer" parent="."]
|
||||||
|
wait_time = 1.75
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
anims/Stab = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="Hitbox" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||||
|
position = Vector2( 108.749, 205.75 )
|
||||||
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
|
[node name="Tween" type="Tween" parent="."]
|
||||||
|
|
||||||
|
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
BIN
Travesty/Hazards/Piranha.7z
Normal file
18
Travesty/Hazards/Piranha/Piranha.gd
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
onready var fish = get_node("/root/Tank/Fish")
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
$SwordPivot.rotation_degrees += 1
|
||||||
|
|
||||||
|
|
||||||
|
func _on_SwordHitbox_area_entered(area: Area2D) -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
# if is_in_group("Fish"):
|
||||||
|
# fish.belly_up()
|
53
Travesty/Hazards/Piranha/Piranha.tscn
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Hazards/Piranha/Piranha2.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Hazards/Piranha/Piranha1.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://Hazards/Piranha/Piranha.gd" type="Script" id=3]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id=2]
|
||||||
|
height = 644.0
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id=1]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ ExtResource( 2 ), ExtResource( 1 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "default",
|
||||||
|
"speed": 3.0
|
||||||
|
} ]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=3]
|
||||||
|
radius = 515.097
|
||||||
|
|
||||||
|
[node name="Piranha" type="Node2D"]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
|
[node name="SwordPivot" type="Position2D" parent="."]
|
||||||
|
position = Vector2( 4, 1 )
|
||||||
|
rotation = 6.28319
|
||||||
|
|
||||||
|
[node name="Sword" type="Sprite" parent="SwordPivot"]
|
||||||
|
|
||||||
|
[node name="SwordHitbox" type="Area2D" parent="SwordPivot"]
|
||||||
|
|
||||||
|
[node name="StandinArt" type="Polygon2D" parent="SwordPivot/SwordHitbox"]
|
||||||
|
position = Vector2( -212, 8.00004 )
|
||||||
|
polygon = PoolVector2Array( 458, -9, 467, -28, 524, -29, 523, -56, 546, -56, 547, -32, 781, -29, 906, -8, 782, 12, 549, 10, 550, 37, 526, 37, 524, 10, 466, 10 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="SwordPivot/SwordHitbox"]
|
||||||
|
position = Vector2( 344, -6.00815e-05 )
|
||||||
|
rotation = 1.5708
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||||
|
position = Vector2( 67, -25 )
|
||||||
|
scale = Vector2( 0.5, 0.5 )
|
||||||
|
frames = SubResource( 1 )
|
||||||
|
playing = true
|
||||||
|
|
||||||
|
[node name="Blindzone" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Blindzone"]
|
||||||
|
position = Vector2( 2, 5 )
|
||||||
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
|
[connection signal="area_entered" from="SwordPivot/SwordHitbox" to="." method="_on_SwordHitbox_area_entered"]
|
BIN
Travesty/Hazards/Piranha/Piranha1.png
Normal file
After Width: | Height: | Size: 42 KiB |
35
Travesty/Hazards/Piranha/Piranha1.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Piranha1.png-bae56f38a929eae66a2103ba57992b06.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Piranha/Piranha1.png"
|
||||||
|
dest_files=[ "res://.import/Piranha1.png-bae56f38a929eae66a2103ba57992b06.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/Hazards/Piranha/Piranha2.png
Normal file
After Width: | Height: | Size: 42 KiB |
35
Travesty/Hazards/Piranha/Piranha2.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Piranha2.png-1c09ad0beb723852e2cc2518a6374b8c.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Hazards/Piranha/Piranha2.png"
|
||||||
|
dest_files=[ "res://.import/Piranha2.png-1c09ad0beb723852e2cc2518a6374b8c.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
|
@ -5,8 +5,10 @@ var fish : Node
|
|||||||
var direction
|
var direction
|
||||||
var projectile = false
|
var projectile = false
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
fish = get_node("/root/Tank/Fish")
|
fish = get_node("/root/Tank/Fish")
|
||||||
|
global_rotation_degrees = rand_range(0, 360)
|
||||||
$AnimatedSprite.frame = choose([0,1,2])
|
$AnimatedSprite.frame = choose([0,1,2])
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Hazards/Squid/Squid2.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/Tentacle.png" type="Texture" id=2]
|
||||||
[ext_resource path="res://Hazards/Squid/Squid.gd" type="Script" id=3]
|
[ext_resource path="res://Hazards/Squid/Squid.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://Tank/Water.png" type="Texture" id=4]
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id=2]
|
[sub_resource type="Animation" id=2]
|
||||||
resource_name = "Stab"
|
resource_name = "Stab"
|
||||||
@ -24,10 +23,6 @@ tracks/0/keys = {
|
|||||||
[node name="Squid" type="Node2D"]
|
[node name="Squid" type="Node2D"]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="DELETEME" type="Sprite" parent="."]
|
|
||||||
texture = ExtResource( 4 )
|
|
||||||
centered = false
|
|
||||||
|
|
||||||
[node name="Tentacle" type="Sprite" parent="."]
|
[node name="Tentacle" type="Sprite" parent="."]
|
||||||
position = Vector2( -900, 0 )
|
position = Vector2( -900, 0 )
|
||||||
texture = ExtResource( 2 )
|
texture = ExtResource( 2 )
|
||||||
|
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 297 KiB |
@ -27,7 +27,7 @@ static func random_position(area: CollisionShape2D) -> Vector2:
|
|||||||
|
|
||||||
|
|
||||||
func _on_HazardTimer_timeout() -> void:
|
func _on_HazardTimer_timeout() -> void:
|
||||||
if phase == Phase.CLEAN or phase == Phase.POISON:
|
if phase == Phase.CLEAN or phase == Phase.POISON or phase == Phase.SQUID:
|
||||||
var poison_scene = load("res://Hazards/Poison/Poison.tscn")
|
var poison_scene = load("res://Hazards/Poison/Poison.tscn")
|
||||||
var poison = poison_scene.instance()
|
var poison = poison_scene.instance()
|
||||||
if phase == Phase.CLEAN:
|
if phase == Phase.CLEAN:
|
||||||
@ -37,6 +37,7 @@ func _on_HazardTimer_timeout() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func blackout() -> void:
|
func blackout() -> void:
|
||||||
|
$Fish/ThoughtBubble.visible = false
|
||||||
if not phase == Phase.START:
|
if not phase == Phase.START:
|
||||||
yield($Fish.go_inside(), "completed")
|
yield($Fish.go_inside(), "completed")
|
||||||
if not modulate == Color(0,0,0,1):
|
if not modulate == Color(0,0,0,1):
|
||||||
@ -48,7 +49,15 @@ func blackout() -> void:
|
|||||||
$House/HouseRight.z_index = $House/HouseLeft.z_index
|
$House/HouseRight.z_index = $House/HouseLeft.z_index
|
||||||
print(phase)
|
print(phase)
|
||||||
if phase == Phase.POISON:
|
if phase == Phase.POISON:
|
||||||
$SurvivePoisonTimer.start()
|
$SurviveTimer.start()
|
||||||
|
if phase == Phase.KNIFE:
|
||||||
|
var fork_scene = load("res://Hazards/Fork/Fork.tscn")
|
||||||
|
var fork = fork_scene.instance()
|
||||||
|
add_child(fork)
|
||||||
|
if phase == Phase.SQUID:
|
||||||
|
var squid_scene = load("res://Hazards/Squid/Squid.tscn")
|
||||||
|
var squid = squid_scene.instance()
|
||||||
|
add_child(squid)
|
||||||
if not phase == Phase.CLEAN:
|
if not phase == Phase.CLEAN:
|
||||||
$Fish.position = $House/RightEntrance.get_global_position() + Vector2(0,-100)
|
$Fish.position = $House/RightEntrance.get_global_position() + Vector2(0,-100)
|
||||||
$Fish.global_rotation_degrees = 180
|
$Fish.global_rotation_degrees = 180
|
||||||
@ -61,6 +70,7 @@ func blackout() -> void:
|
|||||||
$TweenBlackout.start()
|
$TweenBlackout.start()
|
||||||
yield($TweenBlackout, "tween_completed")
|
yield($TweenBlackout, "tween_completed")
|
||||||
$Fish.invincible = false
|
$Fish.invincible = false
|
||||||
|
_think()
|
||||||
|
|
||||||
|
|
||||||
func next_phase() -> void:
|
func next_phase() -> void:
|
||||||
@ -68,8 +78,29 @@ func next_phase() -> void:
|
|||||||
var pellets = get_tree().get_nodes_in_group("Pellets")
|
var pellets = get_tree().get_nodes_in_group("Pellets")
|
||||||
for pellet in pellets:
|
for pellet in pellets:
|
||||||
pellet.queue_free()
|
pellet.queue_free()
|
||||||
|
if phase == Phase.KNIFE: # Clean tank of poison before fork phase
|
||||||
|
var pellets = get_tree().get_nodes_in_group("Pellets")
|
||||||
|
for pellet in pellets:
|
||||||
|
pellet.queue_free()
|
||||||
phase += 1
|
phase += 1
|
||||||
|
|
||||||
|
|
||||||
func _on_SurvivePoisonTimer_timeout() -> void:
|
func _think() -> void:
|
||||||
|
var thought = $Fish/ThoughtBubble/Thought
|
||||||
|
$Fish/ThoughtBubble/ThoughtTimer.start()
|
||||||
|
if phase == Phase.CLEAN:
|
||||||
|
$Fish/ThoughtBubble.visible = true
|
||||||
|
thought.bbcode_text = \
|
||||||
|
"\n[center][tornado]ooOOoo! " + \
|
||||||
|
"Does it really rain yummy treats in here? :D"
|
||||||
|
if phase == Phase.POISON:
|
||||||
|
$Fish/ThoughtBubble.visible = true
|
||||||
|
thought.bbcode_text = \
|
||||||
|
"[center]Wait, something's wrong with these flakes!\n" + \
|
||||||
|
"[shake]Must... resist... eating...!"
|
||||||
|
|
||||||
|
# Tween the $Thought.bbcode_text's percent_visible property
|
||||||
|
|
||||||
|
|
||||||
|
func _on_SurviveTimer_timeout() -> void:
|
||||||
blackout()
|
blackout()
|
||||||
|
@ -128,8 +128,9 @@ position = Vector2( 160, 245 )
|
|||||||
|
|
||||||
[node name="TweenBlackout" type="Tween" parent="."]
|
[node name="TweenBlackout" type="Tween" parent="."]
|
||||||
|
|
||||||
[node name="SurvivePoisonTimer" type="Timer" parent="."]
|
[node name="SurviveTimer" type="Timer" parent="."]
|
||||||
wait_time = 60.0
|
wait_time = 10.0
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
[connection signal="timeout" from="HazardSpawner/HazardTimer" to="." method="_on_HazardTimer_timeout"]
|
[connection signal="timeout" from="HazardSpawner/HazardTimer" to="." method="_on_HazardTimer_timeout"]
|
||||||
[connection signal="timeout" from="SurvivePoisonTimer" to="." method="_on_SurvivePoisonTimer_timeout"]
|
[connection signal="timeout" from="SurviveTimer" to="." method="_on_SurviveTimer_timeout"]
|
||||||
|