From 53bae7b10910ddeb6a43bf9b795fafbc27563636 Mon Sep 17 00:00:00 2001 From: OddlyTimbot Date: Mon, 25 Aug 2025 21:09:19 -0400 Subject: [PATCH] coins, parralax background, terrains, physics layer --- .../backgrounds/forestbackground.png | Bin 0 -> 7521 bytes .../backgrounds/forestbackground.png.import | 34 ++ .../graphics/environment/backgrounds/sky.png | Bin 0 -> 652 bytes .../environment/backgrounds/sky.png.import | 34 ++ .../environment/backgrounds/trees.png | Bin 0 -> 1999 bytes .../environment/backgrounds/trees.png.import | 34 ++ .../environment/terrain/mushroom_32x64.png | Bin 0 -> 2290 bytes .../terrain/mushroom_32x64.png.import | 34 ++ .../environment/terrain/veg_32x32.png | Bin 0 -> 675 bytes .../environment/terrain/veg_32x32.png.import | 34 ++ assets/graphics/objects/crate.png | Bin 0 -> 1761 bytes assets/graphics/objects/crate.png.import | 34 ++ assets/graphics/pickups/coin.png | Bin 0 -> 500 bytes assets/graphics/pickups/coin.png.import | 34 ++ assets/graphics/projectiles/pixel_bullet.png | Bin 0 -> 3870 bytes .../projectiles/pixel_bullet.png.import | 34 ++ project.godot | 8 + scenes/bullet.tscn | 10 +- scenes/coin.gd | 7 + scenes/coin.gd.uid | 1 + scenes/coin.tscn | 114 +++++ scenes/crate.tscn | 9 +- scenes/game.tscn | 396 +++++++++++++++++- scenes/player.tscn | 3 + scripts/bullet.gd | 5 + scripts/gamecontroller.gd | 3 + scripts/scene_manager.gd | 5 + 27 files changed, 817 insertions(+), 16 deletions(-) create mode 100644 assets/graphics/environment/backgrounds/forestbackground.png create mode 100644 assets/graphics/environment/backgrounds/forestbackground.png.import create mode 100644 assets/graphics/environment/backgrounds/sky.png create mode 100644 assets/graphics/environment/backgrounds/sky.png.import create mode 100644 assets/graphics/environment/backgrounds/trees.png create mode 100644 assets/graphics/environment/backgrounds/trees.png.import create mode 100644 assets/graphics/environment/terrain/mushroom_32x64.png create mode 100644 assets/graphics/environment/terrain/mushroom_32x64.png.import create mode 100644 assets/graphics/environment/terrain/veg_32x32.png create mode 100644 assets/graphics/environment/terrain/veg_32x32.png.import create mode 100644 assets/graphics/objects/crate.png create mode 100644 assets/graphics/objects/crate.png.import create mode 100644 assets/graphics/pickups/coin.png create mode 100644 assets/graphics/pickups/coin.png.import create mode 100644 assets/graphics/projectiles/pixel_bullet.png create mode 100644 assets/graphics/projectiles/pixel_bullet.png.import create mode 100644 scenes/coin.gd create mode 100644 scenes/coin.gd.uid create mode 100644 scenes/coin.tscn diff --git a/assets/graphics/environment/backgrounds/forestbackground.png b/assets/graphics/environment/backgrounds/forestbackground.png new file mode 100644 index 0000000000000000000000000000000000000000..975c185ca0a69fb6d672f68b36f8df4fe31d28b9 GIT binary patch literal 7521 zcmc(E`#+O^_&-HTO2@ZD==>InbP~2v@^*@0W)V|_kmDRTBlRvRImC$ADls-Jr^L(> z!jkZUg ziwZ2En)@$od^>3pR(?WrybyZs<}+KZ%DHc?$vWb|PH3v=xadE=Z+zBzXtWNj;w9~L7No9rdG<+D zvJ1>5W+Er>^S8^5UYhz~mB0Vu`WIK~YQ0rnITCz}9@?hRqfN}IzV4SV>&Hx^UVKZ3 zWz^XCDF&Z+-*f2Jxx)7^4n4Z%!>}kz`NVx2A6qz<*^-|^-2G3Iboz%I0UHgXQU0Tn z;mLpB9Z8hT)k)&&?vM(PL(+rmlU4CCJ2r4}T9hdr#^Wq-5Ani<5UDl)oeGQ#)&o1W zBOb@8n_QcEK8Zg&8S+h_gofxM(*;9_oPfR@>tXK4>okL2&w`E#DKpsw5@Q4tWjGvO>T6Pi30zl-P)E$v!0^A$33uBPj`E2}y|q#{Y}c|8)cZrzig} z9Qx1R0pphv|GUff|HG^Q@bG`b;<1Rh<13srgro!{H|LE6RIf(@28A(!d;tZhmi)!J zWYDX^XP#GE;z;aw_9N1L|8Q0!6Gc!XJQ_V6PJYd}OJev}3`Ex?oxZzWQ#rwEr&afh z6}UN{^QXY81wv*iV?Hu@D|caD^sci&tR|cSS6|!$ibp#9rK$B19Alo>D=duulf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M4kYDA7zER{`(E8g zzFS7yzpoh!p3uHy51tPnzO;hZC2mdcZizvQI@sp%rl+oHjTsY z(Y;L(ZJR5Re>NSz-afzZ`XNHK&his>^&27dS!F7fL)pG)#-GcTu(C@abn!To=zBY?vw#*%0eN+Z`Sf*FbAD54+zeB6vYo;yt01Ks`00h`k z4w6>?0fIjxeK0WJCC!z6e>9Sya~4%WND!@xyHj!%$y&^@+6F01zdiJw zbN-aW)0gVA)2zjTMTz{4Axc4q)*_^X;-iq9>eH8Zc96;Ole1d%E~vw8 z*p-+gEpN)+qf3OyJOP74z=eV5!1B6yl8+G>)Ow4)HcH5qq@&`6ui;C;NX66sovKq+ zw-x}&mm)$p>ercY`q|zQ=J<1|i(pII=caVD(aEziPOLrUO)=nm#992_jXqSocsD{u u(P*k@(6Tzzcde>MIk~R^699v!tDnm{r-UW|>)dmc literal 0 HcmV?d00001 diff --git a/assets/graphics/environment/backgrounds/sky.png.import b/assets/graphics/environment/backgrounds/sky.png.import new file mode 100644 index 0000000..55ac426 --- /dev/null +++ b/assets/graphics/environment/backgrounds/sky.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://s14ukqbx5mtf" +path="res://.godot/imported/sky.png-b132b9e240387925c40cca10d1d14c56.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/environment/backgrounds/sky.png" +dest_files=["res://.godot/imported/sky.png-b132b9e240387925c40cca10d1d14c56.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/environment/backgrounds/trees.png b/assets/graphics/environment/backgrounds/trees.png new file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ej^ktzS0O!B~2n`6l@m;EB3eKUY`((iqqxL28f=_i%;vL>4 zic|WLVlsww5@mN&X~EF+Bvc6085H@1ZPtxzHm3}b-EF%2MsiXqZ4@96}JDuSj76zOsV7H|k5$io(KXPvmSK_0X)RuCnIUS!#gExoBF%4hXM0uD!nVT3szO!m4- zw7eEb?O^i$PX8lcvb52x>=;k86Q@1pL_J67hLCuAUX2V$$;4_RQ3L^@Q!q6Q;*7mS zvO9GQb4PyUZZT_rW`a`yABgEUwz~13=c#)f)Nd{}wRJrAQm6XS{8;)Tqg(_n=VBIw zBCB+W>m96c=;1DQxW#CaGt49h#xZsd>p%(!+=Kn@_aa#;Ao^)H$sb6)ZViz-v-VZ@t~P^5ToV;8u5|TnVW+ss#S5BgV-D9ZwnCjP+;N_{H!3 z_`rkhca!wYZ$@+D0Poq{{^4KS{o`{l1yV|+lqflCQc|4Q{84T7)Nfp;7JT!iE8YnK ziP9e0^Uz)a58J92_QR*7aBf3dJJj zN`-2*iVy-P6h+^Etp5idi+~gor8HV=gb*mDkW&8d2+W$Ho6U*ylJ=NtBu@qIv3EWt z0-O^#C-C1VV6C+$C(z;MneUFS?wj|VG3KcgkW#9XA#^qci=#1m{(XF3>r>a4M+(0A z(iLfpS=hL^ac{m>E{6o=GJZJg1-W%psucik-|F)G*Iypz@Be89Dg z{8GvJzE8>bXH#;X69fSzzbGn!7PoJ8UtNE8jptu|CBFW-;pFr9H?ZB9LhknQuK)l5 M07*qoM6N<$g3`D(6aWAK literal 0 HcmV?d00001 diff --git a/assets/graphics/environment/terrain/mushroom_32x64.png.import b/assets/graphics/environment/terrain/mushroom_32x64.png.import new file mode 100644 index 0000000..9efe631 --- /dev/null +++ b/assets/graphics/environment/terrain/mushroom_32x64.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cy0lgun8t11xv" +path="res://.godot/imported/mushroom_32x64.png-cefb137d64a82ca31a8f0068d916c09f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/environment/terrain/mushroom_32x64.png" +dest_files=["res://.godot/imported/mushroom_32x64.png-cefb137d64a82ca31a8f0068d916c09f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/environment/terrain/veg_32x32.png b/assets/graphics/environment/terrain/veg_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..4e09fa94c72733804bbf24e8b93c93c7daf096c0 GIT binary patch literal 675 zcmV;U0$lxxP)EX>4Tx04R}tkv&MmKpe$iTcsiu5i5!~WT;Lph>AFB6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jf7n~Gbq{ROvg%&X$9QWhhy~o`#<}3IpJ#@RbZVYBOe_@ISZ-rhG*sd#;)tSZl<&{D ztZ?4qtd^^+c~AbrP)=J}<~q$0B(R7jh!7y7iW17O5TjKi#YBqs;~xHD$1jpgCRYiJ z91EyGh2;3b|KNAGW`1(QO$x<<&KKMM7zKj6K%-{c-^aGyH~|9Bz?IhWSL(pbC+W48 z7C8cXw}Ff6mL~53mpj1FlP(#OBL!&s^LgO?jJ_!g^xp#AYi@7NeVjf3Y3eF@0~{Oz zV+G1y_jq?#dvE`qY4-O6go1LeRQ&;x00006VoOIv0RI600RN!9r;`8x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru=>riLDmieSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{004VQL_t(o!|ju?4Zt7_1PueQT$ad4EWvVFfK*5>Yzf;q zY5pn-!u{hw1ONa4006+xlv4-w(dJs;*Hb5K$3aK5xV}Y5s6Pw5~a#BWiLE#M?t^`K{fyY002ov JPDHLkV1hjJ7cT$+ literal 0 HcmV?d00001 diff --git a/assets/graphics/environment/terrain/veg_32x32.png.import b/assets/graphics/environment/terrain/veg_32x32.png.import new file mode 100644 index 0000000..e8b531f --- /dev/null +++ b/assets/graphics/environment/terrain/veg_32x32.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dvn642wmhcrfc" +path="res://.godot/imported/veg_32x32.png-4b0b47ef99f3aa28e8f24956e44a31a5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/environment/terrain/veg_32x32.png" +dest_files=["res://.godot/imported/veg_32x32.png-4b0b47ef99f3aa28e8f24956e44a31a5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/objects/crate.png b/assets/graphics/objects/crate.png new file mode 100644 index 0000000000000000000000000000000000000000..2b8bdcd0c0b752f7079f09620a2121e2f556f925 GIT binary patch literal 1761 zcmeAS@N?(olHy`uVBq!ia0y~yV66aQ7G|Kx3)K}YKuS8mC&ZPJk@4EviZj!bwidfg zOR#ARv&?lj3p3XP%3l(wOM?7@862M7NMm4NEAe!345_&F=3paGhM{4>-<9Gk znLx}@fG-5n-t%Qiw=HDgiN4G+!%1VxA&nj<%_&X>BHo%UP8u@~@xA||ayrX=Yw@c0 zyIl&!e2eOzewl*LKoaCON2))%{^Iur)(-I_+>c!MD8vcqcZh#%s&L!`7OCC(ZT*}5 z6@oy)Bi%qjko+T7n7sAUX?G5p-eFs}u-+`;_)!!EU@agc55!z6;G16XZ)x!P7yfz& z#SLsLu^Sin_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pu5F^J3Vl83e316j`$SI)UaG;=)8K_KQf{;PX%3Uq04h;;9 zhoABSWf~m34iqeXB{YozsD)>`IY@>{lkxD>Ro)RGlMQ0-fn-Jv8x6D3q%mZ((;cB7 z*X`^7RJ}fsU;E?y|G#VfYgYaLr(gej$Cv#(_3dk8ivGR6zrObVa;K7+m5tv2m1l)B zeW+(VT>4Fd=laa~ms#q>fCa%pU7$$!>)HI$>x}J}b4uvtKiJmraF_45ZsxYvXU=Cb zwVjsUp_{NHZ?fb%W25DqHOdd%Tjh>|b)D|#I=^F%+K1IZMTd8&0u>bk73o1ti8)X( zSMrxE*rq>yFhhRIUYDGCnFS9gl1jP;MDDwzHG&+h;K+2GdvZU3J3 zw12hxb6V2B``5mvhX2KG3zs(cw7q7~FSt^`>Lv8Ckn!+WidJRfU>Qme)IV_W1S8ZsAl~#Tk^0= z?0Z4Z;jacO)_ZeEtaI^g(~i1a-k-Z;pY=xj2dzwPuUnVKbUw+C37=y3Kb`0L^Y=G+ z_k&CePu#KSsIAQH0$ZL}uZ5V}v;!y0i@Ih1dbg4Hdb#>H_B{ay3ifW8qCN3X@9VBh z&;R#4{Pjn6_d@E4JM4U?x{DjexYzKxv;OJTj+%qvj{WveUbCOuKj-7`(|>;e zD^V>PX7iQjS%3-a{%e2fb=Sj7L@prwy6%`+O!(4S^NnN9-dkb^ zj`#KUxjW+GF9tdsEC&>94-xA_0#h3)i=JcjDe~5+4o##d7kGB`Ri9ff) z$|Sz-*N>{Fg|UD4Y2SZp%%a8Aw))Z)?;@#no0Zn_^**#JF8fu?EwS$W-S>~T8^@$C zfn)`HZVA2j52gXL$I-86+j+rB8(6&-L?0-)tM>aS$SJ_246K9i0CU#%lRV(0zEAMO zVyFH`U|mn$Thn9wgnxtr6(!yQ*4x{602NKY4639H^b&TQ void: + print("coin collision") + coinCollectedSignal.emit(body, self) diff --git a/scenes/coin.gd.uid b/scenes/coin.gd.uid new file mode 100644 index 0000000..ed9a714 --- /dev/null +++ b/scenes/coin.gd.uid @@ -0,0 +1 @@ +uid://nqigicsb4oqh diff --git a/scenes/coin.tscn b/scenes/coin.tscn new file mode 100644 index 0000000..04e0c2a --- /dev/null +++ b/scenes/coin.tscn @@ -0,0 +1,114 @@ +[gd_scene load_steps=17 format=3 uid="uid://bfvm14fearqvq"] + +[ext_resource type="Script" uid="uid://nqigicsb4oqh" path="res://scenes/coin.gd" id="1_i64fm"] +[ext_resource type="Texture2D" uid="uid://b22ko1chbu1t2" path="res://assets/graphics/pickups/coin.png" id="2_11l1o"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_d14el"] +atlas = ExtResource("2_11l1o") +region = Rect2(0, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1ikuy"] +atlas = ExtResource("2_11l1o") +region = Rect2(16, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wnlwo"] +atlas = ExtResource("2_11l1o") +region = Rect2(32, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jig8b"] +atlas = ExtResource("2_11l1o") +region = Rect2(48, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xmuha"] +atlas = ExtResource("2_11l1o") +region = Rect2(64, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kfxoj"] +atlas = ExtResource("2_11l1o") +region = Rect2(80, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jsmju"] +atlas = ExtResource("2_11l1o") +region = Rect2(96, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s0mny"] +atlas = ExtResource("2_11l1o") +region = Rect2(112, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7cc30"] +atlas = ExtResource("2_11l1o") +region = Rect2(128, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rojmm"] +atlas = ExtResource("2_11l1o") +region = Rect2(144, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ls27i"] +atlas = ExtResource("2_11l1o") +region = Rect2(160, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ssuvv"] +atlas = ExtResource("2_11l1o") +region = Rect2(176, 0, 16, 16) + +[sub_resource type="SpriteFrames" id="SpriteFrames_6jg3o"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_d14el") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1ikuy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wnlwo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jig8b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xmuha") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kfxoj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jsmju") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s0mny") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7cc30") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rojmm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ls27i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ssuvv") +}], +"loop": true, +"name": &"idle", +"speed": 12.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_rsyy1"] +radius = 5.0 + +[node name="Coin" type="Area2D"] +script = ExtResource("1_i64fm") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_6jg3o") +animation = &"idle" +autoplay = "idle" +frame_progress = 0.364422 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_rsyy1") + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/scenes/crate.tscn b/scenes/crate.tscn index 74ae50b..c75291b 100644 --- a/scenes/crate.tscn +++ b/scenes/crate.tscn @@ -1,14 +1,19 @@ -[gd_scene load_steps=3 format=3 uid="uid://dlihpyr58tqqq"] +[gd_scene load_steps=4 format=3 uid="uid://dlihpyr58tqqq"] [ext_resource type="Script" uid="uid://c5gjsxgxmjfki" path="res://scripts/crate.gd" id="1_b66cd"] +[ext_resource type="Texture2D" uid="uid://bnhycmkyqxdiu" path="res://assets/graphics/objects/crate.png" id="2_dwt0d"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_uwrxv"] [node name="Crate" type="RigidBody2D" groups=["pushables", "shootables"]] -rotation = -0.301036 script = ExtResource("1_b66cd") metadata/_edit_group_ = true +[node name="Sprite2D" type="Sprite2D" parent="."] +texture_filter = 1 +scale = Vector2(0.08, 0.08) +texture = ExtResource("2_dwt0d") + [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_uwrxv") debug_color = Color(0.817443, 0.400008, 0.177458, 0.42) diff --git a/scenes/game.tscn b/scenes/game.tscn index 3547036..f0561a0 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -1,67 +1,410 @@ -[gd_scene load_steps=12 format=3 uid="uid://coiqh7p31ukig"] +[gd_scene load_steps=18 format=4 uid="uid://coiqh7p31ukig"] [ext_resource type="Script" uid="uid://bblqtronap0j4" path="res://scripts/gamecontroller.gd" id="1_lnu2h"] [ext_resource type="PackedScene" uid="uid://dlihpyr58tqqq" path="res://scenes/crate.tscn" id="2_lbhrr"] [ext_resource type="PackedScene" uid="uid://boqg1nyudmkh4" path="res://scenes/player.tscn" id="2_lnu2h"] [ext_resource type="Script" uid="uid://d1daji4xwuj03" path="res://scripts/scene_manager.gd" id="2_p57ef"] -[ext_resource type="PackedScene" uid="uid://csotsc2cycyia" path="res://scenes/trigger.tscn" id="2_yqjtg"] +[ext_resource type="Texture2D" uid="uid://s14ukqbx5mtf" path="res://assets/graphics/environment/backgrounds/sky.png" id="3_0tnpc"] [ext_resource type="Texture2D" uid="uid://bqe3w5v76lyek" path="res://assets/graphics/environment/terrain/Terrain (32x32).png" id="3_u5sy4"] -[ext_resource type="PackedScene" uid="uid://dopt3unflv7l3" path="res://scenes/bullet.tscn" id="5_iywne"] +[ext_resource type="Texture2D" uid="uid://l4a5qfhhue26" path="res://assets/graphics/environment/backgrounds/forestbackground.png" id="4_vtaks"] +[ext_resource type="Texture2D" uid="uid://dv63a7rb24ob8" path="res://assets/graphics/environment/backgrounds/trees.png" id="5_kvpfn"] +[ext_resource type="Texture2D" uid="uid://dvn642wmhcrfc" path="res://assets/graphics/environment/terrain/veg_32x32.png" id="5_vtaks"] +[ext_resource type="Texture2D" uid="uid://cy0lgun8t11xv" path="res://assets/graphics/environment/terrain/mushroom_32x64.png" id="6_kvpfn"] +[ext_resource type="PackedScene" uid="uid://bfvm14fearqvq" path="res://scenes/coin.tscn" id="11_kvpfn"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"] texture = ExtResource("3_u5sy4") texture_region_size = Vector2i(32, 32) 0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrain = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 0.526663, -1.31666, -0.26333, -1.84332, 16, -16, 16) +0:0/0/terrains_peering_bit/right_side = 0 +0:0/0/terrains_peering_bit/bottom_right_corner = 0 +0:0/0/terrains_peering_bit/bottom_side = 0 1:0/0 = 0 +1:0/0/terrain_set = 0 +1:0/0/terrain = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -0.26333, -16, 0) +1:0/0/terrains_peering_bit/right_side = 0 +1:0/0/terrains_peering_bit/bottom_right_corner = 0 +1:0/0/terrains_peering_bit/bottom_side = 0 +1:0/0/terrains_peering_bit/bottom_left_corner = 0 +1:0/0/terrains_peering_bit/left_side = 0 2:0/0 = 0 +2:0/0/terrain_set = 0 +2:0/0/terrain = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -0.789993, 16, -0.26873, -0.129454, -16, 0) +2:0/0/terrains_peering_bit/bottom_side = 0 +2:0/0/terrains_peering_bit/bottom_left_corner = 0 +2:0/0/terrains_peering_bit/left_side = 0 4:0/0 = 0 +4:0/0/terrain_set = 0 +4:0/0/terrain = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +4:0/0/terrains_peering_bit/bottom_side = 0 6:0/0 = 0 +6:0/0/terrain_set = 0 +6:0/0/terrain = 0 +6:0/0/terrains_peering_bit/right_side = 0 +6:0/0/terrains_peering_bit/bottom_side = 0 +6:0/0/terrains_peering_bit/bottom_left_corner = 0 +6:0/0/terrains_peering_bit/left_side = 0 +6:0/0/terrains_peering_bit/top_left_corner = 0 +6:0/0/terrains_peering_bit/top_side = 0 +6:0/0/terrains_peering_bit/top_right_corner = 0 7:0/0 = 0 +7:0/0/terrain_set = 0 +7:0/0/terrain = 0 +7:0/0/terrains_peering_bit/right_side = 0 +7:0/0/terrains_peering_bit/bottom_right_corner = 0 +7:0/0/terrains_peering_bit/bottom_side = 0 +7:0/0/terrains_peering_bit/left_side = 0 +7:0/0/terrains_peering_bit/top_left_corner = 0 +7:0/0/terrains_peering_bit/top_side = 0 +7:0/0/terrains_peering_bit/top_right_corner = 0 9:0/0 = 0 +9:0/0/terrain_set = 0 +9:0/0/terrain = 0 +9:0/0/terrains_peering_bit/right_side = 0 +9:0/0/terrains_peering_bit/bottom_right_corner = 0 +9:0/0/terrains_peering_bit/bottom_side = 0 +9:0/0/terrains_peering_bit/bottom_left_corner = 0 +9:0/0/terrains_peering_bit/left_side = 0 +9:0/0/terrains_peering_bit/top_side = 0 10:0/0 = 0 +10:0/0/terrain_set = 0 +10:0/0/terrain = 0 +10:0/0/terrains_peering_bit/right_side = 0 +10:0/0/terrains_peering_bit/bottom_side = 0 +10:0/0/terrains_peering_bit/bottom_left_corner = 0 +10:0/0/terrains_peering_bit/left_side = 0 +10:0/0/terrains_peering_bit/top_left_corner = 0 +10:0/0/terrains_peering_bit/top_side = 0 12:0/0 = 0 +12:0/0/terrain_set = 0 +12:0/0/terrain = 0 +12:0/0/terrains_peering_bit/right_side = 0 +12:0/0/terrains_peering_bit/bottom_right_corner = 0 +12:0/0/terrains_peering_bit/bottom_side = 0 +12:0/0/terrains_peering_bit/left_side = 0 +12:0/0/terrains_peering_bit/top_side = 0 13:0/0 = 0 +13:0/0/terrain_set = 0 +13:0/0/terrain = 0 +13:0/0/terrains_peering_bit/right_side = 0 +13:0/0/terrains_peering_bit/bottom_side = 0 +13:0/0/terrains_peering_bit/bottom_left_corner = 0 +13:0/0/terrains_peering_bit/left_side = 0 +13:0/0/terrains_peering_bit/top_side = 0 15:0/0 = 0 +15:0/0/terrain_set = 0 +15:0/0/terrain = 0 +15:0/0/terrains_peering_bit/right_side = 0 +15:0/0/terrains_peering_bit/bottom_side = 0 +15:0/0/terrains_peering_bit/left_side = 0 +15:0/0/terrains_peering_bit/top_side = 0 0:1/0 = 0 +0:1/0/terrain_set = 0 +0:1/0/terrain = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 1.31666, -16, 1.05332, 16) +0:1/0/terrains_peering_bit/right_side = 0 +0:1/0/terrains_peering_bit/bottom_right_corner = 0 +0:1/0/terrains_peering_bit/bottom_side = 0 +0:1/0/terrains_peering_bit/top_side = 0 +0:1/0/terrains_peering_bit/top_right_corner = 0 1:1/0 = 0 +1:1/0/terrain_set = 0 +1:1/0/terrain = 0 +1:1/0/terrains_peering_bit/right_side = 0 +1:1/0/terrains_peering_bit/bottom_right_corner = 0 +1:1/0/terrains_peering_bit/bottom_side = 0 +1:1/0/terrains_peering_bit/bottom_left_corner = 0 +1:1/0/terrains_peering_bit/left_side = 0 +1:1/0/terrains_peering_bit/top_left_corner = 0 +1:1/0/terrains_peering_bit/top_side = 0 +1:1/0/terrains_peering_bit/top_right_corner = 0 2:1/0 = 0 +2:1/0/terrain_set = 0 +2:1/0/terrain = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-1.31666, -16, 16, -16, 16, 16, -0.789993, 16) +2:1/0/terrains_peering_bit/bottom_side = 0 +2:1/0/terrains_peering_bit/bottom_left_corner = 0 +2:1/0/terrains_peering_bit/left_side = 0 +2:1/0/terrains_peering_bit/top_left_corner = 0 +2:1/0/terrains_peering_bit/top_side = 0 4:1/0 = 0 +4:1/0/terrain_set = 0 +4:1/0/terrain = 0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +4:1/0/terrains_peering_bit/bottom_side = 0 +4:1/0/terrains_peering_bit/top_side = 0 6:1/0 = 0 +6:1/0/terrain_set = 0 +6:1/0/terrain = 0 +6:1/0/terrains_peering_bit/right_side = 0 +6:1/0/terrains_peering_bit/bottom_right_corner = 0 +6:1/0/terrains_peering_bit/bottom_side = 0 +6:1/0/terrains_peering_bit/bottom_left_corner = 0 +6:1/0/terrains_peering_bit/left_side = 0 +6:1/0/terrains_peering_bit/top_left_corner = 0 +6:1/0/terrains_peering_bit/top_side = 0 7:1/0 = 0 +7:1/0/terrain_set = 0 +7:1/0/terrain = 0 +7:1/0/terrains_peering_bit/right_side = 0 +7:1/0/terrains_peering_bit/bottom_right_corner = 0 +7:1/0/terrains_peering_bit/bottom_side = 0 +7:1/0/terrains_peering_bit/bottom_left_corner = 0 +7:1/0/terrains_peering_bit/left_side = 0 +7:1/0/terrains_peering_bit/top_side = 0 +7:1/0/terrains_peering_bit/top_right_corner = 0 9:1/0 = 0 +9:1/0/terrain_set = 0 +9:1/0/terrain = 0 +9:1/0/terrains_peering_bit/right_side = 0 +9:1/0/terrains_peering_bit/bottom_right_corner = 0 +9:1/0/terrains_peering_bit/bottom_side = 0 +9:1/0/terrains_peering_bit/left_side = 0 +9:1/0/terrains_peering_bit/top_side = 0 +9:1/0/terrains_peering_bit/top_right_corner = 0 10:1/0 = 0 +10:1/0/terrain_set = 0 +10:1/0/terrain = 0 +10:1/0/terrains_peering_bit/right_side = 0 +10:1/0/terrains_peering_bit/bottom_side = 0 +10:1/0/terrains_peering_bit/left_side = 0 +10:1/0/terrains_peering_bit/top_left_corner = 0 +10:1/0/terrains_peering_bit/top_side = 0 +10:1/0/terrains_peering_bit/top_right_corner = 0 12:1/0 = 0 +12:1/0/terrain_set = 0 +12:1/0/terrain = 0 +12:1/0/terrains_peering_bit/right_side = 0 +12:1/0/terrains_peering_bit/bottom_side = 0 +12:1/0/terrains_peering_bit/left_side = 0 +12:1/0/terrains_peering_bit/top_side = 0 +12:1/0/terrains_peering_bit/top_right_corner = 0 13:1/0 = 0 +13:1/0/terrain_set = 0 +13:1/0/terrain = 0 +13:1/0/terrains_peering_bit/right_side = 0 +13:1/0/terrains_peering_bit/bottom_side = 0 +13:1/0/terrains_peering_bit/left_side = 0 +13:1/0/terrains_peering_bit/top_left_corner = 0 +13:1/0/terrains_peering_bit/top_side = 0 15:1/0 = 0 +15:1/0/terrain_set = 0 +15:1/0/terrain = 0 +15:1/0/terrains_peering_bit/right_side = 0 +15:1/0/terrains_peering_bit/bottom_side = 0 +15:1/0/terrains_peering_bit/bottom_left_corner = 0 +15:1/0/terrains_peering_bit/left_side = 0 +15:1/0/terrains_peering_bit/top_side = 0 +15:1/0/terrains_peering_bit/top_right_corner = 0 16:1/0 = 0 +16:1/0/terrain_set = 0 +16:1/0/terrain = 0 +16:1/0/terrains_peering_bit/right_side = 0 +16:1/0/terrains_peering_bit/bottom_right_corner = 0 +16:1/0/terrains_peering_bit/bottom_side = 0 +16:1/0/terrains_peering_bit/left_side = 0 +16:1/0/terrains_peering_bit/top_left_corner = 0 +16:1/0/terrains_peering_bit/top_side = 0 0:2/0 = 0 +0:2/0/terrain_set = 0 +0:2/0/terrain = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, 3.94997, 16, 16, -16, 16, -16, -16, 1.31666, -16, 0.789993, 3.68664) +0:2/0/terrains_peering_bit/right_side = 0 +0:2/0/terrains_peering_bit/top_side = 0 +0:2/0/terrains_peering_bit/top_right_corner = 0 1:2/0 = 0 +1:2/0/terrain_set = 0 +1:2/0/terrain = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, 1.84332, 16, 16, -16, 16, -16, 1.57999) +1:2/0/terrains_peering_bit/right_side = 0 +1:2/0/terrains_peering_bit/left_side = 0 +1:2/0/terrains_peering_bit/top_left_corner = 0 +1:2/0/terrains_peering_bit/top_side = 0 +1:2/0/terrains_peering_bit/top_right_corner = 0 2:2/0 = 0 +2:2/0/terrain_set = 0 +2:2/0/terrain = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-1.31666, -16, 16, -16, 16, 16, -16, 16, -16, 1.57999, 0.526663, 1.84332) +2:2/0/terrains_peering_bit/left_side = 0 +2:2/0/terrains_peering_bit/top_left_corner = 0 +2:2/0/terrains_peering_bit/top_side = 0 4:2/0 = 0 +4:2/0/terrain_set = 0 +4:2/0/terrain = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +4:2/0/terrains_peering_bit/top_side = 0 6:3/0 = 0 +6:3/0/terrain_set = 0 +6:3/0/terrain = 0 +6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 0.26333, -16, 0.789993, 16) +6:3/0/terrains_peering_bit/right_side = 0 +6:3/0/terrains_peering_bit/bottom_side = 0 +6:3/0/terrains_peering_bit/top_side = 0 +6:3/0/terrains_peering_bit/top_right_corner = 0 7:3/0 = 0 +7:3/0/terrain_set = 0 +7:3/0/terrain = 0 +7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(1.31666, 16, 1.31666, -16, 16, -16, 16, 16) +7:3/0/terrains_peering_bit/bottom_side = 0 +7:3/0/terrains_peering_bit/left_side = 0 +7:3/0/terrains_peering_bit/top_left_corner = 0 +7:3/0/terrains_peering_bit/top_side = 0 9:3/0 = 0 +9:3/0/terrain_set = 0 +9:3/0/terrain = 0 +9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 0.526663, -16, -16, 16, -16, 16, -0.26333) +9:3/0/terrains_peering_bit/right_side = 0 +9:3/0/terrains_peering_bit/bottom_side = 0 +9:3/0/terrains_peering_bit/bottom_left_corner = 0 +9:3/0/terrains_peering_bit/left_side = 0 10:3/0 = 0 +10:3/0/terrain_set = 0 +10:3/0/terrain = 0 +10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 0.526663, -16, -16, 16, -16, 16, -0.26333) +10:3/0/terrains_peering_bit/right_side = 0 +10:3/0/terrains_peering_bit/bottom_right_corner = 0 +10:3/0/terrains_peering_bit/bottom_side = 0 +10:3/0/terrains_peering_bit/left_side = 0 12:3/0 = 0 +12:3/0/terrain_set = 0 +12:3/0/terrain = 0 +12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +12:3/0/terrains_peering_bit/right_side = 0 +12:3/0/terrains_peering_bit/bottom_side = 0 +12:3/0/terrains_peering_bit/top_side = 0 13:3/0 = 0 +13:3/0/terrain_set = 0 +13:3/0/terrain = 0 +13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +13:3/0/terrains_peering_bit/right_side = 0 +13:3/0/terrains_peering_bit/bottom_side = 0 +13:3/0/terrains_peering_bit/left_side = 0 15:3/0 = 0 +15:3/0/terrain_set = 0 +15:3/0/terrain = 0 +15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +15:3/0/terrains_peering_bit/right_side = 0 +15:3/0/terrains_peering_bit/bottom_side = 0 16:3/0 = 0 +16:3/0/terrain_set = 0 +16:3/0/terrain = 0 +16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +16:3/0/terrains_peering_bit/bottom_side = 0 +16:3/0/terrains_peering_bit/left_side = 0 0:4/0 = 0 +0:4/0/terrain_set = 0 +0:4/0/terrain = 0 +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -6.58328, 16, -16, 5.26662) +0:4/0/terrains_peering_bit/right_side = 0 1:4/0 = 0 +1:4/0/terrain_set = 0 +1:4/0/terrain = 0 +1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:4/0/terrains_peering_bit/right_side = 0 +1:4/0/terrains_peering_bit/left_side = 0 2:4/0 = 0 +2:4/0/terrain_set = 0 +2:4/0/terrain = 0 +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 7.37327, 7.6366, 16, -16, 16) +2:4/0/terrains_peering_bit/left_side = 0 4:4/0 = 0 +4:4/0/terrain_set = 0 +4:4/0/terrain = 0 +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 6:4/0 = 0 +6:4/0/terrain_set = 0 +6:4/0/terrain = 0 +6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 0.26333, -16, 0.789993, 16) +6:4/0/terrains_peering_bit/right_side = 0 +6:4/0/terrains_peering_bit/bottom_right_corner = 0 +6:4/0/terrains_peering_bit/bottom_side = 0 +6:4/0/terrains_peering_bit/top_side = 0 7:4/0 = 0 +7:4/0/terrain_set = 0 +7:4/0/terrain = 0 +7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(1.31666, 16, 1.31666, -16, 16, -16, 16, 16) +7:4/0/terrains_peering_bit/bottom_side = 0 +7:4/0/terrains_peering_bit/bottom_left_corner = 0 +7:4/0/terrains_peering_bit/left_side = 0 +7:4/0/terrains_peering_bit/top_side = 0 9:4/0 = 0 +9:4/0/terrain_set = 0 +9:4/0/terrain = 0 +9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, 1.05333, 16, 0.526663, 16, 16) +9:4/0/terrains_peering_bit/right_side = 0 +9:4/0/terrains_peering_bit/left_side = 0 +9:4/0/terrains_peering_bit/top_left_corner = 0 +9:4/0/terrains_peering_bit/top_side = 0 10:4/0 = 0 +10:4/0/terrain_set = 0 +10:4/0/terrain = 0 +10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, 1.05333, 16, 0.526663, 16, 16) +10:4/0/terrains_peering_bit/right_side = 0 +10:4/0/terrains_peering_bit/left_side = 0 +10:4/0/terrains_peering_bit/top_side = 0 +10:4/0/terrains_peering_bit/top_right_corner = 0 12:4/0 = 0 +12:4/0/terrain_set = 0 +12:4/0/terrain = 0 +12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +12:4/0/terrains_peering_bit/right_side = 0 +12:4/0/terrains_peering_bit/left_side = 0 +12:4/0/terrains_peering_bit/top_side = 0 13:4/0 = 0 +13:4/0/terrain_set = 0 +13:4/0/terrain = 0 +13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +13:4/0/terrains_peering_bit/bottom_side = 0 +13:4/0/terrains_peering_bit/left_side = 0 +13:4/0/terrains_peering_bit/top_side = 0 15:4/0 = 0 +15:4/0/terrain_set = 0 +15:4/0/terrain = 0 +15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +15:4/0/terrains_peering_bit/right_side = 0 +15:4/0/terrains_peering_bit/top_side = 0 16:4/0 = 0 +16:4/0/terrain_set = 0 +16:4/0/terrain = 0 +16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, -16, -16, 16, -16, 16, 16) +16:4/0/terrains_peering_bit/left_side = 0 +16:4/0/terrains_peering_bit/top_side = 0 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_dinhu"] +texture = ExtResource("5_vtaks") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrain = 1 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_kvuet"] +texture = ExtResource("6_kvpfn") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrains_peering_bit/bottom_side = 1 +0:1/0 = 0 +0:1/0/terrain_set = 0 +0:1/0/terrain = 1 +0:1/0/terrains_peering_bit/top_side = 1 [sub_resource type="TileSet" id="TileSet_0tnpc"] tile_size = Vector2i(32, 32) +physics_layer_0/collision_layer = 1 +terrain_set_0/mode = 0 +terrain_set_0/terrain_0/name = "leafydirt" +terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1) +terrain_set_0/terrain_1/name = "veg" +terrain_set_0/terrain_1/color = Color(0.5, 0.4375, 0.25, 1) sources/0 = SubResource("TileSetAtlasSource_gee14") +sources/1 = SubResource("TileSetAtlasSource_dinhu") +sources/2 = SubResource("TileSetAtlasSource_kvuet") [sub_resource type="RectangleShape2D" id="RectangleShape2D_8cj0n"] size = Vector2(44, 20) @@ -75,13 +418,38 @@ script = ExtResource("1_lnu2h") unique_name_in_owner = true script = ExtResource("2_p57ef") +[node name="skylayer" type="Parallax2D" parent="."] +repeat_size = Vector2(320, 180) + +[node name="Sprite2D" type="Sprite2D" parent="skylayer"] +position = Vector2(160, 90) +texture = ExtResource("3_0tnpc") + +[node name="farlayer" type="Parallax2D" parent="."] +scroll_scale = Vector2(1.2, 1) +repeat_size = Vector2(320, 0) + +[node name="Sprite2D" type="Sprite2D" parent="farlayer"] +texture_filter = 1 +position = Vector2(160, 320) +texture = ExtResource("4_vtaks") + +[node name="Midlayer" type="Parallax2D" parent="."] +scroll_scale = Vector2(1.4, 1) +repeat_size = Vector2(320, 0) + +[node name="Sprite2D" type="Sprite2D" parent="Midlayer"] +texture_filter = 1 +position = Vector2(160, 330) +texture = ExtResource("5_kvpfn") + [node name="TileMapLayer" type="TileMapLayer" parent="."] texture_filter = 1 -tile_map_data = PackedByteArray(0, 0, 17, 0, 12, 0, 0, 0, 4, 0, 4, 0, 0, 0, 18, 0, 12, 0, 0, 0, 4, 0, 4, 0, 0, 0) +tile_map_data = PackedByteArray("AAAOAAsAAAACAAAAAAANAAsAAAAAAAAAAAAMAAkAAAAEAAQAAAAOAA4AAAACAAIAAAANAA4AAAAAAAIAAAAMABAAAAAEAAQAAAAWAAsAAAACAAIAAAAVAAsAAAAAAAIAAAAVAAoAAAAAAAAAAAAWAAoAAAACAAAAAAATAAkAAAACAAQAAAASAAkAAAABAAQAAAARAAkAAAAAAAQAAAASAAsAAQAAAAAAAAANAAoAAQAAAAAAAAATAAgAAQAAAAAAAAAVAAkAAQAAAAAAAAAWAAkAAgAAAAEAAAAWAAgAAgAAAAAAAAAHAA0AAAAAAAIAAAAIAA0AAAABAAIAAAAJAA0AAAABAAIAAAAKAA0AAAAHAAAAAAAKAA4AAAAAAAIAAAALAA4AAAACAAIAAAAMAA0AAAABAAIAAAANAA0AAAAHAAAAAAAOAA0AAAAGAAAAAAAPAA0AAAABAAIAAAAQAA0AAAABAAIAAAARAA0AAAABAAIAAAASAA0AAAABAAIAAAATAA0AAAABAAIAAAAUAA0AAAACAAIAAAAUAAwAAAACAAAAAAATAAwAAAABAAAAAAASAAwAAAABAAAAAAAQAAwAAAABAAAAAAAPAAwAAAABAAAAAAAOAAwAAAAGAAEAAAANAAwAAAAHAAEAAAAMAAwAAAABAAAAAAALAA0AAAAGAAAAAAALAAwAAAABAAAAAAAKAAwAAAABAAAAAAAJAAwAAAABAAAAAAAIAAwAAAABAAAAAAAHAAwAAAAAAAAAAAARAAwAAAABAAAAAAA=") tile_set = SubResource("TileSet_0tnpc") [node name="StaticBody2D" type="StaticBody2D" parent="."] -position = Vector2(567, 395) +position = Vector2(743, 490) metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] @@ -98,15 +466,17 @@ metadata/_edit_group_ = true shape = SubResource("WorldBoundaryShape2D_8cj0n") [node name="Player" parent="." instance=ExtResource("2_lnu2h")] -position = Vector2(566, 374) - -[node name="Bullet" parent="." instance=ExtResource("5_iywne")] -position = Vector2(351, 312) +position = Vector2(563, 364) [node name="triggers" type="Node2D" parent="."] -[node name="player_hurt" parent="triggers" instance=ExtResource("2_yqjtg")] -position = Vector2(428, 547) -effect = "player_hurt" +[node name="coins" type="Node2D" parent="."] -[connection signal="areaTriggerSignal" from="triggers/player_hurt" to="." method="_on_trigger"] +[node name="Coin" parent="coins" instance=ExtResource("11_kvpfn")] +position = Vector2(606, 375) + +[node name="Coin2" parent="coins" instance=ExtResource("11_kvpfn")] +position = Vector2(395, 282) + +[node name="Coin3" parent="coins" instance=ExtResource("11_kvpfn")] +position = Vector2(703, 313) diff --git a/scenes/player.tscn b/scenes/player.tscn index 10209ee..c3b0ba3 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -208,4 +208,7 @@ sprite_frames = SubResource("SpriteFrames_jej6c") animation = &"fall" autoplay = "idle" +[node name="Camera2D" type="Camera2D" parent="."] +offset = Vector2(0, -40) + [connection signal="animation_finished" from="PlayerGraphic" to="." method="_on_animation_finished"] diff --git a/scripts/bullet.gd b/scripts/bullet.gd index 57a32a7..0e36f23 100644 --- a/scripts/bullet.gd +++ b/scripts/bullet.gd @@ -1,4 +1,5 @@ class_name Bullet extends Area2D +@onready var bullet_graphic: Sprite2D = $BulletGraphic var speed:float = 700 @@ -6,6 +7,10 @@ signal bulletDamageSignal(body, bullet) func setSpeed(value:float): speed = value + if value<0: + bullet_graphic.flip_h = true + if value>0: + bullet_graphic.flip_h = false func _physics_process(delta: float) -> void: position += transform.x * speed * delta diff --git a/scripts/gamecontroller.gd b/scripts/gamecontroller.gd index 86b9cfb..4fcac18 100644 --- a/scripts/gamecontroller.gd +++ b/scripts/gamecontroller.gd @@ -25,3 +25,6 @@ func bulletDamage(body, bullet): print("GC know about bullet hit") body.queue_free() +func coinCollected(body, coin): + print("GC knows coin collected") + diff --git a/scripts/scene_manager.gd b/scripts/scene_manager.gd index 83bdede..f32695b 100644 --- a/scripts/scene_manager.gd +++ b/scripts/scene_manager.gd @@ -4,6 +4,7 @@ var totalAllowedBullets = 7 var bullet = preload("res://scenes/bullet.tscn") @onready var game: Node2D = $".." @onready var triggers: Node2D = $"../triggers" +@onready var coins: Node2D = $"../coins" # Called when the node enters the scene tree for the first time. func _ready() -> void: @@ -11,6 +12,10 @@ func _ready() -> void: for obj in triggers.get_children(): if obj is Trigger: obj.areaTriggerSignal.connect(game._on_trigger) + if coins: + for obj in coins.get_children(): + if obj is Coin: + obj.coinCollectedSignal.connect(game.coinCollected) # Called every frame. 'delta' is the elapsed time since the previous frame.