diff --git a/Assets/Graphics/enviroment/background/forestbackground.png b/Assets/Graphics/enviroment/background/forestbackground.png new file mode 100644 index 0000000..975c185 Binary files /dev/null and b/Assets/Graphics/enviroment/background/forestbackground.png differ diff --git a/Assets/Graphics/enviroment/background/forestbackground.png.import b/Assets/Graphics/enviroment/background/forestbackground.png.import new file mode 100644 index 0000000..2e7e9a3 --- /dev/null +++ b/Assets/Graphics/enviroment/background/forestbackground.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://w62il58d617g" +path="res://.godot/imported/forestbackground.png-1996071babebb2de396ad42966aaeac1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/enviroment/background/forestbackground.png" +dest_files=["res://.godot/imported/forestbackground.png-1996071babebb2de396ad42966aaeac1.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/enviroment/background/sky.jpg b/Assets/Graphics/enviroment/background/sky.jpg new file mode 100644 index 0000000..6ad6314 Binary files /dev/null and b/Assets/Graphics/enviroment/background/sky.jpg differ diff --git a/Assets/Graphics/enviroment/background/sky.jpg.import b/Assets/Graphics/enviroment/background/sky.jpg.import new file mode 100644 index 0000000..d0f0982 --- /dev/null +++ b/Assets/Graphics/enviroment/background/sky.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dapn4g7r8lgb3" +path="res://.godot/imported/sky.jpg-bfe642478fbe5639d4dd8ac70de039f1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/enviroment/background/sky.jpg" +dest_files=["res://.godot/imported/sky.jpg-bfe642478fbe5639d4dd8ac70de039f1.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/enviroment/terrain/mushroom_32x64.png b/Assets/Graphics/enviroment/terrain/mushroom_32x64.png new file mode 100644 index 0000000..9dca2d0 Binary files /dev/null and b/Assets/Graphics/enviroment/terrain/mushroom_32x64.png differ diff --git a/Assets/Graphics/enviroment/terrain/mushroom_32x64.png.import b/Assets/Graphics/enviroment/terrain/mushroom_32x64.png.import new file mode 100644 index 0000000..d1e8e31 --- /dev/null +++ b/Assets/Graphics/enviroment/terrain/mushroom_32x64.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://chy5tdt4bih6r" +path="res://.godot/imported/mushroom_32x64.png-c96e45183947204f9f15e88c7f262021.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/enviroment/terrain/mushroom_32x64.png" +dest_files=["res://.godot/imported/mushroom_32x64.png-c96e45183947204f9f15e88c7f262021.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/enviroment/terrain/veg_32x32.png b/Assets/Graphics/enviroment/terrain/veg_32x32.png new file mode 100644 index 0000000..4e09fa9 Binary files /dev/null and b/Assets/Graphics/enviroment/terrain/veg_32x32.png differ diff --git a/Assets/Graphics/enviroment/terrain/veg_32x32.png.import b/Assets/Graphics/enviroment/terrain/veg_32x32.png.import new file mode 100644 index 0000000..faae5f6 --- /dev/null +++ b/Assets/Graphics/enviroment/terrain/veg_32x32.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cwm0axsi3jqvf" +path="res://.godot/imported/veg_32x32.png-1849b489a47cbd65b283289f9793be0f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/enviroment/terrain/veg_32x32.png" +dest_files=["res://.godot/imported/veg_32x32.png-1849b489a47cbd65b283289f9793be0f.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/coin.png b/Assets/Graphics/objects/coin.png new file mode 100644 index 0000000..01ae33d Binary files /dev/null and b/Assets/Graphics/objects/coin.png differ diff --git a/Assets/Graphics/objects/coin.png.import b/Assets/Graphics/objects/coin.png.import new file mode 100644 index 0000000..f0a20d8 --- /dev/null +++ b/Assets/Graphics/objects/coin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cv4sgj8r6e4js" +path="res://.godot/imported/coin.png-aaef8781449ca33fd9c437cade612749.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/objects/coin.png" +dest_files=["res://.godot/imported/coin.png-aaef8781449ca33fd9c437cade612749.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 0000000..2b8bdcd Binary files /dev/null and b/Assets/Graphics/objects/crate.png differ diff --git a/Assets/Graphics/objects/crate.png.import b/Assets/Graphics/objects/crate.png.import new file mode 100644 index 0000000..37b46d2 --- /dev/null +++ b/Assets/Graphics/objects/crate.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cehj0lmdp5oh5" +path="res://.godot/imported/crate.png-9c90bcef31e79608ac5ed13d02b050c8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/objects/crate.png" +dest_files=["res://.godot/imported/crate.png-9c90bcef31e79608ac5ed13d02b050c8.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/pixel_bullet.png b/Assets/Graphics/objects/pixel_bullet.png new file mode 100644 index 0000000..900d030 Binary files /dev/null and b/Assets/Graphics/objects/pixel_bullet.png differ diff --git a/Assets/Graphics/objects/pixel_bullet.png.import b/Assets/Graphics/objects/pixel_bullet.png.import new file mode 100644 index 0000000..1a29f3c --- /dev/null +++ b/Assets/Graphics/objects/pixel_bullet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dynmuqsc4iqxu" +path="res://.godot/imported/pixel_bullet.png-ef02598064d2e53925a54d45ef2ed17e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/objects/pixel_bullet.png" +dest_files=["res://.godot/imported/pixel_bullet.png-ef02598064d2e53925a54d45ef2ed17e.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/veg_32x32.png b/Assets/Graphics/veg_32x32.png new file mode 100644 index 0000000..4e09fa9 Binary files /dev/null and b/Assets/Graphics/veg_32x32.png differ diff --git a/Assets/Graphics/veg_32x32.png.import b/Assets/Graphics/veg_32x32.png.import new file mode 100644 index 0000000..d40dedb --- /dev/null +++ b/Assets/Graphics/veg_32x32.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dosxmr42k5cv7" +path="res://.godot/imported/veg_32x32.png-a69ef60ce21771684943293834bd2eb4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/veg_32x32.png" +dest_files=["res://.godot/imported/veg_32x32.png-a69ef60ce21771684943293834bd2eb4.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/Scenes/bullet.tscn b/Scenes/bullet.tscn index c61f5e8..20adbaa 100644 --- a/Scenes/bullet.tscn +++ b/Scenes/bullet.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=3 uid="uid://clevnux6u2ybx"] +[gd_scene load_steps=4 format=3 uid="uid://clevnux6u2ybx"] [ext_resource type="Script" uid="uid://bsrl75gqbvfkf" path="res://Scripts/bullet.gd" id="1_xjght"] +[ext_resource type="Texture2D" uid="uid://dynmuqsc4iqxu" path="res://Assets/Graphics/objects/pixel_bullet.png" id="2_oduel"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_oduel"] size = Vector2(6, 4) @@ -13,4 +14,11 @@ metadata/_edit_group_ = true shape = SubResource("RectangleShape2D_oduel") debug_color = Color(0.997962, 0, 0.153889, 0.42) +[node name="bulletgraphic" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(-1.74828, -1.49657) +rotation = 3.14159 +scale = Vector2(0.0586825, 0.0639693) +texture = ExtResource("2_oduel") + [connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/Scenes/coin.gd b/Scenes/coin.gd new file mode 100644 index 0000000..eff18f3 --- /dev/null +++ b/Scenes/coin.gd @@ -0,0 +1,7 @@ +class_name Coin extends Area2D + +signal coinCollectedSignal (body, coin) + +func _on_body_entered(body): + 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..d16af6f --- /dev/null +++ b/Scenes/coin.gd.uid @@ -0,0 +1 @@ +uid://da21g7u3efg51 diff --git a/Scenes/coin.tscn b/Scenes/coin.tscn new file mode 100644 index 0000000..bfe77cc --- /dev/null +++ b/Scenes/coin.tscn @@ -0,0 +1,114 @@ +[gd_scene load_steps=17 format=3 uid="uid://dpd7w80iq7c0x"] + +[ext_resource type="Texture2D" uid="uid://cv4sgj8r6e4js" path="res://Assets/Graphics/objects/coin.png" id="1_2qo34"] +[ext_resource type="Script" uid="uid://da21g7u3efg51" path="res://Scenes/coin.gd" id="1_jgi06"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_jgi06"] +atlas = ExtResource("1_2qo34") +region = Rect2(0, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g537i"] +atlas = ExtResource("1_2qo34") +region = Rect2(16, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h2p6v"] +atlas = ExtResource("1_2qo34") +region = Rect2(32, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ffmqm"] +atlas = ExtResource("1_2qo34") +region = Rect2(48, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_81h6x"] +atlas = ExtResource("1_2qo34") +region = Rect2(64, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qbp07"] +atlas = ExtResource("1_2qo34") +region = Rect2(80, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2l7mo"] +atlas = ExtResource("1_2qo34") +region = Rect2(96, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q30xt"] +atlas = ExtResource("1_2qo34") +region = Rect2(112, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7w2r2"] +atlas = ExtResource("1_2qo34") +region = Rect2(128, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tthw5"] +atlas = ExtResource("1_2qo34") +region = Rect2(144, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6pu15"] +atlas = ExtResource("1_2qo34") +region = Rect2(160, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vgc30"] +atlas = ExtResource("1_2qo34") +region = Rect2(176, 0, 16, 16) + +[sub_resource type="SpriteFrames" id="SpriteFrames_qtgto"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_jgi06") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g537i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h2p6v") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ffmqm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_81h6x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qbp07") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2l7mo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q30xt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7w2r2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tthw5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6pu15") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vgc30") +}], +"loop": true, +"name": &"idle", +"speed": 6.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_m55n1"] +radius = 5.09902 + +[node name="Coin" type="Area2D"] +script = ExtResource("1_jgi06") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_qtgto") +animation = &"idle" +autoplay = "idle" +frame_progress = 0.738405 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_m55n1") + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/Scenes/crate.tscn b/Scenes/crate.tscn index 7bb169e..44307f8 100644 --- a/Scenes/crate.tscn +++ b/Scenes/crate.tscn @@ -1,11 +1,18 @@ -[gd_scene load_steps=2 format=3 uid="uid://cjlmg7kqu5u5t"] +[gd_scene load_steps=3 format=3 uid="uid://cjlmg7kqu5u5t"] + +[ext_resource type="Texture2D" uid="uid://cehj0lmdp5oh5" path="res://Assets/Graphics/objects/crate.png" id="1_wp72f"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_m3ihr"] [node name="Crate" type="RigidBody2D" groups=["pushables", "shootables"]] +position = Vector2(-1, 0) rotation = -0.54389 metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_m3ihr") debug_color = Color(0.783958, 0.434081, 7.70092e-07, 0.42) + +[node name="Sprite2D" type="Sprite2D" parent="."] +scale = Vector2(0.08, 0.08) +texture = ExtResource("1_wp72f") diff --git a/Scenes/game.tscn b/Scenes/game.tscn index 4ed1d25..9cf186e 100644 --- a/Scenes/game.tscn +++ b/Scenes/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://c3nfwlo4i3hne"] +[gd_scene load_steps=18 format=4 uid="uid://c3nfwlo4i3hne"] [ext_resource type="Script" uid="uid://bt6s0tpg6lrha" path="res://Scripts/gamecontroller.gd" id="1_llgwy"] [ext_resource type="Script" uid="uid://bukc3pev3h3fq" path="res://Scripts/scene_manager.gd" id="2_1l0tm"] @@ -6,72 +6,425 @@ [ext_resource type="PackedScene" uid="uid://cjlmg7kqu5u5t" path="res://Scenes/crate.tscn" id="2_wowpa"] [ext_resource type="PackedScene" uid="uid://c5qsdhrjyxbr1" path="res://Scenes/player.tscn" id="2_wrm1d"] [ext_resource type="Script" uid="uid://b7utyaqyc131x" path="res://Scripts/crate.gd" id="3_i6g32"] +[ext_resource type="Texture2D" uid="uid://w62il58d617g" path="res://Assets/Graphics/enviroment/background/forestbackground.png" id="3_ldgsr"] +[ext_resource type="Texture2D" uid="uid://dapn4g7r8lgb3" path="res://Assets/Graphics/enviroment/background/sky.jpg" id="3_o5yvi"] [ext_resource type="Texture2D" uid="uid://bu07bj38jivdy" path="res://Assets/Graphics/enviroment/terrain/Terrain (32x32).png" id="3_v158k"] -[ext_resource type="PackedScene" uid="uid://clevnux6u2ybx" path="res://Scenes/bullet.tscn" id="6_i6g32"] +[ext_resource type="Texture2D" uid="uid://cwm0axsi3jqvf" path="res://Assets/Graphics/enviroment/terrain/veg_32x32.png" id="4_h4fw4"] +[ext_resource type="Texture2D" uid="uid://chy5tdt4bih6r" path="res://Assets/Graphics/enviroment/terrain/mushroom_32x64.png" id="5_ldgsr"] +[ext_resource type="PackedScene" uid="uid://dpd7w80iq7c0x" path="res://Scenes/coin.tscn" id="12_rku1e"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_h4fw4"] texture = ExtResource("3_v158k") 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, 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, 16, -16, 16) +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, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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, 16, 16, -16, 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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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(-16, -16, 16, -16, 16, 16, -16, 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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +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, -16, 16, -16, 16, 16, -7.64714, 16, -16, 7.96577) +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, -16, 16, -16, 16, 16, -16, 16) +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(-16, -16, 16, -16, 16, 8.2844, 7.96577, 16, -16, 16) +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, 8.60303, 8.92166, 16, -6.69124, 16, -16, 7.96577) +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, 16, 16, -16, 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(-16, -16, 16, -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, -16, 16, -16, 16, 16, -16, 16) +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, -16, 16, -16, 16, 16, -16, 16) +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, -7.64714, 16, -16, 7.96577) +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, 8.2844, 7.96577, 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, 8.60303, 8.92166, 16, -6.69124, 16, -16, 7.96577) 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, 16, 16, -16, 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(-16, -16, 16, -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, -16, 16, 16, -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, -16, 16, 16, -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, -7.64714, 16, -16, 7.96577) +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, 8.60303, 8.92166, 16, -16, 16, -16, 7.96577) +16:4/0/terrains_peering_bit/left_side = 0 +16:4/0/terrains_peering_bit/top_side = 0 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_o5yvi"] +texture = ExtResource("4_h4fw4") +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_rku1e"] +texture = ExtResource("5_ldgsr") +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_ldgsr"] 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_h4fw4") - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_ejxeh"] -size = Vector2(93, 18) +sources/1 = SubResource("TileSetAtlasSource_o5yvi") +sources/2 = SubResource("TileSetAtlasSource_rku1e") [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_0uq2f"] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_1l0tm"] -size = Vector2(6, 4) - [node name="Game" type="Node2D"] script = ExtResource("1_llgwy") @@ -79,20 +432,32 @@ script = ExtResource("1_llgwy") unique_name_in_owner = true script = ExtResource("2_1l0tm") +[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_o5yvi") +metadata/_edit_group_ = true + +[node name="farlayer" type="Parallax2D" parent="."] +scroll_scale = Vector2(1.2, 1) +repeat_size = Vector2(320, 0) + +[node name="Sprite2D" type="Sprite2D" parent="farlayer"] +position = Vector2(160, 200) +texture = ExtResource("3_ldgsr") + [node name="TileMapLayer" type="TileMapLayer" parent="."] texture_filter = 1 position = Vector2(191, 195) -tile_map_data = PackedByteArray(0, 0, 255, 255, 1, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 4, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 0, 0) +tile_map_data = PackedByteArray("AAD//wEAAAACAAQAAAABAAEAAAAEAAQAAAAAAAEAAAAEAAQAAAD+/wEAAAAAAAQAAAD+/wAAAQAAAAAAAAD//wAAAQAAAAAAAAABAAAAAQAAAAAAAAA=") tile_set = SubResource("TileSet_ldgsr") [node name="Platform" type="StaticBody2D" parent="."] position = Vector2(213, 228) metadata/_edit_group_ = true -[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform"] -position = Vector2(-8, 8) -shape = SubResource("RectangleShape2D_ejxeh") - [node name="Crate" parent="." instance=ExtResource("2_wowpa")] position = Vector2(177, 34) script = ExtResource("3_i6g32") @@ -107,19 +472,21 @@ shape = SubResource("WorldBoundaryShape2D_0uq2f") [node name="Player" parent="." instance=ExtResource("2_wrm1d")] position = Vector2(191, 195) -[node name="Camera2D" type="Camera2D" parent="Player"] - -[node name="Bullet" parent="." instance=ExtResource("6_i6g32")] -position = Vector2(101, 87) - -[node name="CollisionShape2D2" type="CollisionShape2D" parent="Bullet"] -shape = SubResource("RectangleShape2D_1l0tm") -debug_color = Color(0.997962, 0, 0.153889, 0.42) - [node name="triggers" type="Node2D" parent="."] [node name="player_hurt" parent="triggers" instance=ExtResource("2_ja4if")] position = Vector2(294, 211) effect = "player_hurt" +[node name="coins" type="Node2D" parent="."] +position = Vector2(139, 210) + +[node name="Coin" parent="coins" instance=ExtResource("12_rku1e")] + +[node name="Coin2" parent="coins" instance=ExtResource("12_rku1e")] +position = Vector2(-64, 18) + +[node name="Coin3" parent="coins" instance=ExtResource("12_rku1e")] +position = Vector2(95, 1) + [connection signal="areaTriggerSignal" from="triggers/player_hurt" to="." method="_on_trigger"] diff --git a/Scenes/player.tscn b/Scenes/player.tscn index 1df1a0f..b2c763b 100644 --- a/Scenes/player.tscn +++ b/Scenes/player.tscn @@ -178,27 +178,25 @@ animations = [{ }] [node name="Player" type="CharacterBody2D"] -position = Vector2(-20, -4) script = ExtResource("1_v0iea") +[node name="Camera2D" type="Camera2D" parent="."] + [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(21, 4) shape = SubResource("CircleShape2D_4vo57") debug_color = Color(0.021275, 0.650889, 0, 0.42) [node name="Left Cast" type="RayCast2D" parent="."] -position = Vector2(21, 4) target_position = Vector2(-45, 0) [node name="Right Cast" type="RayCast2D" parent="."] -position = Vector2(21, 4) target_position = Vector2(45, 0) [node name="RightSpawn" type="Node2D" parent="."] -metadata/_edit_group_ = true +position = Vector2(-9, 0) [node name="LeftSpawn" type="Node2D" parent="."] -metadata/_edit_group_ = true +position = Vector2(-10, 0) [node name="JumpBufferTimer" type="Timer" parent="."] wait_time = 0.8 @@ -206,7 +204,6 @@ one_shot = true [node name="playergraphic" type="AnimatedSprite2D" parent="."] texture_filter = 1 -position = Vector2(22, 1) scale = Vector2(0.833333, 0.770833) sprite_frames = SubResource("SpriteFrames_ukyrk") animation = &"fall" diff --git a/Scripts/bullet.gd b/Scripts/bullet.gd index adf5073..cb01f69 100644 --- a/Scripts/bullet.gd +++ b/Scripts/bullet.gd @@ -1,4 +1,7 @@ class_name Bullet extends Area2D +@onready var bulletgraphic = $bulletgraphic + + var speed:float = 700 signal bulletDamageSignal(body, bullet) @@ -6,6 +9,11 @@ signal bulletDamageSignal(body, bullet) func setSpeed(value:float): speed = value + if value<0: + bulletgraphic.flip_h = true + if value<0: + bulletgraphic.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 f0a41d5..6288df7 100644 --- a/Scripts/gamecontroller.gd +++ b/Scripts/gamecontroller.gd @@ -25,3 +25,6 @@ func _on_trigger(effect: Variant, body: Variant) -> void: func bulletDamage(body, bullet): print("GC knows 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 5535c85..90a5a02 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 = $"../triggers" +@onready var coins = $"../coins" # Called when the node enters the scene tree for the first time. @@ -12,8 +13,11 @@ 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. func _process(delta: float) -> void: diff --git a/project.godot b/project.godot index 7495f0f..7d2295d 100644 --- a/project.godot +++ b/project.godot @@ -15,6 +15,14 @@ run/main_scene="res://Scenes/game.tscn" config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" +[display] + +window/size/viewport_width=320 +window/size/viewport_height=180 +window/size/window_width_override=960 +window/size/window_height_override=540 +window/stretch/mode="viewport" + [input] shove={