2020-01-16 16:04:27 +01:00
|
|
|
[gd_scene load_steps=11 format=2]
|
2019-12-16 22:14:46 +01:00
|
|
|
|
2020-01-16 09:44:44 +01:00
|
|
|
[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]
|
2020-01-16 16:04:27 +01:00
|
|
|
[ext_resource path="res://assets/theme/gdquest.theme" type="Theme" id=5]
|
2020-01-16 09:44:44 +01:00
|
|
|
[ext_resource path="res://demos/SeekFlee/Seeker.tscn" type="PackedScene" id=6]
|
2020-01-13 22:15:44 +01:00
|
|
|
[ext_resource path="res://assets/sprites/large_circle.png" type="Texture" id=7]
|
2019-12-16 22:14:46 +01:00
|
|
|
|
|
|
|
[sub_resource type="CircleShape2D" id=1]
|
2020-01-13 22:15:44 +01:00
|
|
|
radius = 32.0
|
2019-12-16 22:14:46 +01:00
|
|
|
|
|
|
|
[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="Camera2D" type="Camera2D" parent="."]
|
|
|
|
current = true
|
|
|
|
|
|
|
|
[node name="Player" type="KinematicBody2D" parent="."]
|
|
|
|
collision_mask = 2
|
2019-12-23 17:38:27 +01:00
|
|
|
script = ExtResource( 2 )
|
2019-12-16 22:14:46 +01:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
|
|
|
|
shape = SubResource( 1 )
|
|
|
|
|
2020-01-13 22:15:44 +01:00
|
|
|
[node name="Sprite" type="Sprite" parent="Player"]
|
|
|
|
modulate = Color( 0.952941, 0.290196, 0.0588235, 1 )
|
|
|
|
texture = ExtResource( 7 )
|
|
|
|
|
2019-12-16 22:14:46 +01:00
|
|
|
[node name="LeftBoundary" type="StaticBody2D" parent="."]
|
|
|
|
position = Vector2( -512, 0 )
|
|
|
|
collision_layer = 2
|
|
|
|
collision_mask = 5
|
2019-12-23 17:38:27 +01:00
|
|
|
script = ExtResource( 1 )
|
2019-12-16 22:14:46 +01:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="LeftBoundary"]
|
|
|
|
shape = SubResource( 2 )
|
|
|
|
|
|
|
|
[node name="RightBoundary" type="StaticBody2D" parent="."]
|
|
|
|
position = Vector2( 512, 0 )
|
|
|
|
collision_layer = 2
|
|
|
|
collision_mask = 5
|
2019-12-23 17:38:27 +01:00
|
|
|
script = ExtResource( 1 )
|
2019-12-16 22:14:46 +01:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="RightBoundary"]
|
|
|
|
shape = SubResource( 2 )
|
|
|
|
|
|
|
|
[node name="TopBoundary" type="StaticBody2D" parent="."]
|
|
|
|
position = Vector2( 0, -300 )
|
|
|
|
collision_layer = 2
|
|
|
|
collision_mask = 5
|
2019-12-23 17:38:27 +01:00
|
|
|
script = ExtResource( 1 )
|
2019-12-16 22:14:46 +01:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="TopBoundary"]
|
|
|
|
shape = SubResource( 3 )
|
|
|
|
|
|
|
|
[node name="BottomBoundary" type="StaticBody2D" parent="."]
|
|
|
|
position = Vector2( 0, 300 )
|
|
|
|
collision_layer = 2
|
|
|
|
collision_mask = 5
|
2019-12-23 17:38:27 +01:00
|
|
|
script = ExtResource( 1 )
|
2019-12-16 22:14:46 +01:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="BottomBoundary"]
|
|
|
|
shape = SubResource( 3 )
|
|
|
|
|
2019-12-21 19:07:43 +01:00
|
|
|
[node name="Spawner" type="Node2D" parent="."]
|
2019-12-23 17:38:27 +01:00
|
|
|
script = ExtResource( 4 )
|
|
|
|
Entity = ExtResource( 6 )
|
2020-01-16 16:04:27 +01:00
|
|
|
|
|
|
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
|
|
|
|
|
|
|
[node name="GUI" type="PanelContainer" parent="CanvasLayer"]
|
|
|
|
margin_right = 1024.0
|
|
|
|
margin_bottom = 116.0
|
|
|
|
theme = ExtResource( 5 )
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/GUI"]
|
|
|
|
margin_right = 1024.0
|
|
|
|
margin_bottom = 116.0
|
|
|
|
|
|
|
|
[node name="RichTextLabel" type="RichTextLabel" parent="CanvasLayer/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=red]red \"Player\"[/color] around with WASD and notice the [color=blue]blue \"Enemies\"[/color] and the seek/flee
|
|
|
|
the \"Player\""
|
|
|
|
text = "Seek & Flee Demo
|
|
|
|
Move the red \"Player\" around with WASD and notice the blue \"Enemies\" and the seek/flee
|
|
|
|
the \"Player\""
|