// Method for showing waiting timer before shrinking
        public void ShowWaitingTime(Zone.Timer timer)
        {
            TimeText.text = "ZONE SHRINKS IN: \n" + "<b><color=red>" +
                            (timer.EndTime - timer.CurrentTime).ToString("F0") + "</color></b>";

            if (timer.EndTime - timer.CurrentTime < 5 && init)
            {
                init = false;
                for (int i = 0; i < zone.ZoneCircles.Count; i++)
                {
                    float dif  = maxST - minST;
                    float prct = (float)(zone.ZoneCircles.Count - i) / (zone.ZoneCircles.Count);
                    float st   = dif * prct + minST;

                    if (i == zone.ZoneCircles.Count - 1)
                    {
                        zone.ZoneCircles[i].ShrinkingTime = 0;
                    }
                    else
                    {
                        zone.ZoneCircles[i].ShrinkingTime = st;
                    }
                }
            }


            if (timer.EndTime - timer.CurrentTime <= 0)
            {
                wpm.zoneCenter = zone.ZoneCircles[zone.CurStep].PositionAndRadius.Position;
                wpm.RefreshWaypoints();
            }
        }
示例#2
0
 // Method for showing waiting timer before shrinking
 public void ShowWaitingTime(Zone.Timer timer)
 {
     TimeText.text = "ZONE SHRINKS IN: \n" + "<b><color=red>" +
                     (timer.EndTime - timer.CurrentTime).ToString("F0") + "</color></b>";
 }
示例#3
0
 // Method for clearing text on end of last circle/step
 public void EndOfLastStep(Zone.Timer timer)
 {
     TimeText.text = "";
 }
示例#4
0
 // Method for showing shrinking timer
 public void ShowShrinkingTime(Zone.Timer timer)
 {
     TimeText.text = "<color=red>" + "ZONE SHRINKING: \n <b>" +
                     (timer.EndTime - timer.CurrentTime).ToString("F0") + "</b></color>";
 }
示例#5
0
 // Update is called once per frame
 public void UpdateZone(Zone.Timer timer)
 {
     transform.position   = Zone.Instance.NextSafeZone.Position;
     transform.localScale = Vector3.one * Zone.Instance.NextSafeZone.Radius * 2;
 }