tilemaps sprite sheets animated sprites
This commit is contained in:
1 parent
74561cfb2f
commit
795d183025
19 files changed
+580
-32
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b74qeqtivdkpc"
|
||||||
|
path="res://.godot/imported/crate.png-a8589d0a814f9d7cb0facb9c1c1d5fda.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/graphics/crate.png"
|
||||||
|
dest_files=["res://.godot/imported/crate.png-a8589d0a814f9d7cb0facb9c1c1d5fda.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://qftgnypwbikp"
|
||||||
|
path="res://.godot/imported/Terrain (32x32).png-81a713b69add642b2640197ae95d1555.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/graphics/environment/terrain/Terrain (32x32).png"
|
||||||
|
dest_files=["res://.godot/imported/Terrain (32x32).png-81a713b69add642b2640197ae95d1555.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dvgh32yadcjcq"
|
||||||
|
path="res://.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/graphics/player/idle/Player Idle 48x48.png"
|
||||||
|
dest_files=["res://.godot/imported/Player Idle 48x48.png-9f43f14976963a2821a06ddf8579a76a.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1021 B |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cwiun1ntuu02d"
|
||||||
|
path="res://.godot/imported/player jump 48x48.png-1ccba0c36041038682bf917e1f6cf991.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/graphics/player/jump/player jump 48x48.png"
|
||||||
|
dest_files=["res://.godot/imported/player jump 48x48.png-1ccba0c36041038682bf917e1f6cf991.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://2mxlso64vnrk"
|
||||||
|
path="res://.godot/imported/player run 48x48.png-6d66612d48bfa4c8721495ba557ab7c6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/graphics/player/run/player run 48x48.png"
|
||||||
|
dest_files=["res://.godot/imported/player run 48x48.png-6d66612d48bfa4c8721495ba557ab7c6.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://chjhyldrqmyfi"
|
||||||
|
path="res://.godot/imported/pixel_bullet.png-30d6d1e8b5e1332f8b2e2cee72a9e790.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/graphics/projectiles/pixel_bullet.png"
|
||||||
|
dest_files=["res://.godot/imported/pixel_bullet.png-30d6d1e8b5e1332f8b2e2cee72a9e790.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
|
||||||
@@ -15,9 +15,18 @@ run/main_scene="res://scenes/game.tscn"
|
|||||||
config/features=PackedStringArray("4.3", "Forward Plus")
|
config/features=PackedStringArray("4.3", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=320
|
||||||
|
window/size/viewport_height=180
|
||||||
|
window/size/window_width_override=960
|
||||||
|
window/size/window_height_override=540
|
||||||
|
window/stretch/mode="viewport"
|
||||||
|
|
||||||
[file_customization]
|
[file_customization]
|
||||||
|
|
||||||
folder_colors={
|
folder_colors={
|
||||||
|
"res://assets/": "yellow",
|
||||||
"res://scripts/": "green"
|
"res://scripts/": "green"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://bw3gps1njvtgr"]
|
[gd_scene load_steps=3 format=3 uid="uid://bw3gps1njvtgr"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b74qeqtivdkpc" path="res://assets/graphics/crate.png" id="1_nsnd2"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ddwss"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ddwss"]
|
||||||
size = Vector2(26, 26)
|
size = Vector2(26, 26)
|
||||||
|
|
||||||
[node name="RigidBody2D" type="RigidBody2D" groups=["box"]]
|
[node name="RigidBody2D" type="RigidBody2D" groups=["box"]]
|
||||||
position = Vector2(411, 384)
|
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
rotation = -0.802465
|
|
||||||
shape = SubResource("RectangleShape2D_ddwss")
|
shape = SubResource("RectangleShape2D_ddwss")
|
||||||
debug_color = Color(0.848428, 0.374869, 0, 0.42)
|
debug_color = Color(0.848428, 0.374869, 0, 0.42)
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
|
texture_filter = 1
|
||||||
|
position = Vector2(0, 2)
|
||||||
|
scale = Vector2(0.095, 0.095)
|
||||||
|
texture = ExtResource("1_nsnd2")
|
||||||
@@ -1,15 +1,24 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://b2tgt64a7m32v"]
|
[gd_scene load_steps=4 format=3 uid="uid://b2tgt64a7m32v"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_jag7h"]
|
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_jag7h"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://chjhyldrqmyfi" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_fl8or"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_eswsk"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_eswsk"]
|
||||||
size = Vector2(7, 1)
|
size = Vector2(5, 2)
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D"]
|
[node name="Area2D" type="Area2D"]
|
||||||
script = ExtResource("1_jag7h")
|
script = ExtResource("1_jag7h")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(-0.5, 0)
|
||||||
shape = SubResource("RectangleShape2D_eswsk")
|
shape = SubResource("RectangleShape2D_eswsk")
|
||||||
debug_color = Color(0.827451, 1, 0, 0.419608)
|
debug_color = Color(0.827451, 1, 0, 0.419608)
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
|
texture_filter = 1
|
||||||
|
position = Vector2(-2, -1)
|
||||||
|
rotation = 3.14159
|
||||||
|
scale = Vector2(0.04, 0.04)
|
||||||
|
texture = ExtResource("2_fl8or")
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
+180
-1
@@ -1,15 +1,185 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://djgtbc1quqvwe"]
|
[gd_scene load_steps=28 format=3 uid="uid://djgtbc1quqvwe"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/dudecontroller.gd" id="1_ay2gi"]
|
[ext_resource type="Script" path="res://scripts/dudecontroller.gd" id="1_ay2gi"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dvgh32yadcjcq" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_5mbmt"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://2mxlso64vnrk" path="res://assets/graphics/player/run/player run 48x48.png" id="3_2y1a6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cwiun1ntuu02d" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_5o14d"]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_iice4"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_iice4"]
|
||||||
radius = 6.32456
|
radius = 6.32456
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_1yv5c"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(0, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tlaeb"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(48, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_20pqf"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(96, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2avsb"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(144, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_setfi"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(192, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2kldi"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(240, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fksgv"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(288, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_71xob"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(336, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_mabyy"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(384, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_1npam"]
|
||||||
|
atlas = ExtResource("2_5mbmt")
|
||||||
|
region = Rect2(432, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6celb"]
|
||||||
|
atlas = ExtResource("3_5o14d")
|
||||||
|
region = Rect2(0, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_vfeof"]
|
||||||
|
atlas = ExtResource("3_5o14d")
|
||||||
|
region = Rect2(48, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_x5qk1"]
|
||||||
|
atlas = ExtResource("3_5o14d")
|
||||||
|
region = Rect2(96, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aaf1m"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(0, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_yycch"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(48, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qesu5"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(96, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gminf"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(144, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_t50sr"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(192, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qmkn1"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(240, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_sgy1b"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(288, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_nc8cu"]
|
||||||
|
atlas = ExtResource("3_2y1a6")
|
||||||
|
region = Rect2(336, 0, 48, 48)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_ck70u"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_1yv5c")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_tlaeb")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_20pqf")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2avsb")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_setfi")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_2kldi")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_fksgv")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_71xob")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_mabyy")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_1npam")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"Idle",
|
||||||
|
"speed": 12.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_6celb")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_vfeof")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_x5qk1")
|
||||||
|
}],
|
||||||
|
"loop": false,
|
||||||
|
"name": &"Jump",
|
||||||
|
"speed": 8.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_aaf1m")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_yycch")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qesu5")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_gminf")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_t50sr")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qmkn1")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_sgy1b")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_nc8cu")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"Run",
|
||||||
|
"speed": 12.0
|
||||||
|
}]
|
||||||
|
|
||||||
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
|
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
|
||||||
script = ExtResource("1_ay2gi")
|
script = ExtResource("1_ay2gi")
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(0, 2)
|
||||||
|
scale = Vector2(0.937476, 2.2372)
|
||||||
shape = SubResource("CircleShape2D_iice4")
|
shape = SubResource("CircleShape2D_iice4")
|
||||||
debug_color = Color(0.598404, 0.370441, 1, 0.42)
|
debug_color = Color(0.598404, 0.370441, 1, 0.42)
|
||||||
|
|
||||||
@@ -25,3 +195,12 @@ position = Vector2(6, -5)
|
|||||||
|
|
||||||
[node name="LeftTarget" type="Node2D" parent="."]
|
[node name="LeftTarget" type="Node2D" parent="."]
|
||||||
position = Vector2(-6, -5)
|
position = Vector2(-6, -5)
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
|
texture_filter = 1
|
||||||
|
scale = Vector2(1.00239, 0.967018)
|
||||||
|
sprite_frames = SubResource("SpriteFrames_ck70u")
|
||||||
|
animation = &"Idle"
|
||||||
|
autoplay = "Idle"
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
+137
-22
@@ -1,37 +1,168 @@
|
|||||||
[gd_scene load_steps=9 format=3 uid="uid://ciko2h5jj1a3k"]
|
[gd_scene load_steps=12 format=4 uid="uid://ciko2h5jj1a3k"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://djgtbc1quqvwe" path="res://scenes/dude.tscn" id="1_4l1yw"]
|
[ext_resource type="PackedScene" uid="uid://djgtbc1quqvwe" path="res://scenes/dude.tscn" id="1_4l1yw"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bw3gps1njvtgr" path="res://scenes/box.tscn" id="1_mg5q5"]
|
[ext_resource type="PackedScene" uid="uid://bw3gps1njvtgr" path="res://scenes/box.tscn" id="1_mg5q5"]
|
||||||
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="1_tpgoh"]
|
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="1_tpgoh"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://qftgnypwbikp" path="res://assets/graphics/environment/terrain/Terrain (32x32).png" id="1_yjgfx"]
|
||||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="2_a7w16"]
|
[ext_resource type="Script" path="res://scripts/trigger.gd" id="2_a7w16"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b2tgt64a7m32v" path="res://scenes/bullet.tscn" id="4_0ysyc"]
|
[ext_resource type="PackedScene" uid="uid://b2tgt64a7m32v" path="res://scenes/bullet.tscn" id="4_0ysyc"]
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_bdyqk"]
|
||||||
|
texture = ExtResource("1_yjgfx")
|
||||||
|
texture_region_size = Vector2i(32, 32)
|
||||||
|
0:0/0 = 0
|
||||||
|
1:0/0 = 0
|
||||||
|
2:0/0 = 0
|
||||||
|
4:0/0 = 0
|
||||||
|
6:0/0 = 0
|
||||||
|
7:0/0 = 0
|
||||||
|
9:0/0 = 0
|
||||||
|
10:0/0 = 0
|
||||||
|
12:0/0 = 0
|
||||||
|
13:0/0 = 0
|
||||||
|
15:0/0 = 0
|
||||||
|
0:1/0 = 0
|
||||||
|
1:1/0 = 0
|
||||||
|
2:1/0 = 0
|
||||||
|
4:1/0 = 0
|
||||||
|
6:1/0 = 0
|
||||||
|
7:1/0 = 0
|
||||||
|
9:1/0 = 0
|
||||||
|
10:1/0 = 0
|
||||||
|
12:1/0 = 0
|
||||||
|
13:1/0 = 0
|
||||||
|
15:1/0 = 0
|
||||||
|
16:1/0 = 0
|
||||||
|
0:2/0 = 0
|
||||||
|
1:2/0 = 0
|
||||||
|
2:2/0 = 0
|
||||||
|
4:2/0 = 0
|
||||||
|
6:3/0 = 0
|
||||||
|
7:3/0 = 0
|
||||||
|
9:3/0 = 0
|
||||||
|
10:3/0 = 0
|
||||||
|
12:3/0 = 0
|
||||||
|
13:3/0 = 0
|
||||||
|
15:3/0 = 0
|
||||||
|
16:3/0 = 0
|
||||||
|
0:4/0 = 0
|
||||||
|
1:4/0 = 0
|
||||||
|
2:4/0 = 0
|
||||||
|
4:4/0 = 0
|
||||||
|
6:4/0 = 0
|
||||||
|
7:4/0 = 0
|
||||||
|
9:4/0 = 0
|
||||||
|
10:4/0 = 0
|
||||||
|
12:4/0 = 0
|
||||||
|
13:4/0 = 0
|
||||||
|
15:4/0 = 0
|
||||||
|
16:4/0 = 0
|
||||||
|
|
||||||
|
[sub_resource type="TileSet" id="TileSet_vbomn"]
|
||||||
|
tile_size = Vector2i(32, 32)
|
||||||
|
sources/0 = SubResource("TileSetAtlasSource_bdyqk")
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_fuiwd"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_fuiwd"]
|
||||||
size = Vector2(142, 10)
|
size = Vector2(142, 10)
|
||||||
|
|
||||||
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_vdfbk"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lbd3t"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lbd3t"]
|
||||||
size = Vector2(20, 4.47115)
|
size = Vector2(20, 4.47115)
|
||||||
|
|
||||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_vdfbk"]
|
|
||||||
|
|
||||||
[node name="Game" type="Node2D"]
|
[node name="Game" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||||
|
texture_filter = 1
|
||||||
|
tile_map_data = PackedByteArray("AAAKAA4AAAAAAAQAAAALAA4AAAABAAQAAAAMAA4AAAABAAQAAAANAA4AAAABAAQAAAAOAA4AAAACAAQAAAAJABEAAAABAAAAAAAIABEAAAABAAAAAAAHABEAAAABAAAAAAAGABEAAAABAAAAAAAFABEAAAABAAAAAAAEABEAAAABAAAAAAADABEAAAABAAAAAAAKABEAAAABAAAAAAALABEAAAABAAAAAAAMABEAAAABAAAAAAANABEAAAABAAAAAAAOABEAAAABAAAAAAAPABEAAAABAAAAAAAQABEAAAABAAAAAAARABEAAAABAAAAAAASABEAAAABAAAAAAATABEAAAABAAAAAAAUABEAAAABAAAAAAAVABEAAAABAAAAAAAWABEAAAABAAAAAAAXABEAAAABAAAAAAADABIAAAABAAEAAAAEABIAAAABAAEAAAAFABIAAAABAAEAAAAGABIAAAABAAEAAAAHABMAAAABAAEAAAAIABMAAAABAAEAAAAJABMAAAABAAEAAAAKABQAAAABAAEAAAALABQAAAABAAEAAAAMABQAAAABAAEAAAANABQAAAABAAEAAAAOABUAAAABAAEAAAAPABUAAAABAAEAAAAQABUAAAABAAEAAAARABUAAAABAAEAAAASABUAAAABAAEAAAATABUAAAABAAEAAAATABQAAAABAAEAAAAUABQAAAABAAEAAAAVABQAAAABAAEAAAAVABMAAAABAAEAAAAWABMAAAABAAEAAAAXABIAAAABAAEAAAAWABIAAAABAAEAAAADABMAAAABAAEAAAADABQAAAABAAEAAAADABUAAAABAAEAAAADABYAAAABAAEAAAADABcAAAABAAEAAAADABgAAAABAAEAAAADABkAAAABAAEAAAAEABMAAAABAAEAAAAEABQAAAABAAEAAAAEABUAAAABAAEAAAAEABYAAAABAAEAAAAEABcAAAABAAEAAAAEABgAAAABAAEAAAAEABkAAAABAAEAAAAFABMAAAABAAEAAAAFABQAAAABAAEAAAAFABUAAAABAAEAAAAFABYAAAABAAEAAAAFABcAAAABAAEAAAAFABgAAAABAAEAAAAFABkAAAABAAEAAAAGABMAAAABAAEAAAAGABQAAAABAAEAAAAGABUAAAABAAEAAAAGABYAAAABAAEAAAAGABcAAAABAAEAAAAGABgAAAABAAEAAAAGABkAAAABAAEAAAAHABIAAAABAAEAAAAHABQAAAABAAEAAAAHABUAAAABAAEAAAAHABYAAAABAAEAAAAHABcAAAABAAEAAAAHABgAAAABAAEAAAAHABkAAAABAAEAAAAIABIAAAABAAEAAAAIABQAAAABAAEAAAAIABUAAAABAAEAAAAIABYAAAABAAEAAAAIABcAAAABAAEAAAAIABgAAAABAAEAAAAIABkAAAABAAEAAAAJABIAAAABAAEAAAAJABQAAAABAAEAAAAJABUAAAABAAEAAAAJABYAAAABAAEAAAAJABcAAAABAAEAAAAJABgAAAABAAEAAAAJABkAAAABAAEAAAAKABIAAAABAAEAAAAKABMAAAABAAEAAAAKABUAAAABAAEAAAAKABYAAAABAAEAAAAKABcAAAABAAEAAAAKABgAAAABAAEAAAAKABkAAAABAAEAAAALABIAAAABAAEAAAALABMAAAABAAEAAAALABUAAAABAAEAAAALABYAAAABAAEAAAALABcAAAABAAEAAAALABgAAAABAAEAAAALABkAAAABAAEAAAAMABIAAAABAAEAAAAMABMAAAABAAEAAAAMABUAAAABAAEAAAAMABYAAAABAAEAAAAMABcAAAABAAEAAAAMABgAAAABAAEAAAAMABkAAAABAAEAAAANABIAAAABAAEAAAANABMAAAABAAEAAAANABUAAAABAAEAAAANABYAAAABAAEAAAANABcAAAABAAEAAAANABgAAAABAAEAAAANABkAAAABAAEAAAAOABIAAAABAAEAAAAOABMAAAABAAEAAAAOABQAAAABAAEAAAAOABYAAAABAAEAAAAOABcAAAABAAEAAAAOABgAAAABAAEAAAAOABkAAAABAAEAAAAPABIAAAABAAEAAAAPABMAAAABAAEAAAAPABQAAAABAAEAAAAPABYAAAABAAEAAAAPABcAAAABAAEAAAAPABgAAAABAAEAAAAPABkAAAABAAEAAAAQABIAAAABAAEAAAAQABMAAAABAAEAAAAQABQAAAABAAEAAAAQABYAAAABAAEAAAAQABcAAAABAAEAAAAQABgAAAABAAEAAAAQABkAAAABAAEAAAARABIAAAABAAEAAAARABMAAAABAAEAAAARABQAAAABAAEAAAARABYAAAABAAEAAAARABcAAAABAAEAAAARABgAAAABAAEAAAARABkAAAABAAEAAAASABIAAAABAAEAAAASABMAAAABAAEAAAASABQAAAABAAEAAAASABYAAAABAAEAAAASABcAAAABAAEAAAASABgAAAABAAEAAAASABkAAAABAAEAAAATABIAAAABAAEAAAATABMAAAABAAEAAAATABYAAAABAAEAAAATABcAAAABAAEAAAATABgAAAABAAEAAAATABkAAAABAAEAAAAUABIAAAABAAEAAAAUABMAAAABAAEAAAAUABUAAAABAAEAAAAUABYAAAABAAEAAAAUABcAAAABAAEAAAAUABgAAAABAAEAAAAUABkAAAABAAEAAAAVABIAAAABAAEAAAAVABUAAAABAAEAAAAVABYAAAABAAEAAAAVABcAAAABAAEAAAAVABgAAAABAAEAAAAVABkAAAABAAEAAAAWABQAAAABAAEAAAAWABUAAAABAAEAAAAWABYAAAABAAEAAAAWABcAAAABAAEAAAAWABgAAAABAAEAAAAWABkAAAABAAEAAAAXABMAAAABAAEAAAAXABQAAAABAAEAAAAXABUAAAABAAEAAAAXABYAAAABAAEAAAAXABcAAAABAAEAAAAXABgAAAABAAEAAAAXABkAAAABAAEAAADs/xEAAAABAAAAAADt/xEAAAABAAAAAADu/xEAAAABAAAAAADv/xEAAAABAAAAAADw/xEAAAABAAAAAADx/xEAAAABAAAAAADy/xEAAAABAAAAAADz/xEAAAABAAAAAAD0/xEAAAABAAAAAAD1/xEAAAABAAAAAAD2/xEAAAABAAAAAAD3/xEAAAABAAAAAAD4/xEAAAABAAAAAAD5/xEAAAABAAAAAAD6/xEAAAABAAAAAAD7/xEAAAABAAAAAAD8/xEAAAABAAAAAAD9/xEAAAABAAAAAAD+/xEAAAABAAAAAAD//xEAAAABAAAAAAAAABEAAAABAAAAAAABABEAAAABAAAAAAACABEAAAABAAAAAAAYABEAAAABAAAAAAAZABEAAAABAAAAAAAaABEAAAABAAAAAAAbABEAAAABAAAAAAAcABEAAAABAAAAAAAdABEAAAABAAAAAAAeABEAAAABAAAAAAAfABEAAAABAAAAAAAgABEAAAABAAAAAAAhABEAAAABAAAAAAAiABEAAAABAAAAAAAjABEAAAABAAAAAAAkABEAAAABAAAAAAAlABEAAAABAAAAAAAmABEAAAABAAAAAAAnABEAAAABAAAAAAAoABEAAAABAAAAAAApABEAAAABAAAAAAAqABEAAAABAAAAAAArABEAAAABAAAAAAAsABEAAAABAAAAAAAtABEAAAABAAAAAAAuABEAAAABAAAAAAAvABEAAAABAAAAAAAwABEAAAABAAAAAAAxABEAAAABAAAAAAAyABEAAAABAAAAAAAzABEAAAABAAAAAAA0ABEAAAABAAAAAAA1ABEAAAABAAAAAADs/xIAAAABAAEAAADs/xMAAAABAAEAAADs/xQAAAABAAEAAADs/xUAAAABAAEAAADs/xYAAAABAAEAAADs/xcAAAABAAEAAADs/xgAAAABAAEAAADs/xkAAAABAAEAAADs/xoAAAABAAEAAADs/xsAAAABAAEAAADt/xIAAAABAAEAAADt/xMAAAABAAEAAADt/xQAAAABAAEAAADt/xUAAAABAAEAAADt/xYAAAABAAEAAADt/xcAAAABAAEAAADt/xgAAAABAAEAAADt/xkAAAABAAEAAADt/xoAAAABAAEAAADt/xsAAAABAAEAAADu/xIAAAABAAEAAADu/xMAAAABAAEAAADu/xQAAAABAAEAAADu/xUAAAABAAEAAADu/xYAAAABAAEAAADu/xcAAAABAAEAAADu/xgAAAABAAEAAADu/xkAAAABAAEAAADu/xoAAAABAAEAAADu/xsAAAABAAEAAADv/xIAAAABAAEAAADv/xMAAAABAAEAAADv/xQAAAABAAEAAADv/xUAAAABAAEAAADv/xYAAAABAAEAAADv/xcAAAABAAEAAADv/xgAAAABAAEAAADv/xkAAAABAAEAAADv/xoAAAABAAEAAADv/xsAAAABAAEAAADw/xIAAAABAAEAAADw/xMAAAABAAEAAADw/xQAAAABAAEAAADw/xUAAAABAAEAAADw/xYAAAABAAEAAADw/xcAAAABAAEAAADw/xgAAAABAAEAAADw/xkAAAABAAEAAADw/xoAAAABAAEAAADw/xsAAAABAAEAAADx/xIAAAABAAEAAADx/xMAAAABAAEAAADx/xQAAAABAAEAAADx/xUAAAABAAEAAADx/xYAAAABAAEAAADx/xcAAAABAAEAAADx/xgAAAABAAEAAADx/xkAAAABAAEAAADx/xoAAAABAAEAAADx/xsAAAABAAEAAADy/xIAAAABAAEAAADy/xMAAAABAAEAAADy/xQAAAABAAEAAADy/xLine truncated
|
||||||
|
tile_set = SubResource("TileSet_vbomn")
|
||||||
|
|
||||||
[node name="SceneManager" type="Node" parent="."]
|
[node name="SceneManager" type="Node" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
script = ExtResource("1_tpgoh")
|
script = ExtResource("1_tpgoh")
|
||||||
|
|
||||||
|
[node name="CharacterBody2D" parent="." instance=ExtResource("1_4l1yw")]
|
||||||
|
position = Vector2(347, 305)
|
||||||
|
|
||||||
[node name="Platform" type="StaticBody2D" parent="."]
|
[node name="Platform" type="StaticBody2D" parent="."]
|
||||||
position = Vector2(394, 460)
|
position = Vector2(400, 464)
|
||||||
|
scale = Vector2(1.08, 2.84)
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform"]
|
||||||
scale = Vector2(1.02381, 1.00385)
|
scale = Vector2(1.02381, 1.00385)
|
||||||
shape = SubResource("RectangleShape2D_fuiwd")
|
shape = SubResource("RectangleShape2D_fuiwd")
|
||||||
|
|
||||||
[node name="CharacterBody2D" parent="." instance=ExtResource("1_4l1yw")]
|
[node name="Platform2" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2(592, 399)
|
||||||
|
scale = Vector2(0.199995, 2.84)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform2"]
|
||||||
|
scale = Vector2(1.02381, 1.00385)
|
||||||
|
shape = SubResource("RectangleShape2D_fuiwd")
|
||||||
|
|
||||||
|
[node name="Platform4" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2(112, 271)
|
||||||
|
scale = Vector2(0.199995, 2.84)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform4"]
|
||||||
|
scale = Vector2(1.02381, 1.00385)
|
||||||
|
shape = SubResource("RectangleShape2D_fuiwd")
|
||||||
|
|
||||||
|
[node name="Platform5" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2(-16, 399)
|
||||||
|
scale = Vector2(0.199995, 2.84)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform5"]
|
||||||
|
scale = Vector2(1.02381, 1.00385)
|
||||||
|
shape = SubResource("RectangleShape2D_fuiwd")
|
||||||
|
|
||||||
|
[node name="Platform3" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2(752, 335)
|
||||||
|
scale = Vector2(0.199995, 2.84)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform3"]
|
||||||
|
scale = Vector2(1.02381, 1.00385)
|
||||||
|
shape = SubResource("RectangleShape2D_fuiwd")
|
||||||
|
|
||||||
|
[node name="RigidBody2D" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
|
||||||
|
position = Vector2(422, 415)
|
||||||
|
|
||||||
|
[node name="RigidBody2D2" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
|
||||||
|
position = Vector2(366, 398)
|
||||||
|
|
||||||
|
[node name="RigidBody2D3" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
|
||||||
|
position = Vector2(398, 360)
|
||||||
|
|
||||||
|
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2(352, 545)
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||||
|
shape = SubResource("WorldBoundaryShape2D_vdfbk")
|
||||||
|
|
||||||
|
[node name="StaticBody2D2" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2(-513, 299)
|
||||||
|
rotation = 1.5708
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D2"]
|
||||||
|
shape = SubResource("WorldBoundaryShape2D_vdfbk")
|
||||||
|
|
||||||
|
[node name="StaticBody2D3" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2(1217, 299)
|
||||||
|
rotation = -1.5708
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D3"]
|
||||||
|
shape = SubResource("WorldBoundaryShape2D_vdfbk")
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="."]
|
[node name="Area2D" type="Area2D" parent="."]
|
||||||
position = Vector2(392, 535)
|
position = Vector2(392, 533)
|
||||||
scale = Vector2(24.2, 4.16)
|
scale = Vector2(24.2, 4.16)
|
||||||
script = ExtResource("2_a7w16")
|
script = ExtResource("2_a7w16")
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
@@ -41,22 +172,6 @@ position = Vector2(0, -7.76443)
|
|||||||
shape = SubResource("RectangleShape2D_lbd3t")
|
shape = SubResource("RectangleShape2D_lbd3t")
|
||||||
debug_color = Color(0.31865, 0.625237, 0, 0.42)
|
debug_color = Color(0.31865, 0.625237, 0, 0.42)
|
||||||
|
|
||||||
[node name="RigidBody2D" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
|
|
||||||
position = Vector2(432, 417)
|
|
||||||
|
|
||||||
[node name="RigidBody2D2" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
|
|
||||||
position = Vector2(405, 385)
|
|
||||||
|
|
||||||
[node name="RigidBody2D3" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
|
|
||||||
position = Vector2(422, 344)
|
|
||||||
|
|
||||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
|
||||||
position = Vector2(352, 535)
|
|
||||||
metadata/_edit_group_ = true
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
|
||||||
shape = SubResource("WorldBoundaryShape2D_vdfbk")
|
|
||||||
|
|
||||||
[node name="Area2D2" parent="." instance=ExtResource("4_0ysyc")]
|
[node name="Area2D2" parent="." instance=ExtResource("4_0ysyc")]
|
||||||
position = Vector2(269, 391)
|
position = Vector2(269, 391)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class_name Bullet extends Area2D
|
class_name Bullet extends Area2D
|
||||||
|
@onready var bulletSprite: Sprite2D = $Sprite2D
|
||||||
|
|
||||||
var speed = 750
|
var speed = 750
|
||||||
# did I hit someone?
|
# did I hit someone?
|
||||||
@@ -6,6 +7,10 @@ signal hit(bullet, body)
|
|||||||
|
|
||||||
func setSpeed(speedValue):
|
func setSpeed(speedValue):
|
||||||
speed = speedValue
|
speed = speedValue
|
||||||
|
if speed <0:
|
||||||
|
bulletSprite.flip_h = true
|
||||||
|
else:
|
||||||
|
bulletSprite.flip_h = false
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
position += transform.x * speed * delta
|
position += transform.x * speed * delta
|
||||||
|
|||||||
@@ -2,17 +2,20 @@ extends CharacterBody2D
|
|||||||
|
|
||||||
|
|
||||||
const SPEED = 300.0
|
const SPEED = 300.0
|
||||||
const JUMP_VELOCITY = -400.0
|
const JUMP_VELOCITY = -500.0
|
||||||
const BUMP_FORCE = 50
|
const BUMP_FORCE = 50
|
||||||
const PUSHFORCE = 750
|
const PUSHFORCE = 750
|
||||||
|
|
||||||
@onready var right_ray: RayCast2D = $RightRay
|
@onready var right_ray: RayCast2D = $RightRay
|
||||||
@onready var left_ray: RayCast2D = $LeftRay
|
@onready var left_ray: RayCast2D = $LeftRay
|
||||||
|
@onready var playerSprite: AnimatedSprite2D = $AnimatedSprite2D
|
||||||
|
|
||||||
var faceLeft = false
|
var faceLeft = false
|
||||||
|
|
||||||
var pushTarget
|
var pushTarget
|
||||||
var pushLefEnabled = false
|
var pushLefEnabled = false
|
||||||
var pushRightEnabled = false
|
var pushRightEnabled = false
|
||||||
|
var isJumping = false
|
||||||
@onready var right_target: Node2D = $RightTarget
|
@onready var right_target: Node2D = $RightTarget
|
||||||
@onready var left_target: Node2D = $LeftTarget
|
@onready var left_target: Node2D = $LeftTarget
|
||||||
|
|
||||||
@@ -50,11 +53,29 @@ func _physics_process(delta: float) -> void:
|
|||||||
|
|
||||||
if direction:
|
if direction:
|
||||||
velocity.x = direction * SPEED
|
velocity.x = direction * SPEED
|
||||||
if direction > 0: faceLeft = false
|
if direction >0:
|
||||||
if direction < 0: faceLeft = true
|
faceLeft = false
|
||||||
|
if direction <0:
|
||||||
|
faceLeft = true
|
||||||
else:
|
else:
|
||||||
velocity.x = move_toward(velocity.x, 0, SPEED)
|
velocity.x = move_toward(velocity.x, 0, SPEED)
|
||||||
|
|
||||||
|
if faceLeft:
|
||||||
|
playerSprite.flip_h = true
|
||||||
|
else:
|
||||||
|
playerSprite.flip_h = false
|
||||||
|
|
||||||
|
if is_on_floor():
|
||||||
|
isJumping = false
|
||||||
|
if direction == 0:
|
||||||
|
playerSprite.play("Idle")
|
||||||
|
else:
|
||||||
|
playerSprite.play("Run")
|
||||||
|
else:
|
||||||
|
if not isJumping:
|
||||||
|
playerSprite.play("Jump")
|
||||||
|
isJumping = true
|
||||||
|
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
if right_ray.is_colliding():
|
if right_ray.is_colliding():
|
||||||
print("Something is on my right")
|
print("Something is on my right")
|
||||||
|
|||||||
Reference in new issue
Block a user