rebuild project
@ -1,17 +0,0 @@
|
||||
big 4 static body rigid body character body trigger(area)
|
||||
|
||||
architecture
|
||||
|
||||
view ( big 4) actors
|
||||
|
||||
Gamer controller writer
|
||||
logic
|
||||
requires data
|
||||
contains functions
|
||||
|
||||
scene manager
|
||||
decides when things happen director
|
||||
|
||||
|
||||
Signals
|
||||
to connect signal go to main scene and select emmiter
|
BIN
assets/graphics/enemies/slime_purple (1).png
Normal file
After Width: | Height: | Size: 1.0 KiB |
@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cqfcr400bxn17"
|
||||
path="res://.godot/imported/coin.png-4c7dc7453870774524b4849f32b6deac.ctex"
|
||||
uid="uid://dwwlva8pi3da2"
|
||||
path="res://.godot/imported/slime_purple (1).png-ff140cda4bae63a63a843ef175e2fa42.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/projectiles/coin.png"
|
||||
dest_files=["res://.godot/imported/coin.png-4c7dc7453870774524b4849f32b6deac.ctex"]
|
||||
source_file="res://assets/graphics/enemies/slime_purple (1).png"
|
||||
dest_files=["res://.godot/imported/slime_purple (1).png-ff140cda4bae63a63a843ef175e2fa42.ctex"]
|
||||
|
||||
[params]
|
||||
|
Before Width: | Height: | Size: 934 B |
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b1pfjj3fy2omh"
|
||||
uid="uid://l4a5qfhhue26"
|
||||
path="res://.godot/imported/forestbackground.png-1170ae197e211023a79091cf48300332.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 652 B |
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bcbxw0bqcx1ra"
|
||||
uid="uid://s14ukqbx5mtf"
|
||||
path="res://.godot/imported/sky.png-b132b9e240387925c40cca10d1d14c56.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
BIN
assets/graphics/environment/backgrounds/trees.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dhbq35sm7q38"
|
||||
uid="uid://dv63a7rb24ob8"
|
||||
path="res://.godot/imported/trees.png-b1cfb32a6f99a640507fdab863a473f5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cfoysdgyt6nar"
|
||||
path="res://.godot/imported/Terrain (32x32)(1).png-f30083663c5b61a547e537b745ce35df.ctex"
|
||||
uid="uid://bqe3w5v76lyek"
|
||||
path="res://.godot/imported/Terrain (32x32).png-81a713b69add642b2640197ae95d1555.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/environment/terrain/Terrain (32x32)(1).png"
|
||||
dest_files=["res://.godot/imported/Terrain (32x32)(1).png-f30083663c5b61a547e537b745ce35df.ctex"]
|
||||
source_file="res://assets/graphics/environment/terrain/Terrain (32x32).png"
|
||||
dest_files=["res://.godot/imported/Terrain (32x32).png-81a713b69add642b2640197ae95d1555.ctex"]
|
||||
|
||||
[params]
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.2 KiB |
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bk35d1yyqwvxf"
|
||||
uid="uid://cy0lgun8t11xv"
|
||||
path="res://.godot/imported/mushroom_32x64.png-cefb137d64a82ca31a8f0068d916c09f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ctremhbhix1fj"
|
||||
uid="uid://dvn642wmhcrfc"
|
||||
path="res://.godot/imported/veg_32x32.png-4b0b47ef99f3aa28e8f24956e44a31a5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvm82m176wflv"
|
||||
uid="uid://bnhycmkyqxdiu"
|
||||
path="res://.godot/imported/crate.png-b286bd97caa3cbc59746f2db7de46191.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dqt56yigjia14"
|
||||
uid="uid://b22ko1chbu1t2"
|
||||
path="res://.godot/imported/coin.png-f0b33289d8d72c34d5a0c76da4c0f19c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
BIN
assets/graphics/player/death/Player Death 64x64(1).png
Normal file
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://o01smmrcbx3m"
|
||||
path="res://.godot/imported/Player Death 64x64(1).png-01d13f605a188709e5460f84c537e6ad.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/player/death/Player Death 64x64(1).png"
|
||||
dest_files=["res://.godot/imported/Player Death 64x64(1).png-01d13f605a188709e5460f84c537e6ad.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
|
BIN
assets/graphics/player/hurt/Player Hurt 48x48.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bltcodwg82who"
|
||||
path="res://.godot/imported/block.png-3aa040c2e63d44fce35c994ecca4a9d9.ctex"
|
||||
uid="uid://bbi1q6oxsxa4p"
|
||||
path="res://.godot/imported/Player Hurt 48x48.png-a720e51cb19103e76b22ab6c1b81302d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/environment/backgrounds/block.png"
|
||||
dest_files=["res://.godot/imported/block.png-3aa040c2e63d44fce35c994ecca4a9d9.ctex"]
|
||||
source_file="res://assets/graphics/player/hurt/Player Hurt 48x48.png"
|
||||
dest_files=["res://.godot/imported/Player Hurt 48x48.png-a720e51cb19103e76b22ab6c1b81302d.ctex"]
|
||||
|
||||
[params]
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://djtlpe43a18d5"
|
||||
uid="uid://be0vnx023iw65"
|
||||
path="res://.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 1021 B |
@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://daf4mmxa2xsjv"
|
||||
path="res://.godot/imported/player jump 48x48(1).png-fce213ffe532f989157ffbd1a1791539.ctex"
|
||||
uid="uid://c3uwl6agc6dhb"
|
||||
path="res://.godot/imported/player jump 48x48.png-bb6ba8ccf76c9bd3765199af95f48c3c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/player/jump_fall/player jump 48x48(1).png"
|
||||
dest_files=["res://.godot/imported/player jump 48x48(1).png-fce213ffe532f989157ffbd1a1791539.ctex"]
|
||||
source_file="res://assets/graphics/player/jump_fall/player jump 48x48.png"
|
||||
dest_files=["res://.godot/imported/player jump 48x48.png-bb6ba8ccf76c9bd3765199af95f48c3c.ctex"]
|
||||
|
||||
[params]
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dctuuekg8fi6i"
|
||||
uid="uid://dmmtik7twhga4"
|
||||
path="res://.godot/imported/player run 48x48.png-6d66612d48bfa4c8721495ba557ab7c6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
Before Width: | Height: | Size: 500 B |
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c4jgxarp4pf2s"
|
||||
uid="uid://dbm1x33raub7h"
|
||||
path="res://.godot/imported/pixel_bullet.png-30d6d1e8b5e1332f8b2e2cee72a9e790.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dhyfi56uibye7"
|
||||
uid="uid://dmbvik4xqervy"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
@ -11,10 +11,14 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="JulyGame"
|
||||
run/main_scene="res://scenes/game.tscn"
|
||||
config/features=PackedStringArray("4.3", "Forward Plus")
|
||||
run/main_scene="uid://coiqh7p31ukig"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[autoload]
|
||||
|
||||
Gamecontroller="*res://scripts/gamecontroller.gd"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=320
|
||||
@ -26,12 +30,22 @@ window/stretch/mode="viewport"
|
||||
[input]
|
||||
|
||||
shove={
|
||||
"deadzone": 0.5,
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
shoot={
|
||||
"deadzone": 0.5,
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
save={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
load={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
@ -1,24 +1,24 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://lg8k51aicde4"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dopt3unflv7l3"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_bpcfw"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4jgxarp4pf2s" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_imvee"]
|
||||
[ext_resource type="Script" uid="uid://bhh178vuo5bgo" path="res://scripts/bullet.gd" id="1_mkf8s"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbm1x33raub7h" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_y25gk"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oprgb"]
|
||||
size = Vector2(8, 3)
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y25gk"]
|
||||
size = Vector2(8, 4)
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource("1_bpcfw")
|
||||
script = ExtResource("1_mkf8s")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -0.5)
|
||||
shape = SubResource("RectangleShape2D_oprgb")
|
||||
debug_color = Color(0.866207, 0.326527, 0.373638, 0.42)
|
||||
shape = SubResource("RectangleShape2D_y25gk")
|
||||
debug_color = Color(0.97707, 0.111833, 0.261075, 0.42)
|
||||
|
||||
[node name="BulletGraphic" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(-2, -2)
|
||||
position = Vector2(-2, -1)
|
||||
rotation = 3.14159
|
||||
scale = Vector2(0.0601394, 0.0601394)
|
||||
texture = ExtResource("2_imvee")
|
||||
scale = Vector2(0.06, 0.06)
|
||||
texture = ExtResource("2_y25gk")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
@ -1,114 +1,114 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://bxgmkcya2nup8"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://bfvm14fearqvq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/coin.gd" id="1_0370w"]
|
||||
[ext_resource type="Texture2D" uid="uid://dqt56yigjia14" path="res://assets/graphics/pickups/coin.png" id="1_w8jar"]
|
||||
[ext_resource type="Script" uid="uid://nqigicsb4oqh" path="res://scripts/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_xqi52"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d14el"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_timbf"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1ikuy"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a81kj"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wnlwo"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5ia0i"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jig8b"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mxyi7"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xmuha"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ou15j"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kfxoj"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(80, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_psh60"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jsmju"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(96, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0dxws"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s0mny"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(112, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8nfrw"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7cc30"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(128, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mkdvk"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rojmm"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(144, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_04na0"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ls27i"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(160, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bcvj3"]
|
||||
atlas = ExtResource("1_w8jar")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ssuvv"]
|
||||
atlas = ExtResource("2_11l1o")
|
||||
region = Rect2(176, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_p0bax"]
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_6jg3o"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xqi52")
|
||||
"texture": SubResource("AtlasTexture_d14el")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_timbf")
|
||||
"texture": SubResource("AtlasTexture_1ikuy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a81kj")
|
||||
"texture": SubResource("AtlasTexture_wnlwo")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5ia0i")
|
||||
"texture": SubResource("AtlasTexture_jig8b")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mxyi7")
|
||||
"texture": SubResource("AtlasTexture_xmuha")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ou15j")
|
||||
"texture": SubResource("AtlasTexture_kfxoj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_psh60")
|
||||
"texture": SubResource("AtlasTexture_jsmju")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0dxws")
|
||||
"texture": SubResource("AtlasTexture_s0mny")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8nfrw")
|
||||
"texture": SubResource("AtlasTexture_7cc30")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mkdvk")
|
||||
"texture": SubResource("AtlasTexture_rojmm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_04na0")
|
||||
"texture": SubResource("AtlasTexture_ls27i")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bcvj3")
|
||||
"texture": SubResource("AtlasTexture_ssuvv")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_1unyf"]
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_rsyy1"]
|
||||
radius = 5.0
|
||||
|
||||
[node name="Coin" type="Area2D"]
|
||||
script = ExtResource("1_0370w")
|
||||
script = ExtResource("1_i64fm")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_p0bax")
|
||||
sprite_frames = SubResource("SpriteFrames_6jg3o")
|
||||
animation = &"idle"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.293314
|
||||
frame_progress = 0.364422
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
scale = Vector2(0.597135, 0.597135)
|
||||
shape = SubResource("CircleShape2D_1unyf")
|
||||
shape = SubResource("CircleShape2D_rsyy1")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
@ -1,20 +1,19 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://d0mw3eh00s3kr"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dlihpyr58tqqq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/crate.gd" id="1_j2btj"]
|
||||
[ext_resource type="Texture2D" uid="uid://bvm82m176wflv" path="res://assets/graphics/objects/crate.png" id="2_x3laa"]
|
||||
[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"]
|
||||
size = Vector2(22, 23)
|
||||
|
||||
[node name="Crate" type="RigidBody2D" groups=["pushables", "shootables"]]
|
||||
script = ExtResource("1_j2btj")
|
||||
script = ExtResource("1_b66cd")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." groups=["shootables"]]
|
||||
position = Vector2(0, -1.5)
|
||||
shape = SubResource("RectangleShape2D_uwrxv")
|
||||
debug_color = Color(0.820447, 0.391315, 0.259417, 0.42)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
scale = Vector2(0.08, 0.08)
|
||||
texture = ExtResource("2_x3laa")
|
||||
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)
|
||||
|
201
scenes/game.tscn
474
scenes/level2.tscn
Normal file
@ -0,0 +1,474 @@
|
||||
[gd_scene load_steps=17 format=4 uid="uid://do0fr2w6ennxd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1daji4xwuj03" path="res://scripts/scene_manager.gd" id="1_bo4dx"]
|
||||
[ext_resource type="Texture2D" uid="uid://s14ukqbx5mtf" path="res://assets/graphics/environment/backgrounds/sky.png" id="2_76toy"]
|
||||
[ext_resource type="Texture2D" uid="uid://l4a5qfhhue26" path="res://assets/graphics/environment/backgrounds/forestbackground.png" id="3_8g4ke"]
|
||||
[ext_resource type="Texture2D" uid="uid://dv63a7rb24ob8" path="res://assets/graphics/environment/backgrounds/trees.png" id="4_56gwk"]
|
||||
[ext_resource type="Texture2D" uid="uid://bqe3w5v76lyek" path="res://assets/graphics/environment/terrain/Terrain (32x32).png" id="5_ve5ok"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvn642wmhcrfc" path="res://assets/graphics/environment/terrain/veg_32x32.png" id="6_cleqw"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy0lgun8t11xv" path="res://assets/graphics/environment/terrain/mushroom_32x64.png" id="7_wvb8j"]
|
||||
[ext_resource type="PackedScene" uid="uid://dlihpyr58tqqq" path="res://scenes/crate.tscn" id="8_g8vcy"]
|
||||
[ext_resource type="PackedScene" uid="uid://boqg1nyudmkh4" path="res://scenes/player.tscn" id="9_cqal4"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfvm14fearqvq" path="res://scenes/coin.tscn" id="10_o3sye"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
|
||||
texture = ExtResource("5_ve5ok")
|
||||
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("6_cleqw")
|
||||
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("7_wvb8j")
|
||||
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)
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
||||
|
||||
[node name="game" type="Node2D"]
|
||||
|
||||
[node name="SceneManager" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("1_bo4dx")
|
||||
|
||||
[node name="skylayer" type="Parallax2D" parent="."]
|
||||
repeat_size = Vector2(320, 180)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="skylayer"]
|
||||
position = Vector2(160, 90)
|
||||
texture = ExtResource("2_76toy")
|
||||
|
||||
[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("3_8g4ke")
|
||||
|
||||
[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("4_56gwk")
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||
texture_filter = 1
|
||||
tile_map_data = PackedByteArray("AAAOAAsAAAACAAAAAAANAAsAAAAAAAAAAAAMAAkAAAAEAAQAAAAOAA4AAAACAAIAAAANAA4AAAAAAAIAAAAMABAAAAAEAAQAAAAWAAsAAAACAAIAAAAVAAsAAAAAAAIAAAAVAAoAAAAAAAAAAAAWAAoAAAACAAAAAAATAAkAAAACAAQAAAASAAkAAAABAAQAAAARAAkAAAAAAAQAAAASAAsAAQAAAAAAAAANAAoAAQAAAAAAAAATAAgAAQAAAAAAAAAVAAkAAQAAAAAAAAAWAAkAAgAAAAEAAAAWAAgAAgAAAAAAAAAHAA0AAAAAAAIAAAAIAA0AAAABAAIAAAAJAA0AAAABAAIAAAAKAA0AAAAHAAAAAAAKAA4AAAAAAAIAAAALAA4AAAACAAIAAAAMAA0AAAABAAIAAAANAA0AAAAHAAAAAAAOAA0AAAAGAAAAAAAPAA0AAAABAAIAAAAQAA0AAAABAAIAAAARAA0AAAABAAIAAAASAA0AAAABAAIAAAATAA0AAAABAAIAAAAUAA0AAAACAAIAAAAUAAwAAAACAAAAAAATAAwAAAABAAAAAAASAAwAAAABAAAAAAAQAAwAAAABAAAAAAAPAAwAAAABAAAAAAAOAAwAAAAGAAEAAAANAAwAAAAHAAEAAAAMAAwAAAABAAAAAAALAA0AAAAGAAAAAAALAAwAAAABAAAAAAAKAAwAAAABAAAAAAAJAAwAAAABAAAAAAAIAAwAAAABAAAAAAAHAAwAAAAAAAAAAAARAAwAAAABAAAAAAA=")
|
||||
tile_set = SubResource("TileSet_0tnpc")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2(743, 490)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="Crate" parent="." instance=ExtResource("8_g8vcy")]
|
||||
position = Vector2(575, 221)
|
||||
|
||||
[node name="ground" type="StaticBody2D" parent="."]
|
||||
position = Vector2(551, 565)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ground"]
|
||||
shape = SubResource("WorldBoundaryShape2D_8cj0n")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("9_cqal4")]
|
||||
position = Vector2(563, 364)
|
||||
|
||||
[node name="triggers" type="Node2D" parent="."]
|
||||
|
||||
[node name="coins" type="Node2D" parent="."]
|
||||
|
||||
[node name="Coin3" parent="coins" instance=ExtResource("10_o3sye")]
|
||||
position = Vector2(630, 375)
|
480
scenes/level3.tscn
Normal file
@ -0,0 +1,480 @@
|
||||
[gd_scene load_steps=17 format=4 uid="uid://bw434ov6gqfr3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1daji4xwuj03" path="res://scripts/scene_manager.gd" id="1_6qt4k"]
|
||||
[ext_resource type="Texture2D" uid="uid://s14ukqbx5mtf" path="res://assets/graphics/environment/backgrounds/sky.png" id="2_fh4ka"]
|
||||
[ext_resource type="Texture2D" uid="uid://l4a5qfhhue26" path="res://assets/graphics/environment/backgrounds/forestbackground.png" id="3_qewby"]
|
||||
[ext_resource type="Texture2D" uid="uid://dv63a7rb24ob8" path="res://assets/graphics/environment/backgrounds/trees.png" id="4_bradm"]
|
||||
[ext_resource type="Texture2D" uid="uid://bqe3w5v76lyek" path="res://assets/graphics/environment/terrain/Terrain (32x32).png" id="5_got4s"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvn642wmhcrfc" path="res://assets/graphics/environment/terrain/veg_32x32.png" id="6_e40mx"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy0lgun8t11xv" path="res://assets/graphics/environment/terrain/mushroom_32x64.png" id="7_a114e"]
|
||||
[ext_resource type="PackedScene" uid="uid://dlihpyr58tqqq" path="res://scenes/crate.tscn" id="8_y1e0c"]
|
||||
[ext_resource type="PackedScene" uid="uid://boqg1nyudmkh4" path="res://scenes/player.tscn" id="9_s4dsi"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfvm14fearqvq" path="res://scenes/coin.tscn" id="10_07lh1"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
|
||||
texture = ExtResource("5_got4s")
|
||||
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("6_e40mx")
|
||||
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("7_a114e")
|
||||
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)
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
||||
|
||||
[node name="game" type="Node2D"]
|
||||
|
||||
[node name="SceneManager" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("1_6qt4k")
|
||||
|
||||
[node name="skylayer" type="Parallax2D" parent="."]
|
||||
repeat_size = Vector2(320, 180)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="skylayer"]
|
||||
position = Vector2(160, 90)
|
||||
texture = ExtResource("2_fh4ka")
|
||||
|
||||
[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("3_qewby")
|
||||
|
||||
[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("4_bradm")
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||
texture_filter = 1
|
||||
tile_map_data = PackedByteArray("AAAOAAsAAAACAAAAAAANAAsAAAAAAAAAAAAMAAkAAAAEAAQAAAAOAA4AAAACAAIAAAANAA4AAAAAAAIAAAAMABAAAAAEAAQAAAAWAAsAAAACAAIAAAAVAAsAAAAAAAIAAAAVAAoAAAAAAAAAAAAWAAoAAAACAAAAAAATAAkAAAACAAQAAAASAAkAAAABAAQAAAARAAkAAAAAAAQAAAASAAsAAQAAAAAAAAANAAoAAQAAAAAAAAATAAgAAQAAAAAAAAAVAAkAAQAAAAAAAAAWAAkAAgAAAAEAAAAWAAgAAgAAAAAAAAAHAA0AAAAAAAIAAAAIAA0AAAABAAIAAAAJAA0AAAABAAIAAAAKAA0AAAAHAAAAAAAKAA4AAAAAAAIAAAALAA4AAAACAAIAAAAMAA0AAAABAAIAAAANAA0AAAAHAAAAAAAOAA0AAAAGAAAAAAAPAA0AAAABAAIAAAAQAA0AAAABAAIAAAARAA0AAAABAAIAAAASAA0AAAABAAIAAAATAA0AAAABAAIAAAAUAA0AAAACAAIAAAAUAAwAAAACAAAAAAATAAwAAAABAAAAAAASAAwAAAABAAAAAAAQAAwAAAABAAAAAAAPAAwAAAABAAAAAAAOAAwAAAAGAAEAAAANAAwAAAAHAAEAAAAMAAwAAAABAAAAAAALAA0AAAAGAAAAAAALAAwAAAABAAAAAAAKAAwAAAABAAAAAAAJAAwAAAABAAAAAAAIAAwAAAABAAAAAAAHAAwAAAAAAAAAAAARAAwAAAABAAAAAAA=")
|
||||
tile_set = SubResource("TileSet_0tnpc")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2(743, 490)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
shape = SubResource("RectangleShape2D_8cj0n")
|
||||
|
||||
[node name="Crate" parent="." instance=ExtResource("8_y1e0c")]
|
||||
position = Vector2(575, 221)
|
||||
|
||||
[node name="ground" type="StaticBody2D" parent="."]
|
||||
position = Vector2(551, 565)
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ground"]
|
||||
shape = SubResource("WorldBoundaryShape2D_8cj0n")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("9_s4dsi")]
|
||||
position = Vector2(563, 364)
|
||||
|
||||
[node name="triggers" type="Node2D" parent="."]
|
||||
|
||||
[node name="coins" type="Node2D" parent="."]
|
||||
|
||||
[node name="Coin" parent="coins" instance=ExtResource("10_07lh1")]
|
||||
position = Vector2(606, 375)
|
||||
|
||||
[node name="Coin2" parent="coins" instance=ExtResource("10_07lh1")]
|
||||
position = Vector2(529, 376)
|
||||
|
||||
[node name="Coin3" parent="coins" instance=ExtResource("10_07lh1")]
|
||||
position = Vector2(630, 375)
|
@ -1,16 +1,74 @@
|
||||
[gd_scene load_steps=28 format=3 uid="uid://b5p1mlv4c1olv"]
|
||||
[gd_scene load_steps=44 format=3 uid="uid://boqg1nyudmkh4"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_bqfhv"]
|
||||
[ext_resource type="Texture2D" uid="uid://daf4mmxa2xsjv" path="res://assets/graphics/player/jump_fall/player jump 48x48(1).png" id="2_dqkch"]
|
||||
[ext_resource type="Texture2D" uid="uid://djtlpe43a18d5" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_g2els"]
|
||||
[ext_resource type="Texture2D" uid="uid://dctuuekg8fi6i" path="res://assets/graphics/player/run/player run 48x48.png" id="3_qhqgy"]
|
||||
[ext_resource type="Script" uid="uid://b7rahgxxw1yuw" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3uwl6agc6dhb" path="res://assets/graphics/player/jump_fall/player jump 48x48.png" id="2_dqkch"]
|
||||
[ext_resource type="Texture2D" uid="uid://be0vnx023iw65" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_g2els"]
|
||||
[ext_resource type="Texture2D" uid="uid://o01smmrcbx3m" path="res://assets/graphics/player/death/Player Death 64x64(1).png" id="2_tuyoq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dmmtik7twhga4" path="res://assets/graphics/player/run/player run 48x48.png" id="3_qhqgy"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbi1q6oxsxa4p" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="3_qlg0r"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_8cj0n"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pf23h"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dt7fs"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wqfne"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wnwbv"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gl8cc"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_487ah"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_md1ol"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bj30b"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jc3p3"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hax0n"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
|
||||
atlas = ExtResource("2_dqkch")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
|
||||
atlas = ExtResource("3_qlg0r")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ke2ow"]
|
||||
atlas = ExtResource("3_qlg0r")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ujl30"]
|
||||
atlas = ExtResource("3_qlg0r")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_31cv2"]
|
||||
atlas = ExtResource("3_qlg0r")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@ -95,11 +153,63 @@ region = Rect2(336, 0, 48, 48)
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pf23h")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dt7fs")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wqfne")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wnwbv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gl8cc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_487ah")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_md1ol")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bj30b")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jc3p3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hax0n")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"death",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_i4ail")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"fall",
|
||||
"speed": 2.0
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_l71n6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ke2ow")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ujl30")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_31cv2")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"hurt",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
@ -178,34 +288,34 @@ animations = [{
|
||||
}]
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
script = ExtResource("1_bqfhv")
|
||||
script = ExtResource("1_3vyb7")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_8cj0n")
|
||||
debug_color = Color(0.256799, 0.626646, 0.294192, 0.42)
|
||||
debug_color = Color(0.172558, 0.632665, 0.34599, 0.42)
|
||||
|
||||
[node name="RightCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(21, 0)
|
||||
target_position = Vector2(16, 0)
|
||||
|
||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-20, 0)
|
||||
target_position = Vector2(-16, 0)
|
||||
|
||||
[node name="RightSpawn" type="Node2D" parent="."]
|
||||
position = Vector2(12, -7)
|
||||
position = Vector2(13, -4)
|
||||
|
||||
[node name="LeftSpawn" type="Node2D" parent="."]
|
||||
position = Vector2(-12, -7)
|
||||
position = Vector2(-13, -5)
|
||||
|
||||
[node name="jumpBufferTimer" type="Timer" parent="."]
|
||||
wait_time = 1.5
|
||||
[node name="JumpBufferTimer" type="Timer" parent="."]
|
||||
wait_time = 0.8
|
||||
one_shot = true
|
||||
|
||||
[node name="PlayerGraphic" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(2, -7)
|
||||
position = Vector2(0, -7)
|
||||
sprite_frames = SubResource("SpriteFrames_jej6c")
|
||||
animation = &"jump"
|
||||
animation = &"death"
|
||||
autoplay = "idle"
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
100
scenes/slime.tscn
Normal file
@ -0,0 +1,100 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://dpltbyp8ku2mi"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cuaxw7eh73a1i" path="res://scripts/slime.gd" id="1_p2gj0"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwwlva8pi3da2" path="res://assets/graphics/enemies/slime_purple (1).png" id="2_n6pvg"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_pjw23"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"]
|
||||
atlas = ExtResource("2_n6pvg")
|
||||
region = Rect2(0, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fd6lc"]
|
||||
atlas = ExtResource("2_n6pvg")
|
||||
region = Rect2(24, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gstla"]
|
||||
atlas = ExtResource("2_n6pvg")
|
||||
region = Rect2(48, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v5wyi"]
|
||||
atlas = ExtResource("2_n6pvg")
|
||||
region = Rect2(72, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_p2gj0"]
|
||||
atlas = ExtResource("2_n6pvg")
|
||||
region = Rect2(24, 48, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_n6pvg"]
|
||||
atlas = ExtResource("2_n6pvg")
|
||||
region = Rect2(48, 48, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"]
|
||||
atlas = ExtResource("2_n6pvg")
|
||||
region = Rect2(72, 48, 24, 24)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_0l8pv"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_2npkn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fd6lc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gstla")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v5wyi")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"Idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_p2gj0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_n6pvg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pjw23")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"hurt",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[node name="Slime" type="Area2D"]
|
||||
script = ExtResource("1_p2gj0")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
scale = Vector2(0.9, 0.9)
|
||||
shape = SubResource("CircleShape2D_pjw23")
|
||||
debug_color = Color(0.932998, 0.222862, 0.34393, 0.42)
|
||||
|
||||
[node name="SlimeGraphic" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -3)
|
||||
sprite_frames = SubResource("SpriteFrames_0l8pv")
|
||||
animation = &"hurt"
|
||||
autoplay = "Idle"
|
||||
|
||||
[node name="RightCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(13, 0)
|
||||
|
||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-14, 0)
|
||||
|
||||
[node name="LeftDownCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(-8, 0)
|
||||
target_position = Vector2(0, 10)
|
||||
|
||||
[node name="RightDownCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(8, 0)
|
||||
target_position = Vector2(0, 10)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="animation_finished" from="SlimeGraphic" to="." method="_on_slime_graphic_animation_finished"]
|
@ -1,16 +1,16 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://6n3305pqp43a"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://csotsc2cycyia"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c57chsew3r87y" path="res://scripts/trigger.gd" id="1_du5ex"]
|
||||
[ext_resource type="Script" uid="uid://ditcg54u4c1lr" path="res://scripts/trigger.gd" id="1_du5ex"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_uwrxv"]
|
||||
|
||||
[node name="trigger" type="Area2D"]
|
||||
scale = Vector2(3, 3)
|
||||
scale = Vector2(1.36, 1.12)
|
||||
script = ExtResource("1_du5ex")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_uwrxv")
|
||||
debug_color = Color(0.646097, 0.374776, 0.918255, 0.42)
|
||||
debug_color = Color(0.599313, 0.407655, 0.917879, 0.42)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
@ -3,7 +3,7 @@ class_name Bullet extends Area2D
|
||||
|
||||
|
||||
var speed:float = 700
|
||||
signal bulletDamageSignal(body,bullet)
|
||||
signal bulletDamageSignal(body, bullet)
|
||||
|
||||
func setSpeed(value:float):
|
||||
speed = value
|
||||
@ -17,8 +17,14 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
|
||||
print("Bullet hitting")
|
||||
if body.is_in_group("shootables"):
|
||||
print("This is shootable")
|
||||
bulletDamageSignal.emit(body, self)
|
||||
|
||||
bulletDamageSignal.emit(body,self)
|
||||
|
||||
func _on_area_entered(area: Area2D) -> void:
|
||||
print("Bullet hitting")
|
||||
if area.is_in_group("shootables"):
|
||||
print("This is shootable")
|
||||
bulletDamageSignal.emit(area, self)
|
||||
|
@ -1 +1 @@
|
||||
uid://p7brl4n4miw6
|
||||
uid://bhh178vuo5bgo
|
||||
|
@ -2,7 +2,7 @@ class_name Coin extends Area2D
|
||||
|
||||
signal coinCollectedSignal(body, coin)
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
print("coin collision")
|
||||
if body is Player:
|
||||
coinCollectedSignal.emit(body, self)
|
||||
|
1
scripts/coin.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://nqigicsb4oqh
|
@ -1 +1 @@
|
||||
uid://bv1u5eyjco2m8
|
||||
uid://c5gjsxgxmjfki
|
||||
|
@ -1,30 +1,148 @@
|
||||
extends Node2D
|
||||
signal playerDeathSignal
|
||||
signal playerDamageSignal(health, maxhealth)
|
||||
signal destroySignal(body)
|
||||
signal levelChangeSignal(level)
|
||||
|
||||
signal playerDamage
|
||||
var loadIntent = false
|
||||
var timer = Timer.new()
|
||||
var timeAvailable:int = 5
|
||||
|
||||
var levels = ["res://scenes/game.tscn","res://scenes/level2.tscn","res://scenes/level3.tscn"]
|
||||
var timers = [15,10,9]
|
||||
var currentLevel = 0
|
||||
|
||||
#character stats
|
||||
var enemy:CharacterStats
|
||||
var player:CharacterStats
|
||||
var playerCurrentHealth:int
|
||||
|
||||
var enemiesDict = {}
|
||||
|
||||
var saveObject = {}
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
func _ready() -> void:
|
||||
enemy = load("res://scripts/rscs/slimeStats.tres")
|
||||
player = load("res://scripts/rscs/playerStats.tres")
|
||||
playerCurrentHealth = player.starting_health
|
||||
|
||||
add_child(timer)
|
||||
timer.wait_time = 1
|
||||
timer.one_shot = false
|
||||
timer.connect("timeout", secondCounter)
|
||||
timer.start()
|
||||
|
||||
func reset():
|
||||
enemiesDict.clear()
|
||||
timeAvailable = timers[currentLevel]
|
||||
playerCurrentHealth = player.max_health
|
||||
|
||||
if loadIntent:
|
||||
var saved_game:SavedGame = load("res://scripts/rscs/gameSaveStats.tres")
|
||||
saveObject = saved_game.gameData
|
||||
playerCurrentHealth = saveObject ["PlayerHealth"]
|
||||
timeAvailable = saveObject["TimeAvailable"]
|
||||
loadIntent = false
|
||||
return saveObject
|
||||
return{}
|
||||
func secondCounter():
|
||||
timeAvailable -=1
|
||||
#check for time running out
|
||||
if timeAvailable <=0:
|
||||
print("You lose")
|
||||
levelChangeSignal.emit(levels[currentLevel])
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
if Input.is_action_just_pressed("save"):
|
||||
saveGame()
|
||||
if Input.is_action_just_pressed("load"):
|
||||
loadGame()
|
||||
|
||||
|
||||
func _on_trigger(effect: Variant, body:Variant) -> void:
|
||||
func _on_trigger(effect: Variant, body: Variant) -> void:
|
||||
print("GC sees trigger "+effect)
|
||||
match effect:
|
||||
"player_hurt":
|
||||
if body is Player:
|
||||
print("ouch")
|
||||
playerDamage.emit()
|
||||
if not body is Player:
|
||||
body.queue_free()
|
||||
print("hurt the player")
|
||||
#playerDamage.emit()
|
||||
#if not body is Player:
|
||||
# body.queue_free()
|
||||
|
||||
func bulletDamage(body, bullet):
|
||||
print("gc knows about bullet hit")
|
||||
body.queue_free()
|
||||
#apply_central_impulse(Vector2(shoveDirection,0)*700)
|
||||
print("GC know about bullet hit")
|
||||
if body is Slime:
|
||||
#give damage to this individual enemy
|
||||
enemiesDict[body]["health"] -= player.rangeDamage
|
||||
if enemiesDict[body]["health"] <=0:
|
||||
print ("enemy is dead")
|
||||
removeEnemyFromLevel(body)
|
||||
destroySignal.emit(body)
|
||||
else:
|
||||
print("enemy is damaged")
|
||||
body.handle_damage()
|
||||
|
||||
func coinCollected(body,coin):
|
||||
print("gc knows coin collected")
|
||||
func removeEnemyFromLevel(body)->void:
|
||||
enemiesDict.erase(body)
|
||||
|
||||
func coinCollected(body, coin):
|
||||
print("GC knows coin collected")
|
||||
destroySignal.emit(coin)
|
||||
|
||||
func totalCoinCount(count):
|
||||
print("GC knows total coins "+str(count))
|
||||
if count == 0:
|
||||
currentLevel +=1
|
||||
if currentLevel >= levels.size():
|
||||
currentLevel = 0
|
||||
levelChangeSignal.emit(levels[currentLevel])
|
||||
|
||||
func playerAttacked(body, slime):
|
||||
print("GC knows slime attack")
|
||||
print("Damge : "+str(enemiesDict[slime]["damage"]) )
|
||||
print("Player health : "+str(playerCurrentHealth))
|
||||
playerCurrentHealth -= enemiesDict[slime]["damage"]
|
||||
if playerCurrentHealth <=0:
|
||||
print("YOU DEAD")
|
||||
playerDeathSignal.emit()
|
||||
else:
|
||||
print("taking damage")
|
||||
playerDamageSignal.emit(playerCurrentHealth, player.max_health)
|
||||
|
||||
func deathComplete()->void:
|
||||
levelChangeSignal.emit(levels[currentLevel])
|
||||
|
||||
func addEnemyToLevel(slime)->void:
|
||||
var randHealth:int= randi() % 20
|
||||
var randDamage:int = randi() % 10
|
||||
var enemyState= {"health": enemy.health + randHealth,
|
||||
"damage": enemy.meleeDamage + randDamage
|
||||
}
|
||||
enemiesDict[slime]= enemyState
|
||||
|
||||
func saveGame()->void:
|
||||
saveObject["enemies"]={}
|
||||
var index = 0
|
||||
# create an object with all critical game data
|
||||
print("game Level"+str(currentLevel))
|
||||
print("time Remaining"+str(timeAvailable))
|
||||
print("player Health"+str(playerCurrentHealth))
|
||||
#bad guys stuff
|
||||
for key in enemiesDict:
|
||||
var tempObj = {}
|
||||
tempObj["health"]= enemiesDict[key]["health"]
|
||||
tempObj ["damage"]=enemiesDict[key]["damage"]
|
||||
tempObj["global_position"]= key.global_position
|
||||
saveObject["enemies"]["slime"+str(index)] = tempObj
|
||||
index +=1
|
||||
saveObject["GameLevel"]= currentLevel
|
||||
saveObject["TimeAvailable"]= timeAvailable
|
||||
saveObject["PlayerHealth"]= playerCurrentHealth
|
||||
var saved_game:SavedGame = SavedGame.new()
|
||||
saved_game.gameData = saveObject
|
||||
ResourceSaver.save(saved_game, "res://scripts/rscs/gameSaveStats.tres")
|
||||
|
||||
func loadGame()->void:
|
||||
loadIntent = true
|
||||
levelChangeSignal.emit(levels[saveObject["GameLevel"]])
|
||||
|
@ -1 +1 @@
|
||||
uid://cpua8fr5bby78
|
||||
uid://bblqtronap0j4
|
||||
|
@ -4,34 +4,41 @@ class_name Player extends CharacterBody2D
|
||||
@onready var left_cast: RayCast2D = $LeftCast
|
||||
@onready var right_spawn: Node2D = $RightSpawn
|
||||
@onready var left_spawn: Node2D = $LeftSpawn
|
||||
@onready var jump_buffer_timer: Timer = $jumpBufferTimer
|
||||
@onready var jump_buffer_timer: Timer = $JumpBufferTimer
|
||||
@onready var player_graphic: AnimatedSprite2D = $PlayerGraphic
|
||||
|
||||
const SPEED = 300
|
||||
const SPEED = 300.0
|
||||
const JUMP_VELOCITY = -400.0
|
||||
|
||||
@export var acceleration:int = 15
|
||||
@export var acceleration:int = 5
|
||||
var upJump:bool = false
|
||||
|
||||
var direction
|
||||
enum FaceDirection{LEFT, RIGHT}
|
||||
var facing:FaceDirection = FaceDirection.RIGHT
|
||||
enum State{IDLE,RUN,JUMP,FALLING}
|
||||
enum State{IDLE, RUN,JUMP,FALLING,HURT, DEATH}
|
||||
var current_state:State = State.IDLE
|
||||
|
||||
var pushTarget
|
||||
var pushEnabled := false
|
||||
|
||||
signal playerDeathCompleteSignal
|
||||
|
||||
|
||||
func _physics_process(delta:float) -> void:
|
||||
func _physics_process(delta: float) -> void:
|
||||
# Add the gravity.
|
||||
|
||||
if current_state != State.HURT and current_state != State.DEATH:
|
||||
handle_input()
|
||||
handle_movement(delta)
|
||||
handle_states()
|
||||
handle_animation()
|
||||
move_and_slide()
|
||||
handle_collisions()
|
||||
func handle_damage(health, maxhealth)->void:
|
||||
print("player takes damage")
|
||||
current_state = State.HURT
|
||||
|
||||
func handle_death()->void:
|
||||
print("player is dead")
|
||||
current_state = State.DEATH
|
||||
func handle_states() -> void:
|
||||
match current_state:
|
||||
State.IDLE when velocity.x !=0:
|
||||
@ -39,6 +46,7 @@ func handle_states() -> void:
|
||||
State.RUN:
|
||||
if velocity.x == 0:
|
||||
current_state = State.IDLE
|
||||
#player steps off ledge
|
||||
if not is_on_floor() && velocity.y > 0:
|
||||
current_state = State.FALLING
|
||||
State.FALLING when is_on_floor():
|
||||
@ -48,6 +56,8 @@ func handle_states() -> void:
|
||||
current_state = State.RUN
|
||||
State.JUMP when velocity.y >0:
|
||||
current_state = State.FALLING
|
||||
|
||||
|
||||
func handle_animation() -> void:
|
||||
match current_state:
|
||||
State.IDLE:
|
||||
@ -59,13 +69,16 @@ func handle_animation() -> void:
|
||||
State.JUMP:
|
||||
if upJump:
|
||||
player_graphic.play("jump")
|
||||
|
||||
State.HURT:
|
||||
player_graphic.play("hurt")
|
||||
State.DEATH:
|
||||
player_graphic.play("death")
|
||||
func handle_movement(delta:float) -> void:
|
||||
if direction == 0:
|
||||
#not moving
|
||||
velocity.x = move_toward(velocity.x,0, acceleration)
|
||||
else:
|
||||
velocity.x = move_toward(velocity.x,SPEED * direction, acceleration)
|
||||
velocity.x = move_toward(velocity.x, SPEED * direction, acceleration)
|
||||
|
||||
if not is_on_floor():
|
||||
velocity += get_gravity() * delta
|
||||
@ -80,48 +93,48 @@ func handle_input():
|
||||
#velocity.y = JUMP_VELOCITY
|
||||
jump_buffer_timer.start()
|
||||
direction = Input.get_axis("ui_left", "ui_right")
|
||||
if direction <0:
|
||||
facing =FaceDirection.LEFT
|
||||
if direction < 0:
|
||||
facing = FaceDirection.LEFT
|
||||
player_graphic.flip_h = true
|
||||
if direction > 0:
|
||||
facing = FaceDirection.RIGHT
|
||||
player_graphic.flip_h = false
|
||||
|
||||
if Input.is_action_just_pressed("shove") && pushEnabled:
|
||||
var shoveDirection:int
|
||||
match facing:
|
||||
FaceDirection.RIGHT:
|
||||
#this is where tabbing does'nt work
|
||||
shoveDirection = 1
|
||||
FaceDirection.LEFT:
|
||||
shoveDirection = -1
|
||||
pushTarget.apply_central_impulse(Vector2(shoveDirection,0)*700)
|
||||
if Input.is_action_just_pressed("shoot"):
|
||||
|
||||
print("Ima shoot")
|
||||
match facing:
|
||||
FaceDirection.RIGHT:
|
||||
|
||||
%SceneManager.makeBullet(right_spawn.global_transform,700)
|
||||
print("shoot to right")
|
||||
%SceneManager.makeBullet(right_spawn.global_transform, 700)
|
||||
FaceDirection.LEFT:
|
||||
%SceneManager.makeBullet(left_spawn.global_transform,-700)
|
||||
%SceneManager.makeBullet(left_spawn.global_transform, -700)
|
||||
|
||||
func handle_collisions():
|
||||
for i in get_slide_collision_count():
|
||||
var c = get_slide_collision(i)
|
||||
if c.get_collider() is RigidBody2D:
|
||||
c.get_collider().apply_central_impulse(-c.get_normal() * 100)
|
||||
# i?
|
||||
if right_cast.is_colliding() && facing == FaceDirection.RIGHT:
|
||||
|
||||
if right_cast.is_colliding() && facing==FaceDirection.RIGHT:
|
||||
print("RC is colliding")
|
||||
var collider = right_cast.get_collider()
|
||||
if collider is Node && collider is RigidBody2D && collider.is_in_group("pushables"):
|
||||
pushTarget = collider
|
||||
pushEnabled = true
|
||||
|
||||
if left_cast.is_colliding() && facing == FaceDirection.LEFT:
|
||||
|
||||
if left_cast.is_colliding() && facing==FaceDirection.LEFT:
|
||||
var collider = left_cast.get_collider()
|
||||
if collider is Node && collider is RigidBody2D && collider.is_in_group("pushables"):
|
||||
pushTarget = collider
|
||||
pushEnabled = true
|
||||
|
||||
if not right_cast.is_colliding() && not left_cast.is_colliding():
|
||||
pushEnabled = false
|
||||
|
||||
@ -130,3 +143,7 @@ func _on_animation_finished() -> void:
|
||||
match current_state:
|
||||
State.JUMP:
|
||||
upJump = false
|
||||
State.HURT:
|
||||
current_state = State.IDLE
|
||||
State.DEATH:
|
||||
playerDeathCompleteSignal.emit()
|
||||
|
@ -1 +1 @@
|
||||
uid://cnwga6l2btdbk
|
||||
uid://b7rahgxxw1yuw
|
||||
|
9
scripts/rscs/characterstats.gd
Normal file
@ -0,0 +1,9 @@
|
||||
class_name CharacterStats extends Resource
|
||||
|
||||
@export var health:int = 100
|
||||
@export var max_health: int =100
|
||||
@export var starting_health:int = 100
|
||||
|
||||
# damage dealing
|
||||
@export var meleeDamage:int = 10
|
||||
@export var rangeDamage:int = 0
|
1
scripts/rscs/characterstats.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://r408skwtvisy
|
18
scripts/rscs/gameSaveStats.tres
Normal file
@ -0,0 +1,18 @@
|
||||
[gd_resource type="Resource" script_class="SavedGame" load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/rscs/savedgame.gd" id="1_v2d26"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_v2d26")
|
||||
gameData = {
|
||||
"GameLevel": 0,
|
||||
"PlayerHealth": 100,
|
||||
"TimeAvailable": 7,
|
||||
"enemies": {
|
||||
"slime0": {
|
||||
"damage": 31,
|
||||
"global_position": Vector2(606.127, 280),
|
||||
"health": 68
|
||||
}
|
||||
}
|
||||
}
|
12
scripts/rscs/playerStats.tres
Normal file
@ -0,0 +1,12 @@
|
||||
[gd_resource type="Resource" script_class="CharacterStats" load_steps=2 format=3 uid="uid://bff0fewekswn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://r408skwtvisy" path="res://scripts/rscs/characterstats.gd" id="1_sqkfu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_sqkfu")
|
||||
health = 100
|
||||
max_health = 100
|
||||
starting_health = 100
|
||||
meleeDamage = 10
|
||||
rangeDamage = 30
|
||||
metadata/_custom_type_script = "uid://r408skwtvisy"
|
3
scripts/rscs/savedgame.gd
Normal file
@ -0,0 +1,3 @@
|
||||
class_name SavedGame extends Resource
|
||||
|
||||
@export var gameData:Dictionary
|
1
scripts/rscs/savedgame.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://b0iyohv2ch6yg
|
12
scripts/rscs/slimeStats.tres
Normal file
@ -0,0 +1,12 @@
|
||||
[gd_resource type="Resource" script_class="CharacterStats" load_steps=2 format=3 uid="uid://r5hx4gu0mtog"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://r408skwtvisy" path="res://scripts/rscs/characterstats.gd" id="1_ppipo"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ppipo")
|
||||
health = 50
|
||||
max_health = 50
|
||||
starting_health = 50
|
||||
meleeDamage = 25
|
||||
rangeDamage = 0
|
||||
metadata/_custom_type_script = "uid://r408skwtvisy"
|
@ -1,43 +1,100 @@
|
||||
class_name SceneManager extends Node2D
|
||||
var bulletArray = []
|
||||
var bulletArray =[]
|
||||
var totalAllowedBullets = 7
|
||||
var bullet = preload("res://scenes/bullet.tscn")
|
||||
@onready var game: Node2D = $".."
|
||||
var slime = preload("res://scenes/slime.tscn")
|
||||
@onready var triggers: Node2D = $"../triggers"
|
||||
@onready var coins: Node2D = $"../coins"
|
||||
@onready var enemies: Node2D = $"../enemies"
|
||||
@onready var player: Player = $"../Player"
|
||||
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var loadObject = Gamecontroller.reset()
|
||||
print("LOAD OBECT")
|
||||
print(loadObject)
|
||||
loadSceneInfo(loadObject)
|
||||
if triggers:
|
||||
for obj in triggers.get_children():
|
||||
if obj is Trigger:
|
||||
obj.areaTriggerSignal.connect(game._on_trigger)
|
||||
|
||||
|
||||
obj.areaTriggerSignal.connect(Gamecontroller._on_trigger)
|
||||
if coins:
|
||||
print("found coins")
|
||||
updateCoins()
|
||||
|
||||
if enemies:
|
||||
updateEnemies()
|
||||
|
||||
Gamecontroller.destroySignal.connect(destroy)
|
||||
Gamecontroller.levelChangeSignal.connect(changeScene)
|
||||
Gamecontroller.playerDamageSignal.connect(player.handle_damage)
|
||||
Gamecontroller.playerDeathSignal.connect(player.handle_death)
|
||||
|
||||
player.playerDeathCompleteSignal.connect(Gamecontroller.deathComplete)
|
||||
|
||||
func updateEnemies():
|
||||
for obj in enemies.get_children():
|
||||
if obj is Slime:
|
||||
if not obj.playerDamageSignal.is_connected(Gamecontroller.playerAttacked):
|
||||
obj.playerDamageSignal.connect(Gamecontroller.playerAttacked)
|
||||
Gamecontroller.addEnemyToLevel(obj)
|
||||
|
||||
|
||||
func updateCoins():
|
||||
var coinCount = 0
|
||||
for obj in coins.get_children():
|
||||
if obj is Coin:
|
||||
print("coin collected")
|
||||
obj.coinCollectedSignal.connect(game.coinCollected)
|
||||
if not obj.coinCollectedSignal.is_connected(Gamecontroller.coinCollected):
|
||||
obj.coinCollectedSignal.connect(Gamecontroller.coinCollected)
|
||||
#connect tree exit
|
||||
if not obj.tree_exited.is_connected(updateCoins):
|
||||
obj.tree_exited.connect(updateCoins)
|
||||
coinCount +=1
|
||||
Gamecontroller.totalCoinCount(coinCount)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
# makes and recycles bullets
|
||||
func bulletFactory():
|
||||
var myBullet:Bullet
|
||||
if bulletArray.size() < totalAllowedBullets:
|
||||
#make a new bullet
|
||||
myBullet = bullet.instantiate()
|
||||
myBullet.bulletDamageSignal.connect(game.bulletDamage)
|
||||
myBullet.bulletDamageSignal.connect(Gamecontroller.bulletDamage)
|
||||
owner.add_child(myBullet)
|
||||
else:
|
||||
myBullet = bulletArray.pop_back()
|
||||
|
||||
bulletArray.push_front(myBullet)
|
||||
return myBullet
|
||||
|
||||
func makeBullet(position, speed):
|
||||
var someBullet = bulletFactory()
|
||||
someBullet.setSpeed(speed)
|
||||
# postition the bullet
|
||||
someBullet.transform = position
|
||||
|
||||
func destroy(body):
|
||||
body.queue_free()
|
||||
func changeScene(level):
|
||||
get_tree().call_deferred("change_scene_to_file", level)
|
||||
func loadSceneInfo(loadObject)->void:
|
||||
print("make the scene")
|
||||
if loadObject.size()<1:
|
||||
print("bailing out")
|
||||
return
|
||||
if enemies:
|
||||
for obj in enemies.get_children():
|
||||
if obj is Slime:
|
||||
obj.queue_free()
|
||||
#build and place save game badguys
|
||||
var enemiesList = loadObject["enemies"]
|
||||
for key in enemiesList:
|
||||
print(enemiesList[key])
|
||||
var badguy = slime.instantiate()
|
||||
enemies.add_child(badguy)
|
||||
badguy.global_position = enemiesList[key]["global_position"]
|
||||
|
||||
|
@ -1 +1 @@
|
||||
uid://chu805lvjnh7s
|
||||
uid://d1daji4xwuj03
|
||||
|
51
scripts/slime.gd
Normal file
@ -0,0 +1,51 @@
|
||||
class_name Slime extends Area2D
|
||||
@onready var slime_graphic: AnimatedSprite2D = $SlimeGraphic
|
||||
@onready var right_cast: RayCast2D = $RightCast
|
||||
@onready var left_cast: RayCast2D = $LeftCast
|
||||
@onready var left_down_cast: RayCast2D = $LeftDownCast
|
||||
@onready var right_down_cast: RayCast2D = $RightDownCast
|
||||
|
||||
var speed:int = 100
|
||||
var direction = 1
|
||||
|
||||
signal playerDamageSignal(body, slime)
|
||||
|
||||
enum State {IDLE, HURT, DEATH}
|
||||
var currentState = State.IDLE
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
func updateAnimation()->void:
|
||||
match currentState:
|
||||
State.IDLE:
|
||||
slime_graphic.play("idle")
|
||||
State.HURT:
|
||||
slime_graphic.play("hurt")
|
||||
func handle_damage()->void:
|
||||
currentState = State.HURT
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
if not right_down_cast.is_colliding():
|
||||
direction = -1
|
||||
slime_graphic.flip_h = true
|
||||
|
||||
if not left_down_cast.is_colliding():
|
||||
direction = 1
|
||||
slime_graphic.flip_h = false
|
||||
updateAnimation()
|
||||
position.x += direction * speed * delta
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
if body is Player:
|
||||
print("Slime attack!")
|
||||
playerDamageSignal.emit(body, self)
|
||||
|
||||
|
||||
func _on_slime_graphic_animation_finished() -> void:
|
||||
match currentState:
|
||||
State.HURT:
|
||||
currentState = State.IDLE
|
1
scripts/slime.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://cuaxw7eh73a1i
|
@ -7,6 +7,9 @@ signal areaTriggerSignal(effect, Object)
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
print("trigger sees a body")
|
||||
print("Trigger sees reaction")
|
||||
areaTriggerSignal.emit(effect, body)
|
||||
|
||||
|
||||
func _on_area_trigger_signal(effect: Variant, Object: Variant) -> void:
|
||||
pass # Replace with function body.
|
||||
|
@ -1 +1 @@
|
||||
uid://c57chsew3r87y
|
||||
uid://ditcg54u4c1lr
|
||||
|