mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-11-14 04:57:19 +01:00
5627a5636a
It did not have a file path by default, but had an index. Also, the camera on Seek/Flee caused the Go Back button not to show. The scene's been amended and the camera removed, since it wasn't actually useful.
109 lines
3.5 KiB
Plaintext
109 lines
3.5 KiB
Plaintext
[gd_scene load_steps=12 format=2]
|
|
|
|
[ext_resource path="res://demos/SeekFlee/Boundary.gd" type="Script" id=1]
|
|
[ext_resource path="res://demos/SeekFlee/Player.gd" type="Script" id=2]
|
|
[ext_resource path="res://demos/SeekFlee/SeekFleeDemo.gd" type="Script" id=3]
|
|
[ext_resource path="res://demos/SeekFlee/Spawner.gd" type="Script" id=4]
|
|
[ext_resource path="res://assets/theme/gdquest.theme" type="Theme" id=5]
|
|
[ext_resource path="res://demos/SeekFlee/Seeker.tscn" type="PackedScene" id=6]
|
|
[ext_resource path="res://demos/Utils/CircleDraw.gd" type="Script" id=7]
|
|
[ext_resource path="res://assets/sprites/background.png" type="Texture" id=8]
|
|
|
|
[sub_resource type="CircleShape2D" id=1]
|
|
radius = 32.0
|
|
|
|
[sub_resource type="RectangleShape2D" id=2]
|
|
extents = Vector2( 10, 300 )
|
|
|
|
[sub_resource type="RectangleShape2D" id=3]
|
|
extents = Vector2( 512, 10 )
|
|
|
|
[node name="SeekFleeDemo" type="Node2D"]
|
|
script = ExtResource( 3 )
|
|
__meta__ = {
|
|
"_editor_description_": "A toy demo to demonstrate the usage for the Seek and Flee steering behaviors."
|
|
}
|
|
|
|
[node name="BackgroudLayer" type="CanvasLayer" parent="."]
|
|
layer = -1
|
|
|
|
[node name="Background" type="Sprite" parent="BackgroudLayer"]
|
|
texture = ExtResource( 8 )
|
|
centered = false
|
|
|
|
[node name="Player" type="KinematicBody2D" parent="."]
|
|
position = Vector2( 512, 300 )
|
|
collision_mask = 2
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
|
|
shape = SubResource( 1 )
|
|
script = ExtResource( 7 )
|
|
inner_color = Color( 0.235294, 0.639216, 0.439216, 1 )
|
|
outer_color = Color( 0.560784, 0.870588, 0.364706, 1 )
|
|
stroke = 4.0
|
|
|
|
[node name="LeftBoundary" type="StaticBody2D" parent="."]
|
|
position = Vector2( 0, 300 )
|
|
collision_layer = 2
|
|
collision_mask = 5
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="LeftBoundary"]
|
|
shape = SubResource( 2 )
|
|
|
|
[node name="RightBoundary" type="StaticBody2D" parent="."]
|
|
position = Vector2( 1024, 300 )
|
|
collision_layer = 2
|
|
collision_mask = 5
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="RightBoundary"]
|
|
shape = SubResource( 2 )
|
|
|
|
[node name="TopBoundary" type="StaticBody2D" parent="."]
|
|
position = Vector2( 512, 0 )
|
|
collision_layer = 2
|
|
collision_mask = 5
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="TopBoundary"]
|
|
shape = SubResource( 3 )
|
|
|
|
[node name="BottomBoundary" type="StaticBody2D" parent="."]
|
|
position = Vector2( 512, 600 )
|
|
collision_layer = 2
|
|
collision_mask = 5
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="BottomBoundary"]
|
|
shape = SubResource( 3 )
|
|
|
|
[node name="Spawner" type="Node2D" parent="."]
|
|
script = ExtResource( 4 )
|
|
Entity = ExtResource( 6 )
|
|
|
|
[node name="GUI" type="PanelContainer" parent="."]
|
|
margin_right = 1024.0
|
|
margin_bottom = 116.0
|
|
theme = ExtResource( 5 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="MarginContainer" type="MarginContainer" parent="GUI"]
|
|
margin_right = 1024.0
|
|
margin_bottom = 116.0
|
|
|
|
[node name="RichTextLabel" type="RichTextLabel" parent="GUI/MarginContainer"]
|
|
margin_left = 16.0
|
|
margin_top = 16.0
|
|
margin_right = 1008.0
|
|
margin_bottom = 100.0
|
|
rect_min_size = Vector2( 0, 84 )
|
|
bbcode_enabled = true
|
|
bbcode_text = "Seek & Flee Demo
|
|
Move the [color=lime]green \"Player\"[/color] around with WASD and notice the [color=#ffb570]orange \"Enemies\"[/color] try to seek to or flee from the player."
|
|
text = "Seek & Flee Demo
|
|
Move the green \"Player\" around with WASD and notice the orange \"Enemies\" try to seek to or flee from the player."
|