Ejemplo n.º 1
0
 public void gameStart()
 {
     Time.timeScale = 1;
     JoyStick.SetActive(true);
     HP.SetActive(true);
     Panel.SetActive(false);
     InGame.SetActive(true);
 }
Ejemplo n.º 2
0
 public void MouseOn()
 {
     IsPointOn = true;
     if (!Data.Name.Equals(string.Empty) && !IsDrag)
     {
         bool temp = (Data.Type == CardType.Minion) ? true : false;
         CardView.SetActive(true);
         ATK.SetActive(temp);
         HP.SetActive(temp);
     }
 }
Ejemplo n.º 3
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     if (other.gameObject.name == "地板")
     {
         isGround = true;
     }
     if (other.gameObject.name == "死亡區域")
     {
         isDie = true;
         if (isDie == true)
         {
             final.SetActive(true);
             HP.SetActive(false);
         }
     }
     //isGround = true;
     //Debug.Log("碰到" + collision.gameObject);
 }
Ejemplo n.º 4
0
    public void SetColor(int C)
    {
        switch (C)
        {
        //HP - red
        case 1:
            GetComponent <Text>().color = Color.red;
            HP.SetActive(true);
            break;

        //Armor - grey
        case 2:
            GetComponent <Text>().color = Color.grey;
            Armor.SetActive(true);
            break;

        //Coin - yellow
        case 3:
            GetComponent <Text>().color = Color.yellow;
            Coin.SetActive(true);
            break;

        //Fire - yellow
        case 4:
            GetComponent <Text>().color = Color.yellow;
            Fire.SetActive(true);
            break;

        //Miss
        case 5:
            GetComponent <Text>().color = Color.grey;
            break;

        //XP
        case 6:
            GetComponent <Text>().color = Color.blue;
            XP.SetActive(true);
            break;
        }
    }
Ejemplo n.º 5
0
 /// <summary>
 /// 時間到
 /// </summary>
 /// <returns></returns>
 IEnumerator  Show_UI()
 {
     final.SetActive(true);
     HP.SetActive(false);
     yield return(new WaitForSeconds(0.2f));
 }