diff --git a/Enemy.cs b/Enemy.cs index d3f5db4..7a236ca 100644 --- a/Enemy.cs +++ b/Enemy.cs @@ -11,7 +11,7 @@ public partial class Enemy : StaticBody2D public delegate void ClickedEventHandler(Enemy THIS); public bool _hovered = false, _track = false; public int _damage = 1, _health = 2, _speed, _speedRemaining, _visibilityRange = 4; - public Vector2I _address, _range = Vector2I.Up; + public Vector2I _address = -Vector2I.One, _range = Vector2I.Up; public List _path = new(); public float _movement = 0; public EnemyController _enemyController; diff --git a/Map.cs b/Map.cs index 6cb1c5d..24c7c9e 100644 --- a/Map.cs +++ b/Map.cs @@ -93,19 +93,11 @@ public partial class Map : TileMapLayer { _addressOccupants[ENEMY._address] = null; SetCellSolid(ENEMY._address); - if (ENEMY._address == Vector2I.Zero) - { - GD.Print(4,_astar.IsPointSolid(ENEMY._address)); - } ENEMY._address = ADDRESS; _addressOccupants[ADDRESS] = ENEMY; SetCellSolid(ADDRESS); - if (ADDRESS == Vector2I.Zero) - { - GD.Print(5,_astar.IsPointSolid(ADDRESS)); - } } public void SetCellSolid(Vector2I ADDRESS)