示例#1
0
文件: EposGame.cs 项目: The5-1/Epos
        private void spawnPlayer()
        {
            GameObject playerGO = new GameObject("_Player");

            DontDestroyOnLoad(playerGO);
            EposGame.playerActor = playerGO.AddComponent <CActor>();
        }
示例#2
0
文件: EposGame.cs 项目: The5-1/Epos
 private void DEBUG_findAlternatePlayerGO(string name)
 {
     CActor[] actors = FindObjectsOfType <CActor>();
     foreach (CActor actor in actors)
     {
         if (actor.gameObject.name == name)
         {
             EposGame.playerActor = actor;
             return;
         }
     }
 }
示例#3
0
 public void init()
 {
     actor = this.gameObject.GetComponent <CActor>();
     cc    = this.gameObject.GetComponent <CharacterController>(); //RequireComponent already crates one!
 }
示例#4
0
 public void setTargetActor(CActor actor)
 {
     playerActor    = actor;
     this.cMovement = actor.GetComponent <CMovement>();
     this.cCombat   = actor.GetComponent <CCombat>();
 }
示例#5
0
 public void setTargetActor(CActor actor)
 {
     actorMode.setTargetActor(actor);
 }