public void Update() { _del(); if (_t.Timer()) { ChangeZero(); } }
public void startstage() { if (timer2.Timer()) { timer2.Clear(); giftindex++; if (giftindex >= gifts.transform.childCount) { giftindex = 0; } if (giftindex == StartIndex) { roundnum++; } mark.transform.localPosition = gifts.transform.GetChild(giftindex).transform.localPosition; timer2.SetTime(t2 / gifts.transform.childCount); if (roundnum > allround) { runstage = bufferstage; } } }
public void normalstage() { if (timer1.Timer()) { timer1.Clear(); giftindex++; if (giftindex >= gifts.transform.childCount) { giftindex = 0; } mark.transform.localPosition = gifts.transform.GetChild(giftindex).transform.localPosition; timer1.SetTime(t1 / gifts.transform.childCount); } }
public void slowdownstage() { if (timer3.Timer()) { timer3.Clear(); giftindex++; if (giftindex >= gifts.transform.childCount) { giftindex = 0; } mark.transform.localPosition = gifts.transform.GetChild(giftindex).transform.localPosition; timer3.SetTime(t3 / gifts.transform.childCount); if (giftindex == randemgift()) { reward.GetComponent <ShowReward>().Refresh(); reward.SetActive(true); runstage = NullFunction; } } }
// Update is called once per frame void Update() { if (Time.timeScale == 0) { gameObject.SetActive(false); } else { gameObject.SetActive(true); if (t.Timer()) { Destroy(gameObject); } flyNum += Time.deltaTime * 3f * t.runTime; float newDistance = distance / Vector3.Distance(head, Camera.main.transform.position); Vector3 position = Camera.main.WorldToScreenPoint(head + Vector3.up * flyNum); transform.position = position;//位置 transform.localScale = Vector3.one * newDistance; transform.localScale = new Vector3((Vector3.one * newDistance).x, (Vector3.one * newDistance).y, (Vector3.one * newDistance).z); } }
public void SubTimer() { if (Et.Timer()) { Et.Clear(); localxml[8] = 0; AddEnergy(1); } else { timer.gameObject.SetActive(true); if ((int)Et.runTime / 60 > 9) { timer.transform.GetChild(0).GetComponent <Text>().text = "1"; } else { timer.transform.GetChild(0).GetComponent <Text>().text = "0"; } if ((int)Et.runTime / 60 > 9) { timer.transform.GetChild(1).GetComponent <Text>().text = "0"; } else { timer.transform.GetChild(1).GetComponent <Text>().text = ((int)(Et.runTime / 60)).ToString(); } if ((int)Et.runTime % 60 > 9) { timer.transform.GetChild(3).GetComponent <Text>().text = ((int)Et.runTime % 60 / 10).ToString(); } else { timer.transform.GetChild(3).GetComponent <Text>().text = "0"; } timer.transform.GetChild(4).GetComponent <Text>().text = ((int)Et.runTime % 10).ToString(); } }
public void DelayedOrder2() { if (Vector3.Distance(transform.position, getTarDelegate().transform.position) > distance && timer.Timer()) { frameOrder = DelayedOrder1; } else if (Vector3.Distance(transform.position, getTarDelegate().transform.position) < distance) { timer.Clear(); } }