Beispiel #1
0
 //查找玩家角色
 private void findPlayerCharacter()
 {
     if (PlayingCharacter == null)
     {
         CharacterSystem[] go = (CharacterSystem[])GameObject.FindObjectsOfType(typeof(CharacterSystem));
         for (int i = 0; i < go.Length; i++)
         {
             CharacterSystem character = go[i];
             if (character)
             {
                 if (character.IsMine)
                 {
                     spectreMode      = false;
                     PlayingCharacter = character;
                     if (SavePlayer)
                     {
                         PlayingCharacter.LoadCharacterData(SaveToServer);
                     }
                 }
             }
         }
     }
 }