Adding death zone to pesticide
This commit is contained in:
parent
0127257d05
commit
e88b2248b3
13 changed files with 177 additions and 8 deletions
11
scenes/scripts/pesticide.gd
Normal file
11
scenes/scripts/pesticide.gd
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
extends Polygon2D
|
||||
class_name Pesticide
|
||||
|
||||
@onready var death_box = $DeathBox
|
||||
|
||||
func _ready():
|
||||
death_box.connect("body_entered", Callable(self, "_on_body_entered"))
|
||||
|
||||
func _on_body_entered(area):
|
||||
if area.is_in_group("bee"):
|
||||
area.die()
|
||||
|
|
@ -1,16 +1,22 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://mk5n0hrwk4yi"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://mk5n0hrwk4yi"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/scripts/test_level.gd" id="1_lgt1m"]
|
||||
[ext_resource type="PackedScene" uid="uid://dyu4mucawjlu6" path="res://entities/Beehive.tscn" id="2_5ueyo"]
|
||||
[ext_resource type="Script" path="res://scenes/scripts/drone_manager.gd" id="2_474nc"]
|
||||
[ext_resource type="Script" path="res://scenes/scripts/bee_spawner.gd" id="2_qqqq4"]
|
||||
[ext_resource type="Script" path="res://scenes/scripts/pesticide.gd" id="3_gg2a6"]
|
||||
[ext_resource type="Script" path="res://scenes/scripts/drone_controls.gd" id="3_rqkyv"]
|
||||
[ext_resource type="Theme" uid="uid://cpkvret5gi66h" path="res://resources/theme/game_theme.tres" id="6_1kbwe"]
|
||||
[ext_resource type="PackedScene" uid="uid://b7eeptlk47ymd" path="res://ui/UiComponent.tscn" id="6_xuemm"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwutwy11pityw" path="res://ui/LevelCompleteComponent.tscn" id="8_4k5cm"]
|
||||
[ext_resource type="Script" path="res://ui/scripts/level_complete_component.gd" id="9_qrlto"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_usqp5"]
|
||||
radius = 142.316
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ewfly"]
|
||||
radius = 252.15
|
||||
|
||||
[node name="TestLevel" type="Node2D"]
|
||||
script = ExtResource("1_lgt1m")
|
||||
|
||||
|
|
@ -44,10 +50,15 @@ offset_bottom = 266.0
|
|||
text = "Flower patch bro"
|
||||
|
||||
[node name="Pesticide" type="Polygon2D" parent="."]
|
||||
position = Vector2(74.7948, -103.963)
|
||||
scale = Vector2(0.851611, 0.815599)
|
||||
position = Vector2(561, 76)
|
||||
color = Color(0.682353, 0.137255, 0.203922, 1)
|
||||
polygon = PackedVector2Array(441, 122, 520, 54, 548, 154, 625, 114, 593, 234, 686, 281, 581, 325, 605, 472, 512, 363, 399, 468, 429, 311, 239, 362, 322, 226, 152, 92, 345, 130, 346, 15)
|
||||
polygon = PackedVector2Array(-201, -145, 111, -237, 250, -30, 185, 172, -80, 253, -259, 82)
|
||||
script = ExtResource("3_gg2a6")
|
||||
|
||||
[node name="DeathBox" type="Area2D" parent="Pesticide"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pesticide/DeathBox"]
|
||||
shape = SubResource("CircleShape2D_ewfly")
|
||||
|
||||
[node name="Dog" type="Polygon2D" parent="."]
|
||||
position = Vector2(-354, 53)
|
||||
|
|
@ -123,6 +134,13 @@ layout_mode = 2
|
|||
tooltip_text = "Spawn a dancing drone that will encourage bees to leave the hive. Best to put this near to the hive. "
|
||||
text = "Dancer"
|
||||
|
||||
[node name="LevelCompleteComponent" parent="." instance=ExtResource("8_4k5cm")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 720.0
|
||||
script = ExtResource("9_qrlto")
|
||||
|
||||
[connection signal="pressed" from="DroneManager/Control/MarginContainer/DroneControls/SpawnDirector" to="DroneManager" method="_on_spawn_director_pressed"]
|
||||
[connection signal="pressed" from="DroneManager/Control/MarginContainer/DroneControls/SpawnCollector" to="DroneManager" method="_on_spawn_collector_pressed"]
|
||||
[connection signal="pressed" from="DroneManager/Control/MarginContainer/DroneControls/SpawnDistractor" to="DroneManager" method="_on_spawn_distractor_pressed"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue