Add animation, Box Trap for Area2D
This commit is contained in:
1 parent
0b64fc5ff8
commit
4be87a6b40
17 files changed
+283
-21
No files matched your search
+52
-2
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://y083suj12rld"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://y083suj12rld"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_77wyw"]
|
||||
[ext_resource type="PackedScene" uid="uid://go4yc8hfo1gq" path="res://scenes/character.tscn" id="2_64ccm"]
|
||||
[ext_resource type="Texture2D" uid="uid://iphyceyp7aay" path="res://Graphics/Terrain (32x32).png" id="2_74wn8"]
|
||||
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="2_nfj1w"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwfm01fpdmr1k" path="res://scenes/crate.tscn" id="2_wqngy"]
|
||||
[ext_resource type="PackedScene" uid="uid://47xe40uafw3l" path="res://scenes/platform.tscn" id="6_lke75"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_vd3un"]
|
||||
texture = ExtResource("2_74wn8")
|
||||
@@ -480,6 +481,44 @@ sources/0 = SubResource("TileSetAtlasSource_vd3un")
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
|
||||
radius = 60.2993
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wmrpw"]
|
||||
resource_name = "move"
|
||||
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(0, 0), Vector2(150, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fpywj"]
|
||||
length = 0.001
|
||||
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),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_eotb0"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_fpywj"),
|
||||
"move": SubResource("Animation_wmrpw")
|
||||
}
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_77wyw")
|
||||
|
||||
@@ -506,7 +545,7 @@ PUSH_FORCE = 550
|
||||
[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"]
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
position = Vector2(260, 352)
|
||||
position = Vector2(335, 117)
|
||||
script = ExtResource("2_nfj1w")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
@@ -518,5 +557,16 @@ debug_color = Color(0.556863, 0.415686, 0.964706, 0.419608)
|
||||
position = Vector2(216, 145)
|
||||
scale = Vector2(2.96, 2.56)
|
||||
|
||||
[node name="Platform" parent="." instance=ExtResource("6_lke75")]
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Platform"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_eotb0")
|
||||
}
|
||||
autoplay = "move"
|
||||
|
||||
[node name="BoxTrap" type="Node2D" parent="."]
|
||||
position = Vector2(345, 108)
|
||||
|
||||
[connection signal="areatrigger" from="Area2D" to="." method="_on_area_2d_areatrigger"]
|
||||
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||
@@ -0,0 +1,11 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://47xe40uafw3l"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2kknn"]
|
||||
size = Vector2(146, 25)
|
||||
|
||||
[node name="AnimatableBody2D" type="AnimatableBody2D"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(63, 2.5)
|
||||
shape = SubResource("RectangleShape2D_2kknn")
|
||||
one_way_collision = true
|
||||
Reference in new issue
Block a user