redoing abyss

This commit is contained in:
pennyrigate 2023-06-21 22:08:29 -04:00
parent 511a4bfccc
commit 52dd5221b0
9 changed files with 494 additions and 35 deletions

84
objects/enemy/fish.tscn Normal file
View file

@ -0,0 +1,84 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://graphics/enemy/fish.png" type="Texture" id=1]
[ext_resource path="res://objects/enemy/enemy_move_sidesideupdown.gd" type="Script" id=3]
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 11, 10 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 1 )
region = Rect2( 11, 0, 11, 10 )
[sub_resource type="SpriteFrames" id=4]
animations = [ {
"frames": [ SubResource( 6 ), SubResource( 7 ) ],
"loop": true,
"name": "default",
"speed": 7.0
} ]
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 4, 4 )
[sub_resource type="Animation" id=8]
resource_name = "glow"
length = 3.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("AnimatedSprite:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.5, 2.9 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 0.396078, 0.396078, 0.396078, 1 ), Color( 1, 1, 1, 1 ) ]
}
[sub_resource type="Animation" id=9]
resource_name = "bob"
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("AnimatedSprite:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5, 1 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 6 ), Vector2( 0, 2 ), Vector2( 0, 6 ) ]
}
[node name="Fish" type="Node2D" groups=["enemy"]]
script = ExtResource( 3 )
score_for_killing = 15
node_to_flip = NodePath("AnimatedSprite")
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
modulate = Color( 0.830741, 0.830741, 0.830741, 1 )
position = Vector2( 0, 5.79026 )
frames = SubResource( 4 )
frame = 1
playing = true
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2( 0, 4 )
shape = SubResource( 5 )
[node name="GlowAnim" type="AnimationPlayer" parent="."]
autoplay = "glow"
anims/glow = SubResource( 8 )
[node name="BobAnim" type="AnimationPlayer" parent="."]
autoplay = "bob"
anims/bob = SubResource( 9 )
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]

View file

@ -15,7 +15,7 @@ func _physics_process(delta):
if speed > 0.0:
sprite.position.x = sin(lifetime * 4.0) * 4.0
position.y -= speed * delta
func pop():
sprite.frame_coords.y = 1
speed = 0.0

View file

@ -18,6 +18,8 @@ vframes = 2
shape = SubResource( 1 )
[node name="ActivationTimer" type="Timer" parent="."]
wait_time = 0.2
one_shot = true
autostart = true
__meta__ = {
"_editor_description_": "timer until the bubble can be broken by objects other than the player"