Lots of colouring in
This commit is contained in:
parent
02f4ae939c
commit
1c33ea2f59
24 changed files with 592 additions and 46 deletions
|
|
@ -1,11 +1,80 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dqdi1tpoid80c"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dqdi1tpoid80c"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/scripts/collector_drone.gd" id="1_ws83e"]
|
||||
[ext_resource type="Texture2D" uid="uid://btyc0yk5nbn2t" path="res://resources/textures/collector_drone.png" id="2_wq72s"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_m21sl"]
|
||||
resource_name = "Idle"
|
||||
length = 2.0
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("CollectorDrone:offset")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(10, 8), Vector2(0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("CollectorDrone:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 0.0523599, 0.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Shadow:offset")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(3.91169, 3.12935), Vector2(10, 8), Vector2(3.91169, 3.12935)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_keqev"]
|
||||
_data = {
|
||||
"Idle": SubResource("Animation_m21sl")
|
||||
}
|
||||
|
||||
[node name="CollectorDrone" type="Node2D"]
|
||||
script = ExtResource("1_ws83e")
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(1, -1)
|
||||
color = Color(0.620241, 0.619217, 0.900702, 1)
|
||||
polygon = PackedVector2Array(-28, -25, 25, -28, 26, 33, -32, 19)
|
||||
|
||||
[node name="CollectorDrone" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, 1)
|
||||
rotation = 0.00352767
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("2_wq72s")
|
||||
offset = Vector2(0.673735, 0.538988)
|
||||
|
||||
[node name="Shadow" type="Sprite2D" parent="."]
|
||||
modulate = Color(0, 0, 0, 0.0784314)
|
||||
position = Vector2(0, 100)
|
||||
rotation = 0.0204816
|
||||
scale = Vector2(0.25, 0.1)
|
||||
texture = ExtResource("2_wq72s")
|
||||
offset = Vector2(4.32188, 3.4575)
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_keqev")
|
||||
}
|
||||
autoplay = "Idle"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,117 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cx7cunaspu08a"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cx7cunaspu08a"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/scripts/dancer_drone.gd" id="1_44a5b"]
|
||||
[ext_resource type="Texture2D" uid="uid://ck51br2sjtfbk" path="res://resources/textures/dancing_drone_body.png" id="2_d306w"]
|
||||
[ext_resource type="Texture2D" uid="uid://bf3e8avdh3iwn" path="res://resources/textures/dancing_drone_hat.png" id="3_deyv3"]
|
||||
[ext_resource type="Texture2D" uid="uid://btwh1m8nvxxn3" path="res://resources/textures/dancing_drone_leg_1.png" id="4_uppgc"]
|
||||
[ext_resource type="Texture2D" uid="uid://0e8ksjsqrsg5" path="res://resources/textures/dancing_drone_leg_2.png" id="5_kvsjc"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_xfqbx"]
|
||||
radius = 25.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_utxxn"]
|
||||
resource_name = "Dancing"
|
||||
length = 3.0
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("DancingDroneBody:rotation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.5, 3),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 0.0523599, 0.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("DancingDroneBody:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.5, 3),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, -3), Vector2(10, -10), Vector2(1, -3)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("DancingDroneBody/DancingDroneHat:rotation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 1.7, 3),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 0.349066, 0.0]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("DancingDroneBody/DancingDroneLeg1:rotation")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0, 1.6, 3),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, -0.174533, 0.0]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("DancingDroneBody/DancingDroneLeg2:rotation")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 1.3, 3),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, -0.349066, 0.0]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("DancingDroneBody2:position")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0, 1.5, 2.9),
|
||||
"transitions": PackedFloat32Array(1, -0.5, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 100), Vector2(10, 102), Vector2(1, 100)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_iwafd"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("DancingDroneBody2:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 100)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pfpsg"]
|
||||
_data = {
|
||||
"Dancing": SubResource("Animation_utxxn"),
|
||||
"RESET": SubResource("Animation_iwafd")
|
||||
}
|
||||
|
||||
[node name="DancerDrone" type="Node2D" groups=["dancer"]]
|
||||
script = ExtResource("1_44a5b")
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(1, -1)
|
||||
color = Color(0.354435, 0.719091, 0.745333, 1)
|
||||
polygon = PackedVector2Array(-28, -25, 25, -28, 26, 33, -32, 19)
|
||||
|
|
@ -17,3 +120,60 @@ polygon = PackedVector2Array(-28, -25, 25, -28, 26, 33, -32, 19)
|
|||
|
||||
[node name="HitBoxShape" type="CollisionShape2D" parent="HitBox"]
|
||||
shape = SubResource("CircleShape2D_xfqbx")
|
||||
|
||||
[node name="DancingDroneBody" type="Sprite2D" parent="."]
|
||||
position = Vector2(9.98454, -9.98798)
|
||||
rotation = 0.05227
|
||||
scale = Vector2(0.2, 0.2)
|
||||
texture = ExtResource("2_d306w")
|
||||
offset = Vector2(3.09204, 0)
|
||||
|
||||
[node name="DancingDroneHat" type="Sprite2D" parent="DancingDroneBody"]
|
||||
position = Vector2(-102, -50)
|
||||
rotation = 0.30747
|
||||
texture = ExtResource("3_deyv3")
|
||||
offset = Vector2(41, -91)
|
||||
|
||||
[node name="DancingDroneLeg1" type="Sprite2D" parent="DancingDroneBody"]
|
||||
position = Vector2(-72, 94)
|
||||
rotation = -0.163344
|
||||
texture = ExtResource("4_uppgc")
|
||||
offset = Vector2(19, 94)
|
||||
|
||||
[node name="DancingDroneLeg2" type="Sprite2D" parent="DancingDroneBody"]
|
||||
position = Vector2(54, 86)
|
||||
rotation = -0.33965
|
||||
texture = ExtResource("5_kvsjc")
|
||||
offset = Vector2(-16, 107)
|
||||
|
||||
[node name="DancingDroneBody2" type="Sprite2D" parent="."]
|
||||
modulate = Color(0, 0, 0, 0.0784314)
|
||||
position = Vector2(1, 100)
|
||||
rotation = 0.0289966
|
||||
scale = Vector2(0.2, 0.05)
|
||||
texture = ExtResource("2_d306w")
|
||||
offset = Vector2(3.09204, 0)
|
||||
|
||||
[node name="DancingDroneHat" type="Sprite2D" parent="DancingDroneBody2"]
|
||||
position = Vector2(-102, -50)
|
||||
rotation = 0.229387
|
||||
texture = ExtResource("3_deyv3")
|
||||
offset = Vector2(41, -91)
|
||||
|
||||
[node name="DancingDroneLeg1" type="Sprite2D" parent="DancingDroneBody2"]
|
||||
position = Vector2(-72, 94)
|
||||
rotation = -0.0983052
|
||||
texture = ExtResource("4_uppgc")
|
||||
offset = Vector2(19, 94)
|
||||
|
||||
[node name="DancingDroneLeg2" type="Sprite2D" parent="DancingDroneBody2"]
|
||||
position = Vector2(54, 86)
|
||||
rotation = -0.146
|
||||
texture = ExtResource("5_kvsjc")
|
||||
offset = Vector2(-16, 107)
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_pfpsg")
|
||||
}
|
||||
autoplay = "Dancing"
|
||||
|
|
|
|||
|
|
@ -1,19 +1,112 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://nxq2fd04ehcu"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://nxq2fd04ehcu"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/scripts/director_drone.gd" id="1_3v6jp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnhs5ymd6ybyd" path="res://resources/textures/director_drone.png" id="2_8nbjk"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_qstd5"]
|
||||
resource_name = "Idle"
|
||||
length = 2.0
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("DirectorDrone:offset")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(10, 0), Vector2(0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Shadow:offset")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.047402, 1, 2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(10, 0), Vector2(0, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("DirectorDrone:rotation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 2),
|
||||
"transitions": PackedFloat32Array(1, -2, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 0.0523599, 0.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gkp0o"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("DirectorDrone:offset")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Shadow:offset")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_xu26h"]
|
||||
_data = {
|
||||
"Idle": SubResource("Animation_qstd5"),
|
||||
"RESET": SubResource("Animation_gkp0o")
|
||||
}
|
||||
|
||||
[node name="DirectorDrone" type="Node2D"]
|
||||
script = ExtResource("1_3v6jp")
|
||||
|
||||
[node name="DirectorDrone" type="Sprite2D" parent="."]
|
||||
scale = Vector2(0.3, 0.3)
|
||||
texture = ExtResource("2_8nbjk")
|
||||
|
||||
[node name="Shadow" type="Sprite2D" parent="."]
|
||||
self_modulate = Color(0, 0, 0, 0.0784314)
|
||||
position = Vector2(0, 100)
|
||||
scale = Vector2(0.3, 0.1)
|
||||
texture = ExtResource("2_8nbjk")
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(1, -1)
|
||||
color = Color(0.703926, 0.656042, 0.441124, 1)
|
||||
polygon = PackedVector2Array(-28, -25, 25, -28, 26, 33, -32, 19)
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
offset_left = -16.0
|
||||
offset_top = -12.0
|
||||
offset_right = 24.0
|
||||
offset_bottom = 11.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "999"
|
||||
visible = false
|
||||
offset_left = 16.0
|
||||
offset_top = 26.0
|
||||
offset_right = 56.0
|
||||
offset_bottom = 49.0
|
||||
theme_override_colors/font_color = Color(0.270588, 0.211765, 0.364706, 1)
|
||||
text = "9 "
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_xu26h")
|
||||
}
|
||||
autoplay = "Idle"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ var time_at_patch : float = 0.0
|
|||
|
||||
func enter(_msg := {}):
|
||||
bee.just_gathering = true
|
||||
|
||||
Log.pr("Gathering now...")
|
||||
#animator.play("Idle")
|
||||
|
||||
#if !bee.in_range_of_flowers:
|
||||
|
|
@ -22,6 +24,7 @@ func update(_delta : float):
|
|||
#animator.play("Gathering")
|
||||
time_at_patch += _delta
|
||||
if time_at_patch > 5.0:
|
||||
Log.pr("Gathered nectar!")
|
||||
bee.nectar += 1
|
||||
state_transition.emit(self, "Idle")
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ func update(delta : float):
|
|||
|
||||
func find_something_to_do():
|
||||
if bee.nectar > 0:
|
||||
Log.pr("I have pollen, time to move..")
|
||||
## Bee has pollen - head home
|
||||
state_transition.emit(self, "Travelling")
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ class_name BeeReturning
|
|||
@onready var target = get_tree().get_first_node_in_group("beehive")
|
||||
|
||||
func enter(_msg := {}):
|
||||
Log.pr("Returning to the hive")
|
||||
bee.animation_player.play("Flying")
|
||||
|
||||
func update(delta : float) -> void:
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ func enter(_msg := {}):
|
|||
## Get the next target location from the bee
|
||||
if bee.just_gathering:
|
||||
target = bee.get_current_director() # We want to go back the way we came
|
||||
if !target:
|
||||
Log.pr("No director around, returning to hive")
|
||||
## If there is no other director, just go straight back home
|
||||
state_transition.emit(self, "Returning")
|
||||
bee.just_gathering = false
|
||||
else:
|
||||
target = bee.get_next_target()
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ func get_current_director():
|
|||
## If we are at the highest director, we need to go to a flower
|
||||
func get_next_target():
|
||||
if nectar == 0:
|
||||
Log.pr("No nectar!")
|
||||
|
||||
## If there is a next directory drone, lets go to it
|
||||
var next_drone = drone_manager.get_next_director(latest_target_director)
|
||||
|
|
@ -42,8 +43,12 @@ func get_next_target():
|
|||
## Let's go home, we need the previous director drones location
|
||||
var previous_drone = drone_manager.get_previous_director(latest_target_director)
|
||||
if previous_drone:
|
||||
Log.pr("Previous drone", previous_drone)
|
||||
latest_target_director = previous_drone.visit_order
|
||||
return previous_drone
|
||||
else:
|
||||
Log.pr("No previous drone")
|
||||
return null
|
||||
|
||||
func deposit_nectar():
|
||||
GameState.add_nectar()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue