Make Vesna entity save current position
This commit is contained in:
@@ -12,7 +12,7 @@ public class VesnaEntity : PositionalEntity
|
||||
public override void InstantiateEntityNode(Node2D parent)
|
||||
{
|
||||
var node = (VesnaBehaviour2D) EntityManager.Instance.NodeCreator.InstantiateNode(OWN_TYPE_NAME);
|
||||
node.player2d.GlobalPosition = position;
|
||||
node.player2d.Initialize(this);
|
||||
parent.AddChild(node);
|
||||
}
|
||||
}
|
||||
@@ -93,6 +93,7 @@ public partial class EntityManager : Node
|
||||
{
|
||||
TrashEntity.OWN_TYPE_NAME => new TrashEntity(),
|
||||
LoadedScenesEntity.OWN_TYPE_NAME => new LoadedScenesEntity(),
|
||||
VesnaEntity.OWN_TYPE_NAME => new VesnaEntity(),
|
||||
_ => throw new Exception($"Trying to load unknown entity type: {type}")
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user