public void gameStart() { Time.timeScale = 1; JoyStick.SetActive(true); HP.SetActive(true); Panel.SetActive(false); InGame.SetActive(true); }
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); } }
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); }
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; } }
/// <summary> /// 時間到 /// </summary> /// <returns></returns> IEnumerator Show_UI() { final.SetActive(true); HP.SetActive(false); yield return(new WaitForSeconds(0.2f)); }