diff --git a/graphics/collectibles/30385.png b/graphics/collectibles/30385.png new file mode 100644 index 0000000..e7db99b Binary files /dev/null and b/graphics/collectibles/30385.png differ diff --git a/graphics/collectibles/30385.png.import b/graphics/collectibles/30385.png.import new file mode 100644 index 0000000..2d67f82 --- /dev/null +++ b/graphics/collectibles/30385.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/30385.png-9122911304de10ffd2e6de6f7a4ee4c1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/collectibles/30385.png" +dest_files=[ "res://.import/30385.png-9122911304de10ffd2e6de6f7a4ee4c1.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=false +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/graphics/collectibles/30385_frames.tres b/graphics/collectibles/30385_frames.tres new file mode 100644 index 0000000..1dba474 --- /dev/null +++ b/graphics/collectibles/30385_frames.tres @@ -0,0 +1,27 @@ +[gd_resource type="SpriteFrames" load_steps=6 format=2] + +[ext_resource path="res://graphics/collectibles/30385.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 8, 8 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 8, 0, 8, 8 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 16, 0, 8, 8 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 8, 8 ) + +[resource] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ], +"loop": true, +"name": "default", +"speed": 7.0 +} ] diff --git a/objects/collectibles/gold.tscn b/objects/collectibles/gold.tscn index da68c02..eafd580 100644 --- a/objects/collectibles/gold.tscn +++ b/objects/collectibles/gold.tscn @@ -34,13 +34,13 @@ animations = [ { [sub_resource type="RectangleShape2D" id=6] extents = Vector2( 4, 4 ) -[node name="Gold" type="Node2D"] +[node name="Gold" type="Node2D" groups=["gold"]] script = ExtResource( 1 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="."] material = SubResource( 1 ) frames = SubResource( 5 ) -frame = 1 +frame = 2 playing = true centered = false diff --git a/scripts/debug.gd b/scripts/debug.gd index 21fb8f0..77fda4c 100644 --- a/scripts/debug.gd +++ b/scripts/debug.gd @@ -111,7 +111,8 @@ func _on_entry(): func _enter_code(): match code: "30385": - Debug.print("Woohoo crystals!") + for gold in get_tree().get_nodes_in_group("gold"): + gold.get_node("AnimatedSprite").frames = preload("res://graphics/collectibles/30385_frames.tres") "1989": Game.play_sound(Game.a_die, Game.ac_die) for enemy in get_tree().get_nodes_in_group("enemy"):