diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-17 22:30:35 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-08-17 22:30:35 -0300 |
| commit | c9057bbd88f14a4e0e572c16452c1ab9baebfe2a (patch) | |
| tree | 61e22e427354995cabe878d7a9f14fb9804c9c8f /scripts/actors/Actor.cs | |
| parent | 240156765d88db25dd092fc320005cdb5f28d7a7 (diff) | |
Atores agora são criados por código.
Diffstat (limited to 'scripts/actors/Actor.cs')
| -rw-r--r-- | scripts/actors/Actor.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/actors/Actor.cs b/scripts/actors/Actor.cs index f429ead..7e9ab04 100644 --- a/scripts/actors/Actor.cs +++ b/scripts/actors/Actor.cs @@ -3,11 +3,18 @@ using Godot; [GlobalClass] public abstract partial class Actor : Sprite2D { - [Export] private ActorDefinition definition; private Vector2I gridPosition = Vector2I.Zero; - [Export] public DungeonLevel Map { get; private set; } + + public Actor(Vector2I initialPosition, DungeonLevel map, ActorDefinition definition) { + GridPosition = initialPosition; + Map = map; + this.definition = definition; + Texture = definition.texture; + Centered = false; + } + public Vector2I GridPosition { set { gridPosition = value; |
