parralax background, two terrains, collectible coin, some graphics, physics layer

This commit is contained in:
OddlyTimbot 2025-06-23 21:04:18 -04:00
parent e01d74d89d
commit 05bb4ad9c0
20 changed files with 748 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bdg8rpvw7u8jy"
path="res://.godot/imported/coin.png-f0b33289d8d72c34d5a0c76da4c0f19c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/pickups/coin.png"
dest_files=["res://.godot/imported/coin.png-f0b33289d8d72c34d5a0c76da4c0f19c.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://drprk4q04ohta"
path="res://.godot/imported/forestbackground.png-f51dffc1adfd52e17efb6ffa90de10c1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/terrains/forestbackground.png"
dest_files=["res://.godot/imported/forestbackground.png-f51dffc1adfd52e17efb6ffa90de10c1.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://v7huiinvs1pw"
path="res://.godot/imported/forestsky.png-c7ec68324353a7c6711c1d553d66ad5d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/terrains/forestsky.png"
dest_files=["res://.godot/imported/forestsky.png-c7ec68324353a7c6711c1d553d66ad5d.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c3ubltiqufnyr"
path="res://.godot/imported/mushroom_32x64.png-b93d4203ab926eaef0444db20603f6d7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/terrains/mushroom_32x64.png"
dest_files=["res://.godot/imported/mushroom_32x64.png-b93d4203ab926eaef0444db20603f6d7.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bbqbgivyotdyq"
path="res://.godot/imported/spookytrees.png-8773e4f381614212ad4738fa148ab1dc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/terrains/spookytrees.png"
dest_files=["res://.godot/imported/spookytrees.png-8773e4f381614212ad4738fa148ab1dc.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://du44ug1iyrer1"
path="res://.godot/imported/veg_32x32.png-c029688fc25e4703c3489b261b9edb06.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/terrains/veg_32x32.png"
dest_files=["res://.godot/imported/veg_32x32.png-c029688fc25e4703c3489b261b9edb06.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

View File

@ -15,6 +15,14 @@ run/main_scene="uid://dc4obqdsdq81h"
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"
[file_customization]
folder_colors={

113
scenes/coin.tscn Normal file
View File

@ -0,0 +1,113 @@
[gd_scene load_steps=17 format=3 uid="uid://1kjfjblxns38"]
[ext_resource type="Script" uid="uid://cg6526ss1luok" path="res://scripts/coin.gd" id="1_i64fm"]
[ext_resource type="Texture2D" uid="uid://bdg8rpvw7u8jy" path="res://assets/graphics/pickups/coin.png" id="1_rwqht"]
[sub_resource type="CircleShape2D" id="CircleShape2D_i64fm"]
radius = 6.0
[sub_resource type="AtlasTexture" id="AtlasTexture_11l1o"]
atlas = ExtResource("1_rwqht")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_d14el"]
atlas = ExtResource("1_rwqht")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_1ikuy"]
atlas = ExtResource("1_rwqht")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_wnlwo"]
atlas = ExtResource("1_rwqht")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_jig8b"]
atlas = ExtResource("1_rwqht")
region = Rect2(64, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_xmuha"]
atlas = ExtResource("1_rwqht")
region = Rect2(80, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_kfxoj"]
atlas = ExtResource("1_rwqht")
region = Rect2(96, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_jsmju"]
atlas = ExtResource("1_rwqht")
region = Rect2(112, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_s0mny"]
atlas = ExtResource("1_rwqht")
region = Rect2(128, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_7cc30"]
atlas = ExtResource("1_rwqht")
region = Rect2(144, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_rojmm"]
atlas = ExtResource("1_rwqht")
region = Rect2(160, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ls27i"]
atlas = ExtResource("1_rwqht")
region = Rect2(176, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_ssuvv"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_11l1o")
}, {
"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")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}]
[node name="Area2D" type="Area2D"]
script = ExtResource("1_i64fm")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_i64fm")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_ssuvv")
animation = &"idle"
autoplay = "idle"
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -1,78 +1,441 @@
[gd_scene load_steps=12 format=3 uid="uid://dc4obqdsdq81h"]
[gd_scene load_steps=20 format=4 uid="uid://dc4obqdsdq81h"]
[ext_resource type="Script" uid="uid://dflv3rb4v8c0r" path="res://scripts/gamecontroller.gd" id="1_lnu2h"]
[ext_resource type="PackedScene" uid="uid://drodkouhgldnf" path="res://scenes/player.tscn" id="2_lbhrr"]
[ext_resource type="Script" uid="uid://cf8f01b63m2hq" path="res://scripts/scene_manager.gd" id="2_p57ef"]
[ext_resource type="Texture2D" uid="uid://c4ltj66f0bstb" path="res://assets/graphics/terrains/Terrain (32x32).png" id="2_u5sy4"]
[ext_resource type="Texture2D" uid="uid://v7huiinvs1pw" path="res://assets/graphics/terrains/forestsky.png" id="2_vtaks"]
[ext_resource type="Texture2D" uid="uid://du44ug1iyrer1" path="res://assets/graphics/terrains/veg_32x32.png" id="3_0tnpc"]
[ext_resource type="Texture2D" uid="uid://drprk4q04ohta" path="res://assets/graphics/terrains/forestbackground.png" id="3_kvpfn"]
[ext_resource type="PackedScene" uid="uid://dm0s1wei11x43" path="res://scenes/crate.tscn" id="3_lbhrr"]
[ext_resource type="Texture2D" uid="uid://bbqbgivyotdyq" path="res://assets/graphics/terrains/spookytrees.png" id="4_dinhu"]
[ext_resource type="PackedScene" uid="uid://bu03yhhfncspe" path="res://scenes/trigger.tscn" id="4_iywne"]
[ext_resource type="Texture2D" uid="uid://c3ubltiqufnyr" path="res://assets/graphics/terrains/mushroom_32x64.png" id="4_vtaks"]
[ext_resource type="PackedScene" uid="uid://cair7oymuohyq" path="res://scenes/bullet.tscn" id="5_iywne"]
[ext_resource type="PackedScene" uid="uid://1kjfjblxns38" path="res://scenes/coin.tscn" id="13_kvuet"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
texture = ExtResource("2_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, 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/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, 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
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/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, -16, 16, -16, 16, 16, -16, 16)
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, 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, 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, -2.23041, -16, -2.54905, 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(2.86768, -16, 16, -16, 16, 16, 2.86768, 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, 0.63726, -16, 1.59315)
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, 0.63726, -16, 1.59315)
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, -2.23041, -16, -2.54905, 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, -3.18631, -16, -2.54905)
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, -3.50494, 16, -10.8334, 12.108, -16, 4.77946)
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, 6.05399, 13.0639, 11.4707, 6.69125, 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, -2.23041, -16, -2.54905, 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(2.86768, -16, 16, -16, 16, 16, 2.86768, 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, 0, 16, 0, 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, 0, 16, 0, 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, 0.31863, 16, 0.31863, 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(-0.31863, -16, 16, -16, 16, 16, -0.31863, 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_kvpfn"]
texture = ExtResource("3_0tnpc")
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_dinhu"]
texture = ExtResource("4_vtaks")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 1
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 = "leafygreen"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
terrain_set_0/terrain_1/name = "vegie"
terrain_set_0/terrain_1/color = Color(0.5, 0.4375, 0.25, 1)
sources/0 = SubResource("TileSetAtlasSource_gee14")
sources/1 = SubResource("TileSetAtlasSource_kvpfn")
sources/2 = SubResource("TileSetAtlasSource_dinhu")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8cj0n"]
size = Vector2(60, 20)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_u5sy4"]
distance = 144.0
[node name="Game" type="Node2D"]
script = ExtResource("1_lnu2h")
[node name="Parallax2D" type="Parallax2D" parent="."]
repeat_size = Vector2(320, 180)
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D"]
position = Vector2(160, 90)
texture = ExtResource("2_vtaks")
[node name="ParallaxMidground" type="Parallax2D" parent="."]
scroll_scale = Vector2(1.1, 1)
repeat_size = Vector2(320, 0)
[node name="Sprite2D" type="Sprite2D" parent="ParallaxMidground"]
position = Vector2(160, 350)
texture = ExtResource("3_kvpfn")
[node name="ParallaxForeground" type="Parallax2D" parent="."]
scroll_scale = Vector2(1.2, 1)
repeat_size = Vector2(320, 0)
[node name="Sprite2D" type="Sprite2D" parent="ParallaxForeground"]
texture_filter = 1
position = Vector2(160, 350)
texture = ExtResource("4_dinhu")
[node name="TileMapLayer" type="TileMapLayer" parent="."]
tile_map_data = PackedByteArray(0, 0, 17, 0, 11, 0, 0, 0, 4, 0, 4, 0, 0, 0)
texture_filter = 1
position = Vector2(1, 0)
tile_map_data = PackedByteArray("AAATAAoAAAAEAAQAAAAUAAkAAAAAAAQAAAAVAAkAAAABAAQAAAAWAAkAAAABAAQAAAAXAAkAAAAQAAMAAAAXAAoAAAAEAAIAAAAbAAoAAAAEAAAAAAAOAAwAAAABAAAAAAANAAwAAAABAAAAAAAMAAwAAAAGAAEAAAAMAAsAAAACAAEAAAAMAAoAAAACAAAAAAALAAoAAAABAAAAAAALAAsAAAAHAAAAAAALAAwAAAAHAAEAAAAKAAwAAAAJAAAAAAAKAAsAAAAGAAMAAAAKAAoAAAAAAAAAAAARAAsAAAAEAAAAAAAVAA4AAAAAAAIAAAAWAA4AAAABAAIAAAAXAA4AAAABAAIAAAAYAA4AAAACAAIAAAAWAA0AAAABAAAAAAAJAAwAAAABAAAAAAAIAAwAAAABAAAAAAAHAAwAAAABAAAAAAAGAAwAAAABAAAAAAAFAAwAAAAGAAQAAAAFAAsAAAAQAAMAAAAEAAsAAAABAAQAAAADAAsAAAABAAQAAAACAAsAAAABAAQAAAABAAsAAAAPAAMAAAABAAwAAAAHAAQAAAAAAAwAAAAAAAAAAAARAAwAAAAJAAAAAAASAAwAAAABAAAAAAATAAwAAAABAAAAAAAUAAwAAAABAAAAAAAVAAwAAAACAAAAAAAQAAwAAAABAAAAAAAPAAwAAAABAAAAAAAKAAkAAQAAAAAAAAAXAAgAAQAAAAAAAAAaAAoAAgAAAAEAAAAaAAkAAgAAAAAAAAAaAAsAAAAAAAQAAAAbAAsAAAAQAAQAAAAXAA0AAAABAAAAAAAYAA0AAAAJAAMAAAAZAA0AAAABAAQAAAAaAA0AAAABAAQAAAAbAA0AAAABAAQAAAAcAA0AAAABAAQAAAAdAA0AAAAKAAMAAAAdAA4AAAAAAAIAAAAeAA4AAAABAAIAAAAfAA4AAAABAAIAAAAgAA4AAAACAAIAAAAgAA0AAAACAAAAAAAfAA0AAAABAAAAAAAeAA0AAAABAAAAAAAAAA0AAAAAAAIAAAABAA0AAAAJAAQAAAACAA0AAAABAAQAAAADAA0AAAABAAQAAAAEAA0AAAAKAAMAAAAEAA4AAAAAAAIAAAAFAA4AAAABAAIAAAAGAA4AAAAJAAQAAAAHAA4AAAAMAAQAAAAIAA4AAAAKAAQAAAAJAA4AAAACAAIAAAAJAA0AAAAGAAAAAAAKAA0AAAABAAIAAAALAA0AAAABAAIAAAAMAA0AAAABAAIAAAANAA0AAAABAAIAAAAOAA0AAAABAAIAAAAPAA0AAAABAAIAAAAQAA4AAAAAAAIAAAARAA4AAAAKAAQAAAASAA4AAAACAAIAAAASAA0AAAAGAAAAAAATAA0AAAABAAIAAAAUAA0AAAABAAIAAAAVAA0AAAAQAAEAAAARAA0AAAAHAAAAAAAQAA0AAAAHAAAAAAAIAA0AAAAHAAAAAAAHAA0AAAAKAAEAAAAFAA0AAAAHAAEAAAAGAA0AAAAGAAAAAAA=")
tile_set = SubResource("TileSet_0tnpc")
[node name="SceneManager" type="Node2D" parent="."]
@ -80,7 +443,7 @@ unique_name_in_owner = true
script = ExtResource("2_p57ef")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(644, 363)
position = Vector2(955, 403)
scale = Vector2(0.760005, 1)
metadata/_edit_group_ = true
@ -88,13 +451,13 @@ metadata/_edit_group_ = true
shape = SubResource("RectangleShape2D_8cj0n")
[node name="CharacterBody2D" parent="." instance=ExtResource("2_lbhrr")]
position = Vector2(559, 335)
position = Vector2(555, 317)
[node name="RigidBody2D3" parent="." instance=ExtResource("3_lbhrr")]
position = Vector2(510, 326)
position = Vector2(399, 297)
[node name="RigidBody2D4" parent="." instance=ExtResource("3_lbhrr")]
position = Vector2(468, 321)
position = Vector2(443, 305)
[node name="RigidBody2D5" parent="." instance=ExtResource("3_lbhrr")]
position = Vector2(590, 342)
@ -105,10 +468,12 @@ position = Vector2(490, 302)
[node name="triggers" type="Node2D" parent="."]
[node name="Area2D" parent="triggers" instance=ExtResource("4_iywne")]
position = Vector2(519, 453)
position = Vector2(-427, 202)
scale = Vector2(0.5, 0.5)
[node name="Area2D2" parent="triggers" instance=ExtResource("4_iywne")]
position = Vector2(653, 461)
position = Vector2(919, 210)
scale = Vector2(0.5, 0.5)
effect = "powerup"
[node name="StaticBody2D2" type="StaticBody2D" parent="."]
@ -117,5 +482,19 @@ effect = "powerup"
position = Vector2(553, 571)
shape = SubResource("WorldBoundaryShape2D_u5sy4")
[node name="Coins" type="Node2D" parent="."]
[node name="Area2D" parent="Coins" instance=ExtResource("13_kvuet")]
position = Vector2(533, 375)
[node name="Area2D2" parent="Coins" instance=ExtResource("13_kvuet")]
position = Vector2(375, 311)
[node name="Area2D4" parent="Coins" instance=ExtResource("13_kvuet")]
position = Vector2(301, 373)
[node name="Area2D3" parent="Coins" instance=ExtResource("13_kvuet")]
position = Vector2(742, 281)
[connection signal="areatrigger" from="triggers/Area2D" to="." method="_on_areatrigger"]
[connection signal="areatrigger" from="triggers/Area2D2" to="." method="_on_areatrigger"]

View File

@ -204,4 +204,7 @@ sprite_frames = SubResource("SpriteFrames_jej6c")
animation = &"falling"
autoplay = "idle"
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2(0, -10)
[connection signal="animation_finished" from="PlayerGraphic" to="." method="_on_animation_finished"]

16
scripts/coin.gd Normal file
View File

@ -0,0 +1,16 @@
class_name Coin extends Area2D
signal coinCollectedSignal(body, coin)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_body_entered(body: Node2D) -> void:
print("Coin sees collision")
coinCollectedSignal.emit(body, self)

1
scripts/coin.gd.uid Normal file
View File

@ -0,0 +1 @@
uid://cg6526ss1luok

View File

@ -1,5 +1,6 @@
extends Node2D
var totalCoinsAvailable =0
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@ -19,3 +20,10 @@ func _on_areatrigger(effect, body) -> void:
if effect == "powerup":
print("power up the player")
func totalCoinCount(totalCoins):
print("GC know total of coins "+str(totalCoins) )
totalCoinsAvailable = totalCoins
func coinCollected(body, coin):
print("GC knows coin collected")
coin.queue_free()

View File

@ -5,10 +5,18 @@ var bulletArray =[]
var totalAllowedBullets = 7
@onready var triggers: Node2D = $"../triggers"
@onready var gameController: Node2D = $".."
@onready var coins: Node2D = $"../Coins"
func _ready() -> void:
for obj in triggers.get_children():
obj.areatrigger.connect(gameController._on_areatrigger)
var coinCount = 0
for obj in coins.get_children():
obj.coinCollectedSignal.connect(gameController.coinCollected)
coinCount +=1
#send the info to gamecontroller
gameController.totalCoinCount(coinCount)
#makes bullets
func bulletFactory():