added grenades and running animations|
This commit is contained in:
1 parent
321df5b9bd
commit
a245ebc135
14 files changed
+365
No files matched your search
@@ -5,6 +5,7 @@
|
||||
[ext_resource type="Script" uid="uid://sj5x7sv6o6yb" path="res://scripts/scene_manager.gd" id="2_k3dxm"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhsvqyhsemekq" path="res://scenes/player.tscn" id="3_k3dxm"]
|
||||
[ext_resource type="Script" uid="uid://gkpbb5sf4gu7" path="res://scripts/area_2d.gd" id="3_v0i7m"]
|
||||
[ext_resource type="PackedScene" uid="uid://cncmlpntwxxx5" path="res://scenes/grenade.tscn" id="6_1aljj"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_elsnr"]
|
||||
|
||||
@@ -92,5 +93,8 @@ metadata/_edit_group_ = true
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="platforms/platform4" unique_id=1906028968]
|
||||
shape = SubResource("RectangleShape2D_elsnr")
|
||||
|
||||
[node name="grenade" parent="." unique_id=781159040 instance=ExtResource("6_1aljj")]
|
||||
position = Vector2(385, 240)
|
||||
|
||||
[connection signal="body_entered" from="area" to="area" method="_on_body_entered"]
|
||||
[connection signal="triggerActiveSignal" from="area" to="." method="_on_area_2d_trigger_active_signal"]
|
||||
@@ -0,0 +1,18 @@
|
||||
[gd_scene format=3 uid="uid://cncmlpntwxxx5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bwjaypkvgpb6t" path="res://scripts/grenade.gd" id="1_cvyik"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_1xt3t"]
|
||||
radius = 5.0
|
||||
|
||||
[node name="grenade" type="RigidBody2D" unique_id=781159040]
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 3
|
||||
script = ExtResource("1_cvyik")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=346573127]
|
||||
shape = SubResource("CircleShape2D_1xt3t")
|
||||
debug_color = Color(0.8627451, 0.03137255, 0.20392157, 0.41960785)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -1,9 +1,150 @@
|
||||
[gd_scene format=3 uid="uid://bhsvqyhsemekq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dlmf1p0vfitcx" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||
[ext_resource type="Texture2D" uid="uid://dio2ufnpnihce" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_g2els"]
|
||||
[ext_resource type="Texture2D" uid="uid://bl7p2n2kgw2qx" path="res://assets/graphics/player/idle/player run 48x48.png" id="3_qhqgy"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_elsnr"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dqkch"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qlg0r"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tuyoq"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_smehm"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ur7pv"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d2wvv"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3v2ag"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qfm1y"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fulsm"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4r5pv"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_60mlk"]
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_jej6c"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qhqgy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dqkch")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qlg0r")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tuyoq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fjrip")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_smehm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ur7pv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_y4r1p")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_d2wvv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3v2ag")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jej6c")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_f1ej7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_oprun")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a8ls1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qfm1y")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fulsm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4r5pv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_60mlk")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="player" type="CharacterBody2D" unique_id=395957349]
|
||||
script = ExtResource("1_3vyb7")
|
||||
metadata/_edit_group_ = true
|
||||
@@ -17,3 +158,17 @@ target_position = Vector2(20, 0)
|
||||
|
||||
[node name="raycastLeft" type="RayCast2D" parent="." unique_id=1511802462]
|
||||
target_position = Vector2(-20, 0)
|
||||
|
||||
[node name="right_marker" type="Marker2D" parent="." unique_id=1266802678]
|
||||
position = Vector2(10, -12)
|
||||
|
||||
[node name="left_marker" type="Marker2D" parent="." unique_id=1663104896]
|
||||
position = Vector2(-10, -12)
|
||||
|
||||
[node name="graphic" type="AnimatedSprite2D" parent="." unique_id=2045696763]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -1)
|
||||
sprite_frames = SubResource("SpriteFrames_jej6c")
|
||||
animation = &"run"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.8670586
|
||||
Reference in new issue
Block a user