Esempio n. 1
0
 public void Destroy()
 {
     GameManager.ObjectSpawner.Destroy(actor);
     Inventory = null;
     actor     = null;
     DestroyEvent?.Invoke(this);
 }
Esempio n. 2
0
 public void Init()
 {
     prefab = GameManager.Properties.characterActorPrefab;
 }
Esempio n. 3
0
 public GameCharacter(GameCharacterActor prefab)
 {
     Inventory = new Inventory();
     actor     = GameManager.ObjectSpawner.Spawn(prefab, Vector3.zero, Quaternion.identity);
     actor.Activate(this);
 }
Esempio n. 4
0
 private void Awake()
 {
     actor = GetComponent <GameCharacterActor>();
     actor.ActivatedEvent   += OnActorActivated;
     actor.DeactivatedEvent += OnActorDeactivated;
 }