mirror of
https://github.com/tonytins/citylimits
synced 2025-12-20 14:34:43 -05:00
Basic AI
- If a power plant is present, the zone animates. Just like the original. - Your budget also goes through the roof This is just a proof-of-concept right now, and will likely crash your machine if you leave it on too long.
This commit is contained in:
parent
5fa863114a
commit
239fa63a0c
9 changed files with 236 additions and 177 deletions
|
|
@ -1,7 +1,10 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/power_station.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scripts/simtactics/turn_on.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/coal.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/beehave/nodes/composites/sequence.gd" type="Script" id=3]
|
||||
[ext_resource path="res://scripts/simtactics/zone.gd" type="Script" id=4]
|
||||
[ext_resource path="res://addons/beehave/nodes/beehave_root.gd" type="Script" id=6]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 32.2297, 31.8602 )
|
||||
|
|
@ -26,9 +29,19 @@ tracks/0/keys = {
|
|||
|
||||
[node name="PowerStation" type="KinematicBody2D"]
|
||||
input_pickable = true
|
||||
|
||||
[node name="BeehaveRoot" type="Node" parent="."]
|
||||
script = ExtResource( 6 )
|
||||
|
||||
[node name="SequenceComposite" type="Node" parent="BeehaveRoot"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="TurnOn" type="Node" parent="BeehaveRoot/SequenceComposite"]
|
||||
script = ExtResource( 1 )
|
||||
income = 0
|
||||
expense = 250
|
||||
|
||||
[node name="ActionLeaf" type="Node" parent="BeehaveRoot/SequenceComposite"]
|
||||
script = ExtResource( 4 )
|
||||
zone_texture = "res://assets/res_houses.png"
|
||||
|
||||
[node name="Quarters" type="Timer" parent="."]
|
||||
wait_time = 10.0
|
||||
|
|
@ -44,5 +57,3 @@ playback_speed = 5.0
|
|||
anims/Animante = SubResource( 2 )
|
||||
|
||||
[node name="RayCast2D" type="RayCast2D" parent="."]
|
||||
|
||||
[connection signal="timeout" from="Quarters" to="." method="_on_Quarters_timeout"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue