Beispiel #1
0
 private void Awake()
 {
     _Instance  = this;
     PlayerType = Mng.I.SelectedType;
     bMobileOn  = true;
     if (PlayerType.Equals(PLAYERTYPE.RAT))
     {
         Instantiate(PlayerGams[0], GameTr.position, Quaternion.Euler(new Vector3(0.0f, 0.0f, 0.0f))).transform.parent = GameTr;
         PlayerSc = GameObject.Find("Rat(Clone)").GetComponent <Player>();
         CharActiveBtn.image.sprite = CharActiveSkillSp[0];
     }
     else if (PlayerType.Equals(PLAYERTYPE.TURTLE))
     {
         Instantiate(PlayerGams[1], GameTr.position, Quaternion.Euler(new Vector3(0.0f, 0.0f, 0.0f))).transform.parent = GameTr;
         PlayerSc = GameObject.Find("Turtle(Clone)").GetComponent <Player>();
         CharActiveBtn.image.sprite = CharActiveSkillSp[1];
     }
     else if (PlayerType.Equals(PLAYERTYPE.WOLF))
     {
         Instantiate(PlayerGams[2], GameTr.position, Quaternion.Euler(new Vector3(0.0f, 0.0f, 0.0f))).transform.parent = GameTr;
         PlayerSc = GameObject.Find("Wolf(Clone)").GetComponent <Player>();
         CharActiveBtn.image.sprite = CharActiveSkillSp[2];
     }
     nMonCount = 0;
 }
Beispiel #2
0
 void Start()
 {
     if (PlayerType.Equals(PLAYERTYPE.RAT))
     {
         CharImg.sprite = CharSp[0];
     }
     else if (PlayerType.Equals(PLAYERTYPE.TURTLE))
     {
         CharImg.sprite = CharSp[1];
     }
     else if (PlayerType.Equals(PLAYERTYPE.WOLF))
     {
         CharImg.sprite = CharSp[2];
     }
     //CharImg.sprite = CharSp[2];
 }