Exemplo n.º 1
0
        public void DelayedOrder1()
        {
            transform.position = Vector3.MoveTowards(transform.position, getTarDelegate().transform.position, followSpeed * Time.deltaTime);
            transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.LookRotation(getTarDelegate().transform.position - transform.position), Time.deltaTime * turnSpeed);//平滑旋转

            if (Vector3.Distance(transform.position, getTarDelegate().transform.position) < distance)
            {
                timer.Clear();
                frameOrder = DelayedOrder2;
            }
        }
Exemplo n.º 2
0
 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;
         }
     }
 }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
 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;
         }
     }
 }
Exemplo n.º 5
0
 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();
     }
 }
Exemplo n.º 6
0
 public void ChangeZero()
 {
     _t.Clear();
     _toolNum = 0;
     _del     = _keyL[_toolNum].Check;
 }