mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-11-14 04:57:19 +01:00
Fix issues.
This commit is contained in:
parent
de93a946b5
commit
7388234a6e
@ -1,9 +1,7 @@
|
||||
extends Node2D
|
||||
|
||||
const COLORS := {
|
||||
deceleration_radius = Color(1.0, 0.419, 0.592, 0.5),
|
||||
arrival_tolerance = Color(0.278, 0.231, 0.47, 0.3)
|
||||
}
|
||||
var deceleration_radius_color : Color = Color(1.0, 0.419, 0.592, 0.5)
|
||||
var arrival_tolerance_color : Color = Color(0.278, 0.231, 0.47, 0.3)
|
||||
|
||||
var arriver: Node2D
|
||||
|
||||
@ -15,5 +13,5 @@ func _ready() -> void:
|
||||
|
||||
func _draw():
|
||||
var target_position := GSAIUtils.to_vector2(arriver.target.position)
|
||||
draw_circle(target_position, owner.deceleration_radius, COLORS.deceleration_radius)
|
||||
draw_circle(target_position, owner.arrival_tolerance, COLORS.arrival_tolerance)
|
||||
draw_circle(target_position, owner.deceleration_radius, deceleration_radius_color)
|
||||
draw_circle(target_position, owner.arrival_tolerance, arrival_tolerance_color)
|
||||
|
@ -18,9 +18,6 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 2 )
|
||||
script = ExtResource( 4 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="DemoPickerUI"]
|
||||
anchor_right = 1.0
|
||||
|
@ -19,7 +19,7 @@ func _on_SceneTree_size_changed() -> void:
|
||||
ProjectSettings["display/window/size/width"], ProjectSettings["display/window/size/height"]
|
||||
)
|
||||
for b in get_children():
|
||||
var boundary: String = b.name.rsplit("Boundary")[0]
|
||||
var boundary: String = str(b.name).rsplit("Boundary")[0]
|
||||
match boundary:
|
||||
"Left":
|
||||
b.global_position = Vector2(0, size.y / 2)
|
||||
|
@ -21,7 +21,13 @@ func _init(agent: GSAISteeringAgent).(agent) -> void:
|
||||
# Appends a behavior to the internal array along with its `weight`.
|
||||
func add(behavior: GSAISteeringBehavior, weight: float) -> void:
|
||||
behavior.agent = agent
|
||||
_behaviors.append({behavior = behavior, weight = weight})
|
||||
|
||||
var dict : Dictionary = Dictionary()
|
||||
|
||||
dict["behavior"] = behavior;
|
||||
dict["weight"] = weight;
|
||||
|
||||
_behaviors.append(dict)
|
||||
|
||||
|
||||
# Returns the behavior at the specified `index`, or an empty `Dictionary` if
|
||||
|
@ -28,6 +28,7 @@ process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
|
@ -28,6 +28,7 @@ process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
|
@ -28,6 +28,7 @@ process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
|
@ -28,6 +28,7 @@ process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
|
@ -28,6 +28,7 @@ process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
[gd_resource type="Environment3D" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user