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

            DontDestroyOnLoad(playerGO);
            EposGame.playerActor = playerGO.AddComponent <CActor>();
        }
Exemplo 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;
         }
     }
 }
Exemplo n.º 3
0
 public void init()
 {
     actor = this.gameObject.GetComponent <CActor>();
     cc    = this.gameObject.GetComponent <CharacterController>(); //RequireComponent already crates one!
 }
Exemplo n.º 4
0
 public void setTargetActor(CActor actor)
 {
     playerActor    = actor;
     this.cMovement = actor.GetComponent <CMovement>();
     this.cCombat   = actor.GetComponent <CCombat>();
 }
Exemplo n.º 5
0
 public void setTargetActor(CActor actor)
 {
     actorMode.setTargetActor(actor);
 }