// Update is called once per frame void Update() { if (start) { time += Time.deltaTime; if (time >= 1.0) { paricle.gameObject.SetActive(false); objectState = false; col.GetComponent <Player>().MoveChange(true); start = false; time = 0; //////////////////////////////////////////////// if (gm.GetComponent <GameManager>().useMoney(cost)) { notice.NoticeMessage(2); gm.GetComponent <GameManager>().AddCoin(-cost); gm.GetComponent <GameManager>().AddHp(1); cost += 5; } } } if (!start && !objectState) { time2 += Time.deltaTime; if (time2 >= 20) { time2 = 0; objectState = true; } } }
// Update is called once per frame void Update() { if (start) { time += Time.deltaTime; if (time >= 1.0) { paricle.gameObject.SetActive(false); objectState = false; col.GetComponent <Player>().MoveChange(true); start = false; time = 0; //////////////////////////////////////////////// team.GetComponent <Team>().AddHealth(-30); notice.NoticeMessage(1); } } if (!start && !objectState) { time2 += Time.deltaTime; if (time2 >= 20) { time2 = 0; objectState = true; } } }
// Update is called once per frame void Update() { if (start) { time += Time.deltaTime; if (time >= 1.0) { paricle.gameObject.SetActive(false); objectState = false; col.GetComponent <Player>().MoveChange(true); start = false; time = 0; //////////////////////////////////////////////// gm.GetComponent <GameManager>().AddCoin(Random.Range(3, 7)); notice.NoticeMessage(6); } } if (!start && !objectState) { time2 += Time.deltaTime; if (time2 >= 20) { time2 = 0; objectState = true; } } }
// Update is called once per frame void Update() { if (start) { time += Time.deltaTime; if (time >= 1.0) { paricle.gameObject.SetActive(false); objectState = false; col.GetComponent <Player>().MoveChange(true); start = false; time = 0; //////////////////////////////////////////////// for (int i = 0; i < 12; ++i) { team[i].GetComponent <Team>().AddHealth(-5); } blackout.GetComponent <light>().TurnOn(); notice.NoticeMessage(8); } } if (!start && !objectState) { time2 += Time.deltaTime; if (time2 >= 20) { time2 = 0; objectState = true; } } }