Add new resources and animations for DistractorDrone, update drone script. Include level 5 scene with rules and components.
This commit is contained in:
parent
4b5ac48e10
commit
c991cbba5d
11 changed files with 331 additions and 12 deletions
|
|
@ -1,6 +1,66 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://ss2dg1i7j4ck"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://ss2dg1i7j4ck"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/scripts/distractor_drone.gd" id="1_vnjar"]
|
||||
[ext_resource type="Texture2D" uid="uid://cfufcbeeeg5oy" path="res://resources/textures/distractor_drone.png" id="2_dr1h4"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wno6f"]
|
||||
resource_name = "Idle"
|
||||
length = 5.0
|
||||
loop_mode = 1
|
||||
step = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("DistractorDrone:position:x")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 2.5, 5),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2),
|
||||
"update": 0,
|
||||
"values": [30.0, -30.0, 30.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("DistractorDrone:position:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2.5, 4, 5),
|
||||
"transitions": PackedFloat32Array(-2, -2, 1, -2, -2),
|
||||
"update": 0,
|
||||
"values": [0.0, 30.0, 0.0, 40.0, 0.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("DistractorDrone:rotation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2.5, 4, 5),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2, -2, -2),
|
||||
"update": 0,
|
||||
"values": [0.0, 0.0698132, -0.10472, 0.10472, 0.0]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("Shadow:position:x")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0, 2.5, 5),
|
||||
"transitions": PackedFloat32Array(-2, -2, -2),
|
||||
"update": 0,
|
||||
"values": [30.0, -30.0, 30.0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_lcuxq"]
|
||||
_data = {
|
||||
"Idle": SubResource("Animation_wno6f")
|
||||
}
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_bxdlt"]
|
||||
radius = 31.0161
|
||||
|
|
@ -8,15 +68,28 @@ radius = 31.0161
|
|||
[node name="DistractorDrone" type="CharacterBody2D" groups=["distractor"]]
|
||||
script = ExtResource("1_vnjar")
|
||||
|
||||
[node name="Shape2" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_bxdlt")
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_lcuxq")
|
||||
}
|
||||
autoplay = "Idle"
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="."]
|
||||
position = Vector2(1, -1)
|
||||
color = Color(0.926224, 0.528901, 0.424107, 1)
|
||||
polygon = PackedVector2Array(-28, -25, 25, -28, 26, 33, -32, 19)
|
||||
[node name="DroneShape" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_bxdlt")
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="."]
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="HitBox"]
|
||||
shape = SubResource("CircleShape2D_bxdlt")
|
||||
|
||||
[node name="DistractorDrone" type="Sprite2D" parent="."]
|
||||
position = Vector2(28.6279, 5.71726)
|
||||
rotation = 0.0149678
|
||||
scale = Vector2(0.2, 0.2)
|
||||
texture = ExtResource("2_dr1h4")
|
||||
|
||||
[node name="Shadow" type="Sprite2D" parent="."]
|
||||
modulate = Color(0, 0, 0, 0.0784314)
|
||||
position = Vector2(28.6279, 100)
|
||||
scale = Vector2(0.151346, 0.0434807)
|
||||
texture = ExtResource("2_dr1h4")
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
class_name DistractorDrone extends Drone
|
||||
|
||||
#var dog : Dog = null
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
# Get the dog in the scene (there will only ever be one...)
|
||||
#dog = get_tree().get_first_node_in_group("dog") as Dog
|
||||
#Log.pr(dog)
|
||||
pass
|
||||
|
||||
func _process(_delta):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue