diff options
Diffstat (limited to 'scripts/actors')
| -rw-r--r-- | scripts/actors/Actor.cs | 6 | ||||
| -rw-r--r-- | scripts/actors/Player.cs | 2 | ||||
| -rw-r--r-- | scripts/actors/actions/Action.cs | 4 | ||||
| -rw-r--r-- | scripts/actors/actions/DirectionalAction.cs | 2 | ||||
| -rw-r--r-- | scripts/actors/actions/MovementAction.cs | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/scripts/actors/Actor.cs b/scripts/actors/Actor.cs index 7e9ab04..a759fef 100644 --- a/scripts/actors/Actor.cs +++ b/scripts/actors/Actor.cs @@ -5,11 +5,11 @@ public abstract partial class Actor : Sprite2D { private ActorDefinition definition; private Vector2I gridPosition = Vector2I.Zero; - public DungeonLevel Map { get; private set; } + public MapData Map_Data { get; private set; } - public Actor(Vector2I initialPosition, DungeonLevel map, ActorDefinition definition) { + public Actor(Vector2I initialPosition, MapData map, ActorDefinition definition) { GridPosition = initialPosition; - Map = map; + Map_Data = map; this.definition = definition; Texture = definition.texture; Centered = false; diff --git a/scripts/actors/Player.cs b/scripts/actors/Player.cs index 590020d..c15db21 100644 --- a/scripts/actors/Player.cs +++ b/scripts/actors/Player.cs @@ -4,7 +4,7 @@ using System; [GlobalClass] public partial class Player : Actor { - public Player(Vector2I initialPosition, DungeonLevel map, ActorDefinition definition) : base(initialPosition, map, definition) + public Player(Vector2I initialPosition, MapData map, ActorDefinition definition) : base(initialPosition, map, definition) { } } diff --git a/scripts/actors/actions/Action.cs b/scripts/actors/actions/Action.cs index 76ae5d5..bb5f6f1 100644 --- a/scripts/actors/actions/Action.cs +++ b/scripts/actors/actions/Action.cs @@ -11,7 +11,7 @@ public abstract partial class Action : RefCounted { public abstract void Perform(); - protected DungeonLevel Map { - get => actor.Map; + protected MapData Map_Data { + get => actor.Map_Data; } } diff --git a/scripts/actors/actions/DirectionalAction.cs b/scripts/actors/actions/DirectionalAction.cs index 077f475..d5199f9 100644 --- a/scripts/actors/actions/DirectionalAction.cs +++ b/scripts/actors/actions/DirectionalAction.cs @@ -10,6 +10,6 @@ public abstract partial class DirectionalAction : Action } protected Actor GetBlockingActorAtPosition(Vector2I pos) { - return Map.GetBlockingActorAtPosition(pos); + return Map_Data.GetBlockingActorAtPosition(pos); } } diff --git a/scripts/actors/actions/MovementAction.cs b/scripts/actors/actions/MovementAction.cs index c9474b0..54bb99c 100644 --- a/scripts/actors/actions/MovementAction.cs +++ b/scripts/actors/actions/MovementAction.cs @@ -11,7 +11,7 @@ public partial class MovementAction : DirectionalAction { Vector2I finalDestination = actor.GridPosition + Offset; - if (!Map.IsTileWalkable(finalDestination)) return; + if (!Map_Data.IsTileWalkable(finalDestination)) return; if (GetBlockingActorAtPosition(finalDestination) != null) return; |
