Fix variable shadowing a native class.

This commit is contained in:
Relintai 2024-09-26 13:08:42 +02:00
parent 8295671644
commit 2cbc3ea3af
3 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ func _ready() -> void:
rng.randf_range(0, camera_boundaries.size.x),
rng.randf_range(0, camera_boundaries.size.y)
)
var entity: KinematicBody2D = spawner.Entity.instance()
var entity: KinematicBody2D = spawner.entity.instance()
entity.global_position = new_pos
entity.player_agent = player.agent
entity.start_speed = linear_speed_max

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=12 format=3]
[ext_resource path="res://Demos/SeekFlee/Player.gd" type="Script" id=2]
[ext_resource path="res://Demos/SeekFlee/SeekFleeDemo.gd" type="Script" id=3]
@ -74,7 +74,7 @@ shape = SubResource( 3 )
[node name="Spawner" type="Node2D" parent="."]
script = ExtResource( 4 )
Entity = ExtResource( 6 )
entity = ExtResource( 6 )
[node name="DemoInterface" parent="." instance=ExtResource( 5 )]
text_bbcode = "Seek & Flee Demo

View File

@ -1,6 +1,6 @@
extends Node2D
# Holds data to instantiate and configure a number of agent entities.
export (PackedScene) var Entity: PackedScene
export (PackedScene) var entity: PackedScene
export var entity_count := 10
export var entity_color := Color.blue