diff --git a/Travesty/Fish/Fish.gd b/Travesty/Fish/Fish.gd index 3e03964..78d4257 100644 --- a/Travesty/Fish/Fish.gd +++ b/Travesty/Fish/Fish.gd @@ -5,7 +5,7 @@ export var swim_cooldown = 1 var destination # The position the fish will move to _on_SwimTimer_timeout() var poisoned = false # Used in Hazards/Poison/Poison.gd to determine if fish is dying of poison -var poison_mutation = true # True when fish can eat and shoot poison pellets +var poison_mutation = false # 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 @@ -21,7 +21,6 @@ func _on_SwimTimer_timeout() -> void: 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() - _fire_pellet() func _process(delta: float) -> void: @@ -40,16 +39,16 @@ func _process(delta: float) -> void: global_rotation = angle -func _fire_pellet() -> void: - pellets = 1 # This is just hax so we don't have to eat pellets first to fire them +func fire_pellet() -> void: + var velocity = 4 + #pellets = 1 # This is just hax so we don't have to eat pellets first to fire them 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 get_parent().add_child(poison) # We add this projectile to the /tank/ so they don't move with the fish - poison.position = get_global_position() # 'position' returns the local position, but we need where it's at in relation to the tank - #poison.direction = position.angle_to_point(mouth) - poison.applied_force = 50 * ($Positions/Mouth.get_global_position() - $Positions/Tail.get_global_position()) + 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 diff --git a/Travesty/Fish/Fish.tscn b/Travesty/Fish/Fish.tscn index e87069c..5d7148b 100644 --- a/Travesty/Fish/Fish.tscn +++ b/Travesty/Fish/Fish.tscn @@ -15,6 +15,7 @@ height = 100.0 collision_layer = 2 collision_mask = 28 script = ExtResource( 2 ) +swim_length = 200 [node name="Sprite" type="Sprite" parent="."] position = Vector2( -26, 7 ) diff --git a/Travesty/Hazards/Angler/Angler.png b/Travesty/Hazards/Angler/Angler.png new file mode 100644 index 0000000..8428c2e Binary files /dev/null and b/Travesty/Hazards/Angler/Angler.png differ diff --git a/Travesty/Hazards/Angler/Angler.png.import b/Travesty/Hazards/Angler/Angler.png.import new file mode 100644 index 0000000..b5cc1d6 --- /dev/null +++ b/Travesty/Hazards/Angler/Angler.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Angler.png-6ec52884b9568eb707ea01549882464e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Hazards/Angler/Angler.png" +dest_files=[ "res://.import/Angler.png-6ec52884b9568eb707ea01549882464e.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 diff --git a/Travesty/Hazards/Fork/Fork.gd b/Travesty/Hazards/Fork/Fork.gd index a5cb028..1ba397f 100644 --- a/Travesty/Hazards/Fork/Fork.gd +++ b/Travesty/Hazards/Fork/Fork.gd @@ -6,42 +6,30 @@ var playingforwards = true func _ready() -> void: -# _reposition() -# _rewind() -# print("rewinding") -# yield($AnimationPlayer, "animation_finished") -# print("rewound") -# $Timer.start() - pass - - -func _reposition() -> void: - var tween_duration = 0.5 - $Tween.interpolate_property(self, "position:x", position.x, rand_range(400, 2000), tween_duration, Tween.TRANS_BACK, Tween.EASE_IN_OUT) - $Tween.start() -# yield($Tween, "finished") + $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: - playingforwards = true $AnimationPlayer.play("Stab") -func _rewind() -> void: - if playingforwards: - playingforwards = false - $AnimationPlayer.play_backwards("Stab") - #yield($AnimationPlayer, "animation_finished") - #_reposition() +func _retract() -> void: + $AnimationPlayer.play_backwards("Stab") -#static func random_position(area: CollisionShape2D) -> Vector2: -# var _topleft : Vector2 = area.global_position - area.shape.extents -# var _botright : Vector2 = area.global_position + area.shape.extents -# var _x = rand_range(_topleft.x, _botright.x) -# var _y = rand_range(_topleft.y, _botright.y) -# return Vector2(_x, _y) +func destroy() -> void: + queue_free() diff --git a/Travesty/Hazards/Fork/Fork.tscn b/Travesty/Hazards/Fork/Fork.tscn index b148362..b661571 100644 --- a/Travesty/Hazards/Fork/Fork.tscn +++ b/Travesty/Hazards/Fork/Fork.tscn @@ -1,75 +1,11 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://Hazards/Fork/Fork.gd" type="Script" id=1] [ext_resource path="res://Hazards/Fork/Fork.png" type="Texture" id=2] -[sub_resource type="Animation" id=1] -length = 0.001 -tracks/0/type = "value" -tracks/0/path = NodePath(".: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( 550, 577 ) ] -} -tracks/1/type = "value" -tracks/1/path = NodePath(".:region_rect") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ Rect2( 0, 0, 300, 470 ) ] -} -tracks/2/type = "value" -tracks/2/path = NodePath("ForkAbove:region_enabled") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ true ] -} -tracks/3/type = "value" -tracks/3/path = NodePath("ForkAbove:region_rect") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ Rect2( 200, 410, 300, 100 ) ] -} -tracks/4/type = "value" -tracks/4/path = NodePath("Hitbox:position") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ Vector2( 0, 0 ) ] -} - [sub_resource type="Animation" id=2] resource_name = "Stab" -length = 2.5 -loop = true +length = 0.1 tracks/0/type = "value" tracks/0/path = NodePath(".:region_rect") tracks/0/interp = 2 @@ -77,7 +13,7 @@ tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"times": PoolRealArray( 0, 0.5 ), +"times": PoolRealArray( 0, 0.05 ), "transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ Rect2( 0, -400, 300, 470 ), Rect2( 0, 0, 300, 470 ) ] @@ -89,7 +25,7 @@ tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { -"times": PoolRealArray( 0, 0.5 ), +"times": PoolRealArray( 0, 0.05 ), "transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ Rect2( 200, 10, 300, 100 ), Rect2( 200, 410, 300, 100 ) ] @@ -101,15 +37,9 @@ tracks/2/loop_wrap = true tracks/2/imported = false tracks/2/enabled = true tracks/2/keys = { -"times": PoolRealArray( 1.5, 2 ), -"transitions": PoolRealArray( 1, 1 ), -"values": [ { -"args": [ ], -"method": "_rewind" -}, { -"args": [ ], -"method": "_reposition" -} ] +"times": PoolRealArray( ), +"transitions": PoolRealArray( ), +"values": [ ] } tracks/3/type = "value" tracks/3/path = NodePath("Hitbox:position") @@ -133,20 +63,19 @@ rotation = 3.14159 scale = Vector2( 2, 2 ) texture = ExtResource( 2 ) region_enabled = true -region_rect = Rect2( 0, 0, 300, 470 ) +region_rect = Rect2( 0, -400, 300, 470 ) script = ExtResource( 1 ) [node name="ForkAbove" type="Sprite" parent="."] position = Vector2( 216.5, 286 ) texture = ExtResource( 2 ) region_enabled = true -region_rect = Rect2( 200, 410, 300, 100 ) +region_rect = Rect2( 200, 10, 300, 100 ) [node name="Timer" type="Timer" parent="."] -wait_time = 3.0 +wait_time = 1.75 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -anims/RESET = SubResource( 1 ) anims/Stab = SubResource( 2 ) [node name="Hitbox" type="Area2D" parent="."] diff --git a/Travesty/Hazards/Fork/Fork2.png b/Travesty/Hazards/Fork/Fork2.png new file mode 100644 index 0000000..86755e5 Binary files /dev/null and b/Travesty/Hazards/Fork/Fork2.png differ diff --git a/Travesty/Hazards/Fork/Fork2.png.import b/Travesty/Hazards/Fork/Fork2.png.import new file mode 100644 index 0000000..197f418 --- /dev/null +++ b/Travesty/Hazards/Fork/Fork2.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Fork2.png-8a478081b047ec17166701b7f54f3183.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Hazards/Fork/Fork2.png" +dest_files=[ "res://.import/Fork2.png-8a478081b047ec17166701b7f54f3183.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 diff --git a/Travesty/Hazards/Net/Net_Back.png b/Travesty/Hazards/Net/Net_Back.png new file mode 100644 index 0000000..169b748 Binary files /dev/null and b/Travesty/Hazards/Net/Net_Back.png differ diff --git a/Travesty/Hazards/Net/Net_Back.png.import b/Travesty/Hazards/Net/Net_Back.png.import new file mode 100644 index 0000000..1c37db3 --- /dev/null +++ b/Travesty/Hazards/Net/Net_Back.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Net_Back.png-9c1feac1ac902442a84dc320f1f6bd80.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Hazards/Net/Net_Back.png" +dest_files=[ "res://.import/Net_Back.png-9c1feac1ac902442a84dc320f1f6bd80.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 diff --git a/Travesty/Hazards/Net/Net_In.png b/Travesty/Hazards/Net/Net_In.png new file mode 100644 index 0000000..7852aac Binary files /dev/null and b/Travesty/Hazards/Net/Net_In.png differ diff --git a/Travesty/Hazards/Net/Net_In.png.import b/Travesty/Hazards/Net/Net_In.png.import new file mode 100644 index 0000000..333b221 --- /dev/null +++ b/Travesty/Hazards/Net/Net_In.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Net_In.png-d18f51599943106d5f069fd77ea6f552.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Hazards/Net/Net_In.png" +dest_files=[ "res://.import/Net_In.png-d18f51599943106d5f069fd77ea6f552.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 diff --git a/Travesty/Hazards/Net/Net_Wire.png b/Travesty/Hazards/Net/Net_Wire.png new file mode 100644 index 0000000..91698ad Binary files /dev/null and b/Travesty/Hazards/Net/Net_Wire.png differ diff --git a/Travesty/Hazards/Net/Net_Wire.png.import b/Travesty/Hazards/Net/Net_Wire.png.import new file mode 100644 index 0000000..c5088bc --- /dev/null +++ b/Travesty/Hazards/Net/Net_Wire.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Net_Wire.png-18e86609fc138d882e3facbf07baf735.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Hazards/Net/Net_Wire.png" +dest_files=[ "res://.import/Net_Wire.png-18e86609fc138d882e3facbf07baf735.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 diff --git a/Travesty/Hazards/Poison/Poison.gd b/Travesty/Hazards/Poison/Poison.gd index ff493c8..18ef88b 100644 --- a/Travesty/Hazards/Poison/Poison.gd +++ b/Travesty/Hazards/Poison/Poison.gd @@ -11,12 +11,15 @@ func _ready(): 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: print("A poison pellet has inflicted poison on the fish.") fish.poisoned = true visible = false - $Timer.start() + $PoisonTimer.start() $TweenPoison.interpolate_property(area.get_parent(), "modulate", modulate, 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: @@ -40,11 +43,9 @@ func _on_Timer_timeout() -> void: fish.kill("poison") -func _on_Hitbox_area_exited(area: Area2D) -> void: - if area.is_in_group("Tank"): - queue_free() - - -#func _process(delta: float) -> void: -# if direction: - +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") + queue_free() diff --git a/Travesty/Hazards/Poison/Poison.tscn b/Travesty/Hazards/Poison/Poison.tscn index 78fc36f..a6abeeb 100644 --- a/Travesty/Hazards/Poison/Poison.tscn +++ b/Travesty/Hazards/Poison/Poison.tscn @@ -27,6 +27,7 @@ script = ExtResource( 4 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="."] frames = SubResource( 1 ) +frame = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2( 1.5, 1 ) @@ -37,16 +38,22 @@ shape = SubResource( 2 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] shape = SubResource( 3 ) -[node name="Timer" type="Timer" parent="."] +[node name="PoisonTimer" type="Timer" parent="."] wait_time = 2.0 one_shot = true +[node name="DissolveTimer" type="Timer" parent="."] +wait_time = 5.0 + [node name="TweenPoison" type="Tween" parent="."] [node name="TweenEat" type="Tween" parent="."] [node name="TweenShoot" type="Tween" parent="."] +[node name="TweenDissolve" type="Tween" parent="."] + +[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="area_exited" from="Hitbox" to="." method="_on_Hitbox_area_exited"] -[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] +[connection signal="timeout" from="PoisonTimer" to="." method="_on_Timer_timeout"] +[connection signal="timeout" from="DissolveTimer" to="." method="_on_DissolveTimer_timeout"] diff --git a/Travesty/Hazards/Squid/Squid.gd b/Travesty/Hazards/Squid/Squid.gd new file mode 100644 index 0000000..f251c4a --- /dev/null +++ b/Travesty/Hazards/Squid/Squid.gd @@ -0,0 +1,9 @@ +extends Node2D + +func _ready(): + $AnimationPlayer.play("Stab") + + +func _on_Hitbox_area_entered(area: Area2D) -> void: + if area.is_in_group("Fish"): + area.kill() diff --git a/Travesty/Hazards/Squid/Squid.png b/Travesty/Hazards/Squid/Squid.png new file mode 100644 index 0000000..cfd9cd6 Binary files /dev/null and b/Travesty/Hazards/Squid/Squid.png differ diff --git a/Travesty/Hazards/Squid/Squid.png.import b/Travesty/Hazards/Squid/Squid.png.import new file mode 100644 index 0000000..3c2849a --- /dev/null +++ b/Travesty/Hazards/Squid/Squid.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Squid.png-d016bed38f0e8c49ef493ff64346623c.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Hazards/Squid/Squid.png" +dest_files=[ "res://.import/Squid.png-d016bed38f0e8c49ef493ff64346623c.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 diff --git a/Travesty/Hazards/Squid/Squid.tscn b/Travesty/Hazards/Squid/Squid.tscn new file mode 100644 index 0000000..060b5f0 --- /dev/null +++ b/Travesty/Hazards/Squid/Squid.tscn @@ -0,0 +1,61 @@ +[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/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 ) ] +} + +[sub_resource type="Animation" id=2] +resource_name = "Stab" +tracks/0/type = "value" +tracks/0/path = NodePath("Tentacle:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ -900.0, 0.0 ] +} + +[node name="Squid" type="Node2D"] +script = ExtResource( 3 ) + +[node name="Tentacle" type="Sprite" parent="."] +position = Vector2( -900, 0 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) +centered = false +__meta__ = { +"_edit_lock_": true +} + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/RESET = SubResource( 3 ) +anims/Stab = SubResource( 2 ) + +[node name="Hitbox" type="Area2D" parent="."] + +[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 ) + +[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"] diff --git a/Travesty/Hazards/Squid/Tentacle.png b/Travesty/Hazards/Squid/Tentacle.png new file mode 100644 index 0000000..1f0f2b5 Binary files /dev/null and b/Travesty/Hazards/Squid/Tentacle.png differ diff --git a/Travesty/Hazards/Squid/Tentacle.png.import b/Travesty/Hazards/Squid/Tentacle.png.import new file mode 100644 index 0000000..dbe7497 --- /dev/null +++ b/Travesty/Hazards/Squid/Tentacle.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Tentacle.png-af9185c6632e1f03b289a907df6da6b0.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Hazards/Squid/Tentacle.png" +dest_files=[ "res://.import/Tentacle.png-af9185c6632e1f03b289a907df6da6b0.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 diff --git a/Travesty/MainMenu/Menu.png b/Travesty/MainMenu/Menu.png new file mode 100644 index 0000000..99d6edb Binary files /dev/null and b/Travesty/MainMenu/Menu.png differ diff --git a/Travesty/MainMenu/Menu.png.import b/Travesty/MainMenu/Menu.png.import new file mode 100644 index 0000000..8b3fe64 --- /dev/null +++ b/Travesty/MainMenu/Menu.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Menu.png-0a51769c4b134ccb3205f75d5359c8b2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://MainMenu/Menu.png" +dest_files=[ "res://.import/Menu.png-0a51769c4b134ccb3205f75d5359c8b2.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 diff --git a/Travesty/Tank/Background.png b/Travesty/Tank/Background.png new file mode 100644 index 0000000..ebc9f5c Binary files /dev/null and b/Travesty/Tank/Background.png differ diff --git a/Travesty/Tank/Background.png.import b/Travesty/Tank/Background.png.import new file mode 100644 index 0000000..913bd17 --- /dev/null +++ b/Travesty/Tank/Background.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Background.png-14a6d6d691773bc24cc08d2942b2f99e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Tank/Background.png" +dest_files=[ "res://.import/Background.png-14a6d6d691773bc24cc08d2942b2f99e.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 diff --git a/Travesty/Tank/Castle_Left.png b/Travesty/Tank/Castle_Left.png new file mode 100644 index 0000000..706d5de Binary files /dev/null and b/Travesty/Tank/Castle_Left.png differ diff --git a/Travesty/Tank/Castle_Left.png.import b/Travesty/Tank/Castle_Left.png.import new file mode 100644 index 0000000..0cdbd7d --- /dev/null +++ b/Travesty/Tank/Castle_Left.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Castle_Left.png-f97b9ec37f152374cad2f149e7292134.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Tank/Castle_Left.png" +dest_files=[ "res://.import/Castle_Left.png-f97b9ec37f152374cad2f149e7292134.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 diff --git a/Travesty/Tank/Castle_Right.png b/Travesty/Tank/Castle_Right.png new file mode 100644 index 0000000..590da0c Binary files /dev/null and b/Travesty/Tank/Castle_Right.png differ diff --git a/Travesty/Tank/Castle_Right.png.import b/Travesty/Tank/Castle_Right.png.import new file mode 100644 index 0000000..e5dc740 --- /dev/null +++ b/Travesty/Tank/Castle_Right.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Castle_Right.png-9b5a745734b15e929ca664c0d4ba6780.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Tank/Castle_Right.png" +dest_files=[ "res://.import/Castle_Right.png-9b5a745734b15e929ca664c0d4ba6780.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 diff --git a/Travesty/Tank/Gravel.png b/Travesty/Tank/Gravel.png new file mode 100644 index 0000000..3a739e8 Binary files /dev/null and b/Travesty/Tank/Gravel.png differ diff --git a/Travesty/Tank/Gravel.png.import b/Travesty/Tank/Gravel.png.import new file mode 100644 index 0000000..8f60d95 --- /dev/null +++ b/Travesty/Tank/Gravel.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Gravel.png-2d277cfc025abafffd6631eb0fdeacc2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Tank/Gravel.png" +dest_files=[ "res://.import/Gravel.png-2d277cfc025abafffd6631eb0fdeacc2.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 diff --git a/Travesty/Tank/Tank.gd b/Travesty/Tank/Tank.gd index 57b89db..1d825ab 100644 --- a/Travesty/Tank/Tank.gd +++ b/Travesty/Tank/Tank.gd @@ -10,6 +10,11 @@ func _ready() -> void: add_child(key) +func _input(event: InputEvent) -> void: + if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and event.pressed: + $Fish.fire_pellet() # Fire a pellet if appropriate and able + + static func random_position(area: CollisionShape2D) -> Vector2: var _topleft : Vector2 = area.global_position - area.shape.extents var _botright : Vector2 = area.global_position + area.shape.extents diff --git a/Travesty/Tank/Tank.tscn b/Travesty/Tank/Tank.tscn index 7ce69ca..ea7ab96 100644 --- a/Travesty/Tank/Tank.tscn +++ b/Travesty/Tank/Tank.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://Tank/AquariumBG.jpg" type="Texture" id=1] [ext_resource path="res://Tank/Tank.gd" type="Script" id=2] @@ -14,6 +14,9 @@ extents = Vector2( 960, 20 ) [sub_resource type="RectangleShape2D" id=3] extents = Vector2( 860, 50 ) +[sub_resource type="RectangleShape2D" id=4] +extents = Vector2( 960, 10 ) + [node name="Tank" type="Node2D"] script = ExtResource( 2 ) @@ -64,4 +67,10 @@ position = Vector2( 596, 543 ) [node name="Fork" parent="." instance=ExtResource( 3 )] +[node name="TankFloor" type="Area2D" parent="." groups=["TankFloor"]] +position = Vector2( 960, 1070 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="TankFloor"] +shape = SubResource( 4 ) + [connection signal="timeout" from="HazardSpawner/HazardTimer" to="." method="_on_HazardTimer_timeout"] diff --git a/Travesty/Tank/Travis.png b/Travesty/Tank/Travis.png new file mode 100644 index 0000000..c2611d6 Binary files /dev/null and b/Travesty/Tank/Travis.png differ diff --git a/Travesty/Tank/Travis.png.import b/Travesty/Tank/Travis.png.import new file mode 100644 index 0000000..05c2a91 --- /dev/null +++ b/Travesty/Tank/Travis.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Travis.png-cefb1b9ae7120ff2ed6561a288786fdc.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Tank/Travis.png" +dest_files=[ "res://.import/Travis.png-cefb1b9ae7120ff2ed6561a288786fdc.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 diff --git a/Travesty/Tank/Water.png b/Travesty/Tank/Water.png new file mode 100644 index 0000000..340c29a Binary files /dev/null and b/Travesty/Tank/Water.png differ diff --git a/Travesty/Tank/Water.png.import b/Travesty/Tank/Water.png.import new file mode 100644 index 0000000..52c3b26 --- /dev/null +++ b/Travesty/Tank/Water.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Water.png-8a5e7ff60840a8b1a84704e094a76c1c.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Tank/Water.png" +dest_files=[ "res://.import/Water.png-8a5e7ff60840a8b1a84704e094a76c1c.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 diff --git a/Travesty/fork.zip b/Travesty/fork.zip new file mode 100644 index 0000000..17e0b81 Binary files /dev/null and b/Travesty/fork.zip differ diff --git a/Travesty/project.godot b/Travesty/project.godot index c156bef..a044d12 100644 --- a/Travesty/project.godot +++ b/Travesty/project.godot @@ -22,6 +22,14 @@ window/size/resizable=false window/stretch/mode="2d" window/stretch/aspect="keep" +[input] + +dash={ +"deadzone": 0.5, +"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) + ] +} + [layer_names] 2d_physics/layer_2="Fish"