Esempio n. 1
0
        private void spawnPlayer()
        {
            GameObject playerGO = new GameObject("_Player");

            DontDestroyOnLoad(playerGO);
            EposGame.playerActor = playerGO.AddComponent <CActor>();
        }
Esempio n. 2
0
 private void DEBUG_findAlternatePlayerGO(string name)
 {
     CActor[] actors = FindObjectsOfType <CActor>();
     foreach (CActor actor in actors)
     {
         if (actor.gameObject.name == name)
         {
             EposGame.playerActor = actor;
             return;
         }
     }
 }
Esempio n. 3
0
 public void init()
 {
     actor = this.gameObject.GetComponent <CActor>();
     cc    = this.gameObject.GetComponent <CharacterController>(); //RequireComponent already crates one!
 }
Esempio n. 4
0
 public void setTargetActor(CActor actor)
 {
     playerActor    = actor;
     this.cMovement = actor.GetComponent <CMovement>();
     this.cCombat   = actor.GetComponent <CCombat>();
 }
Esempio n. 5
0
 public void setTargetActor(CActor actor)
 {
     actorMode.setTargetActor(actor);
 }