From 002184cc6424f2bd73b77e2ce6ececfd738d9f53 Mon Sep 17 00:00:00 2001 From: pennyrigate Date: Tue, 21 Mar 2023 15:39:01 -0400 Subject: [PATCH] coins are now keys --- autoloads/debug.gd | 4 +- graphics/collectibles/30385.png | Bin 1947 -> 1965 bytes graphics/collectibles/key.png | Bin 0 -> 224 bytes graphics/collectibles/key.png.import | 35 +++++++++++++++ objects/collectibles/gold.tscn | 62 ++++++++++++++++++++------- 5 files changed, 83 insertions(+), 18 deletions(-) create mode 100644 graphics/collectibles/key.png create mode 100644 graphics/collectibles/key.png.import diff --git a/autoloads/debug.gd b/autoloads/debug.gd index 6df80a7..ef5bc8d 100644 --- a/autoloads/debug.gd +++ b/autoloads/debug.gd @@ -106,8 +106,8 @@ func _enter_code(): "30385": for gold in get_tree().get_nodes_in_group("gold"): var goldsprite = gold.get_node("AnimatedSprite") - goldsprite.frames = preload("res://graphics/collectibles/30385_frames.tres") - goldsprite.position.y -= 2 + goldsprite.play("30385") + goldsprite.position.y -= 1 #goldsprite.material.set_shader_param("palette",load("res://graphics/collectibles/pal_star_green.png")) "1989": for enemy in get_tree().get_nodes_in_group("enemy"): diff --git a/graphics/collectibles/30385.png b/graphics/collectibles/30385.png index 173f2d10d146d1d6aed3e94efd02030546986079..1b0793ff8ea8b2e9d1299357dbda2a53f57b5acc 100644 GIT binary patch delta 192 zcmV;x06+hm53LW783+ad005(R?k}++lmQWNNLh0L01m(a01m(bYSxJfv+4m;1%H1@ zL_t(IPh%KVVEHTWTTmumK#4jgC=Hhc(Q2a1U@?4vTy-#ez!u{&1g3}(AVnR_9=MNT z049OYG01ZG)SdnBhgA*)z!pb}ZB+x&AcY{B5Wr;^K7j5B3?IV)F2m8qiB$&!#*CZ5 uo@4~`pa9*+Fh%Hq8tQQRc$fkP1{DBK2}w4;?fP*50000KbwDoBnLAC1H+V+aU^izEsdL`ofZ-E_L5dIpzev&mozk3M-c_P@U7Vs_nw;Ju8EkO8;H4{#1^_ XZ^oN%SF!~IEo1O>^>bP0l+XkK<4!=i diff --git a/graphics/collectibles/key.png b/graphics/collectibles/key.png new file mode 100644 index 0000000000000000000000000000000000000000..4d4e600af2fd0532b3b84509ffc818e6e340ca72 GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^20+Zo!3-pwSH@oeQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{174DbnY{r{%_`!#hSFZfh-B9LM(3Gxg6|DWOdDPEvj2F?PH$YKTtzQZ8Q zcszea3Q#c6)5S4FBY3aBwb%gzj-Yq-FO*z=?ON(B%VM7p^g}`{XisJOX=U^FKG1Lm MPgg&ebxsLQ0P37eRsaA1 literal 0 HcmV?d00001 diff --git a/graphics/collectibles/key.png.import b/graphics/collectibles/key.png.import new file mode 100644 index 0000000..d3ff0a2 --- /dev/null +++ b/graphics/collectibles/key.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/key.png-224908b8fd999e59db3c3688c6a274a1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/collectibles/key.png" +dest_files=[ "res://.import/key.png-224908b8fd999e59db3c3688c6a274a1.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/objects/collectibles/gold.tscn b/objects/collectibles/gold.tscn index 5fc3c33..d431723 100644 --- a/objects/collectibles/gold.tscn +++ b/objects/collectibles/gold.tscn @@ -1,33 +1,61 @@ -[gd_scene load_steps=11 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://objects/collectibles/gold.gd" type="Script" id=1] -[ext_resource path="res://shaders/recolor_border.shader" type="Shader" id=2] -[ext_resource path="res://graphics/collectibles/coin.png" type="Texture" id=3] -[ext_resource path="res://graphics/collectibles/pal_gold.png" type="Texture" id=4] +[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=2] +[ext_resource path="res://graphics/collectibles/30385.png" type="Texture" id=3] +[ext_resource path="res://graphics/collectibles/key.png" type="Texture" id=4] -[sub_resource type="ShaderMaterial" id=1] +[sub_resource type="ShaderMaterial" id=7] shader = ExtResource( 2 ) shader_param/border_color = Color( 0, 0, 0, 1 ) shader_param/border_corners = false -shader_param/palette = ExtResource( 4 ) -[sub_resource type="AtlasTexture" id=2] +[sub_resource type="AtlasTexture" id=14] atlas = ExtResource( 3 ) -region = Rect2( 0, 0, 8, 8 ) +region = Rect2( 0, 0, 10, 10 ) -[sub_resource type="AtlasTexture" id=3] +[sub_resource type="AtlasTexture" id=15] atlas = ExtResource( 3 ) -region = Rect2( 8, 0, 8, 8 ) +region = Rect2( 10, 0, 10, 10 ) -[sub_resource type="AtlasTexture" id=4] +[sub_resource type="AtlasTexture" id=16] atlas = ExtResource( 3 ) -region = Rect2( 16, 0, 8, 8 ) +region = Rect2( 20, 0, 10, 10 ) + +[sub_resource type="AtlasTexture" id=8] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 8, 9 ) + +[sub_resource type="AtlasTexture" id=9] +atlas = ExtResource( 4 ) +region = Rect2( 8, 0, 8, 9 ) + +[sub_resource type="AtlasTexture" id=10] +atlas = ExtResource( 4 ) +region = Rect2( 16, 0, 8, 9 ) + +[sub_resource type="AtlasTexture" id=11] +atlas = ExtResource( 4 ) +region = Rect2( 24, 0, 8, 9 ) + +[sub_resource type="AtlasTexture" id=12] +atlas = ExtResource( 4 ) +region = Rect2( 32, 0, 8, 9 ) + +[sub_resource type="AtlasTexture" id=13] +atlas = ExtResource( 4 ) +region = Rect2( 40, 0, 8, 9 ) [sub_resource type="SpriteFrames" id=5] animations = [ { -"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 3 ) ], +"frames": [ SubResource( 14 ), SubResource( 15 ), SubResource( 16 ) ], "loop": true, -"name": "default", +"name": "30385", +"speed": 5.0 +}, { +"frames": [ SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 11 ), SubResource( 13 ), SubResource( 9 ) ], +"loop": true, +"name": "key", "speed": 7.0 } ] @@ -38,9 +66,11 @@ extents = Vector2( 4, 4 ) script = ExtResource( 1 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="."] -material = SubResource( 1 ) +material = SubResource( 7 ) +position = Vector2( 0, -1 ) frames = SubResource( 5 ) -frame = 2 +animation = "key" +frame = 3 playing = true centered = false