adding 2d platform example
This commit is contained in:
1 parent
dc39162484
commit
cd587efa97
34 files changed
+1070
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dbum1stq6n86b"
|
||||
path="res://.godot/imported/Player Idle2 48x48-sheet.png-cb7e381a11297e7d8bb895bc29d966c9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/Player Idle2 48x48-sheet.png"
|
||||
dest_files=["res://.godot/imported/Player Idle2 48x48-sheet.png-cb7e381a11297e7d8bb895bc29d966c9.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
|
||||
@@ -0,0 +1,11 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dt2rusldupc6v"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/areatrigger.gd" id="1_dx3rr"]
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource("1_dx3rr")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="area_exited" from="." to="." method="_on_area_exited"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="body_exited" from="." to="." method="_on_body_exited"]
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://rlf02wnv5qy0"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ceibc"]
|
||||
|
||||
[node name="Node2D" type="StaticBody2D"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_ceibc")
|
||||
@@ -0,0 +1,21 @@
|
||||
extends Area2D
|
||||
|
||||
var speed = 750
|
||||
|
||||
func setSpeed(speedVal):
|
||||
speed = speedVal
|
||||
|
||||
func _physics_process(delta):
|
||||
position += transform.x * speed * delta
|
||||
|
||||
func _on_Bullet_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_body_entered(body):
|
||||
# blast the body?
|
||||
if body.is_in_group("boxes"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://xwd8bdam816x"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/bullet.gd" id="1_oo7le"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_cirwx"]
|
||||
radius = 4.12311
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource("1_oo7le")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_cirwx")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -0,0 +1,291 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://btr1v6mjh6q7a"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c00dlfcxocli4" path="res://scenes/player.tscn" id="1_7jlej"]
|
||||
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_tonux"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvq2wqwuubxpi" path="res://assets/Basic Tilemap.png" id="2_uv2vm"]
|
||||
[ext_resource type="PackedScene" uid="uid://rlf02wnv5qy0" path="res://scenes/blank.tscn" id="3_qlpj2"]
|
||||
[ext_resource type="PackedScene" uid="uid://dhxfhran2kbej" path="res://scenes/rigidbody.tscn" id="4_kdau4"]
|
||||
[ext_resource type="PackedScene" uid="uid://dt2rusldupc6v" path="res://scenes/areatrigger.tscn" id="5_7b553"]
|
||||
[ext_resource type="PackedScene" uid="uid://xwd8bdam816x" path="res://scenes/bullet.tscn" id="7_djmta"]
|
||||
[ext_resource type="PackedScene" uid="uid://b4ne0ie30580r" path="res://scenes/platform.tscn" id="8_ciwq4"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gwkyc"]
|
||||
texture = ExtResource("2_uv2vm")
|
||||
0:0/0 = 0
|
||||
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:0/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:0/0 = 0
|
||||
1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:0/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:0/0 = 0
|
||||
2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:0/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:0/0 = 0
|
||||
3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:0/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:1/0 = 0
|
||||
0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:1/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:1/0 = 0
|
||||
1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:1/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:1/0 = 0
|
||||
2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:1/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:1/0 = 0
|
||||
3:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:1/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:2/0 = 0
|
||||
0:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:2/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:2/0 = 0
|
||||
1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:2/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:2/0 = 0
|
||||
2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:2/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:2/0 = 0
|
||||
3:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:2/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:3/0 = 0
|
||||
0:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:3/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:3/0 = 0
|
||||
1:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:3/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:3/0 = 0
|
||||
2:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:3/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:3/0 = 0
|
||||
3:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:3/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:4/0 = 0
|
||||
0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:4/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
1:4/0 = 0
|
||||
1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:4/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
2:4/0 = 0
|
||||
2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:4/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
3:4/0 = 0
|
||||
3:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:4/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
4:4/0 = 0
|
||||
4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
4:4/0/physics_layer_0/angular_velocity = 0.0
|
||||
4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
5:4/0 = 0
|
||||
5:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
5:4/0/physics_layer_0/angular_velocity = 0.0
|
||||
5:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
0:5/0 = 0
|
||||
0:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:5/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:5/0 = 0
|
||||
1:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:5/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:5/0 = 0
|
||||
2:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:5/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:5/0 = 0
|
||||
3:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:5/0/physics_layer_0/angular_velocity = 0.0
|
||||
4:5/0 = 0
|
||||
4:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
4:5/0/physics_layer_0/angular_velocity = 0.0
|
||||
5:5/0 = 0
|
||||
5:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
5:5/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:6/0 = 0
|
||||
0:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:6/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:6/0 = 0
|
||||
1:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:6/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:6/0 = 0
|
||||
2:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:6/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:6/0 = 0
|
||||
3:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:6/0/physics_layer_0/angular_velocity = 0.0
|
||||
4:6/0 = 0
|
||||
4:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
4:6/0/physics_layer_0/angular_velocity = 0.0
|
||||
5:6/0 = 0
|
||||
5:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
5:6/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:7/0 = 0
|
||||
0:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:7/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:7/0 = 0
|
||||
1:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:7/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:7/0 = 0
|
||||
2:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:7/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:7/0 = 0
|
||||
3:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:7/0/physics_layer_0/angular_velocity = 0.0
|
||||
4:7/0 = 0
|
||||
4:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
4:7/0/physics_layer_0/angular_velocity = 0.0
|
||||
5:7/0 = 0
|
||||
5:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
5:7/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:8/0 = 0
|
||||
0:8/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:8/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:8/0 = 0
|
||||
1:8/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:8/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:8/0 = 0
|
||||
2:8/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:8/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:8/0 = 0
|
||||
3:8/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:8/0/physics_layer_0/angular_velocity = 0.0
|
||||
4:8/0 = 0
|
||||
4:8/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
4:8/0/physics_layer_0/angular_velocity = 0.0
|
||||
5:8/0 = 0
|
||||
5:8/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
5:8/0/physics_layer_0/angular_velocity = 0.0
|
||||
0:9/0 = 0
|
||||
0:9/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
0:9/0/physics_layer_0/angular_velocity = 0.0
|
||||
1:9/0 = 0
|
||||
1:9/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
1:9/0/physics_layer_0/angular_velocity = 0.0
|
||||
2:9/0 = 0
|
||||
2:9/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
2:9/0/physics_layer_0/angular_velocity = 0.0
|
||||
3:9/0 = 0
|
||||
3:9/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
3:9/0/physics_layer_0/angular_velocity = 0.0
|
||||
4:9/0 = 0
|
||||
4:9/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
4:9/0/physics_layer_0/angular_velocity = 0.0
|
||||
5:9/0 = 0
|
||||
5:9/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||
5:9/0/physics_layer_0/angular_velocity = 0.0
|
||||
|
||||
[sub_resource type="TileSet" id="TileSet_66kjy"]
|
||||
physics_layer_0/collision_layer = 1
|
||||
sources/0 = SubResource("TileSetAtlasSource_gwkyc")
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ycvkv"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_7wahi"]
|
||||
radius = 26.1725
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wkkpi"]
|
||||
size = Vector2(47, 20)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_sy75i"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(258, 94)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_dn2lq"]
|
||||
resource_name = "moveplatform"
|
||||
loop_mode = 2
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(258, 94), Vector2(295, 94)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_potwp"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_sy75i"),
|
||||
"moveplatform": SubResource("Animation_dn2lq")
|
||||
}
|
||||
|
||||
[node name="game" type="Node2D"]
|
||||
script = ExtResource("1_tonux")
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
position = Vector2(28, -10)
|
||||
tile_set = SubResource("TileSet_66kjy")
|
||||
format = 2
|
||||
layer_0/tile_data = PackedInt32Array(524298, 0, 4, 524299, 0, 4, 524300, 0, 4, 524301, 0, 4, 524302, 0, 4, 524303, 0, 4, 786435, 0, 4, 786436, 0, 4, 786437, 0, 4, 786438, 0, 4, 786439, 0, 4, 786440, 0, 4, 786441, 0, 4, 786442, 0, 4, 786443, 0, 4, 786444, 0, 4, 786445, 0, 4, 786446, 0, 4, 720907, 0, 4, 720908, 0, 4, 720909, 0, 4, 720910, 0, 4, 720902, 0, 4, 720903, 0, 4, 720904, 0, 4, 786447, 65536, 4, 786448, 65536, 4, 786449, 65536, 4, 786450, 65536, 4, 786451, 65536, 4, 786452, 65536, 4, 786453, 65536, 4, 655380, 65536, 4, 655381, 65536, 4, 655382, 65536, 4, 458775, 65536, 4, 655385, 65536, 4, 655386, 65536, 4, 655387, 65536, 4, 655388, 65536, 4, 786456, 65536, 4)
|
||||
|
||||
[node name="player" parent="." instance=ExtResource("1_7jlej")]
|
||||
position = Vector2(166, 144)
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="player"]
|
||||
position = Vector2(0, 8)
|
||||
position_smoothing_enabled = true
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2(7, 11)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
position = Vector2(0, 173)
|
||||
shape = SubResource("WorldBoundaryShape2D_ycvkv")
|
||||
|
||||
[node name="Node2D" parent="." instance=ExtResource("3_qlpj2")]
|
||||
position = Vector2(232, 151)
|
||||
|
||||
[node name="RigidBody2D" parent="." groups=["boxes"] instance=ExtResource("4_kdau4")]
|
||||
position = Vector2(133, 135)
|
||||
|
||||
[node name="RigidBody2D2" parent="." groups=["boxes"] instance=ExtResource("4_kdau4")]
|
||||
position = Vector2(226, 18)
|
||||
rotation = 0.634724
|
||||
|
||||
[node name="TriggerOne" parent="." instance=ExtResource("5_7b553")]
|
||||
position = Vector2(357, 122)
|
||||
effect = "unlock"
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TriggerOne"]
|
||||
shape = SubResource("CircleShape2D_7wahi")
|
||||
debug_color = Color(0.6, 0.384314, 0.972549, 0.419608)
|
||||
|
||||
[node name="TriggerOne2" parent="." instance=ExtResource("5_7b553")]
|
||||
position = Vector2(465, 138)
|
||||
effect = "boxdrop"
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TriggerOne2"]
|
||||
position = Vector2(-0.5, 0)
|
||||
shape = SubResource("RectangleShape2D_wkkpi")
|
||||
debug_color = Color(0.631373, 0.364706, 0.968627, 0.419608)
|
||||
|
||||
[node name="Area2D" parent="." instance=ExtResource("7_djmta")]
|
||||
position = Vector2(88, 153)
|
||||
|
||||
[node name="AnimatableBody2D" parent="." instance=ExtResource("8_ciwq4")]
|
||||
position = Vector2(258, 94)
|
||||
|
||||
[node name="AnimationPlayer2" type="AnimationPlayer" parent="AnimatableBody2D"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_potwp")
|
||||
}
|
||||
autoplay = "moveplatform"
|
||||
|
||||
[connection signal="areatrigger" from="TriggerOne" to="." method="_on_trigger_one_areatrigger"]
|
||||
[connection signal="areatrigger" from="TriggerOne2" to="." method="_on_trigger_one_areatrigger"]
|
||||
@@ -0,0 +1,11 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://b4ne0ie30580r"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ek45w"]
|
||||
size = Vector2(85.5, 13)
|
||||
|
||||
[node name="AnimatableBody2D" type="AnimatableBody2D"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 1)
|
||||
shape = SubResource("RectangleShape2D_ek45w")
|
||||
one_way_collision = true
|
||||
@@ -0,0 +1,206 @@
|
||||
[gd_scene load_steps=28 format=3 uid="uid://c00dlfcxocli4"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/playermovement.gd" id="1_rrp5c"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2nsy4x6du75k" path="res://assets/Player Idle/Player Idle2 48x48-sheet.png" id="2_lr1nb"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwet0pba0buvn" path="res://assets/Player Jump/player jump 48x48.png" id="3_8nqpn"]
|
||||
[ext_resource type="Texture2D" uid="uid://2fx0fypbda7f" path="res://assets/Player Run/player run 48x48.png" id="3_pduqe"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v3hls"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3k3pl"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s5bpa"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y8ggy"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qtbxx"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dtyki"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ffign"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g2qw3"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y5klf"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vka0u"]
|
||||
atlas = ExtResource("2_lr1nb")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_r2358"]
|
||||
atlas = ExtResource("3_8nqpn")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mjgsl"]
|
||||
atlas = ExtResource("3_8nqpn")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lvng6"]
|
||||
atlas = ExtResource("3_8nqpn")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dsono"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g1606"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g22wv"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_eolqe"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0t01r"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ouhby"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a6ukc"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d4v3u"]
|
||||
atlas = ExtResource("3_pduqe")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_5iuqe"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v3hls")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3k3pl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s5bpa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_y8ggy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qtbxx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dtyki")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ffign")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g2qw3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_y5klf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vka0u")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 10.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_r2358")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mjgsl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lvng6")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"jump",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dsono")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g1606")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g22wv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eolqe")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0t01r")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ouhby")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a6ukc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_d4v3u")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_8lwox"]
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D"]
|
||||
script = ExtResource("1_rrp5c")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_5iuqe")
|
||||
animation = &"idle"
|
||||
autoplay = "idle"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 7)
|
||||
shape = SubResource("CircleShape2D_8lwox")
|
||||
|
||||
[node name="RightRaycast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(20, 0)
|
||||
|
||||
[node name="LeftRaycast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-20, 0)
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
offset_left = -19.0
|
||||
offset_top = -30.0
|
||||
offset_right = 21.0
|
||||
offset_bottom = -14.0
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "Idle"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MarkerRight" type="Node2D" parent="."]
|
||||
position = Vector2(10, -2)
|
||||
|
||||
[node name="MarkerLeft" type="Node2D" parent="."]
|
||||
position = Vector2(-11, -1)
|
||||
@@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dhxfhran2kbej"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i3bag"]
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D"]
|
||||
mass = 2.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_i3bag")
|
||||
debug_color = Color(0.756863, 0.447059, 0.25098, 0.419608)
|
||||
Reference in new issue
Block a user