Exemplo n.º 1
0
        private IEnumerator EndRoutine()
        {
            MusicManager.Play(MusicTrack.None);
            yield return(new WaitForSeconds(1.75f));

            MusicManager.Play(MusicTrack.Results);
            TransitionManager.ToScene(3);
        }
Exemplo n.º 2
0
        public void Play(int count)
        {
            if (acceptInput)
            {
                acceptInput = false;
                sx.target   = sy.target = 0;

                Game.Initialize(count);
                TransitionManager.ToScene(1);
            }
        }
Exemplo n.º 3
0
        private void Update()
        {
            // If all the beetles are ready, transition to the race scene

            if (!isDone && beetles.All(b => b.IsReady))
            {
                isDone = true;

                foreach (CustomizeBeetle b in beetles)
                {
                    b.BlockInput();
                }

                MusicManager.Play(MusicTrack.None);
                TransitionManager.ToScene(2);
            }
        }
        private void Start()
        {
            if (instance != null)
            {
                Destroy(this.gameObject);
            }

            else
            {
                instance = this;
                DontDestroyOnLoad(this);

                AudioListener.volume = 0;

                tiles = new List <TransitionTile>();
                foreach (Transform t in grid)
                {
                    tiles.Add(t.GetComponent <TransitionTile>());
                }

                StartCoroutine(ShowTiles(false));
            }
        }
Exemplo n.º 5
0
        /*public Text labels;
         * public Text results;
         *
         * private void Awake()
         * {
         *  float[] times = Settings.loseTimes;
         *
         *  string l = "";
         *  string r = "";
         *  for (int i = 0; i < times.Length; i++)
         *  {
         *      l += string.Format("Beetle {0}:\n", i + 1);
         *
         *      if (times[i] == -1)
         *          r += "Winner!\n";
         *      else
         *          r += string.Format("{0:.00} s\n", times[i]);
         *  }
         *
         *  Labels.text = l;
         *  Results.text = r;
         * }*/

        public void ToScene(int index)
        {
            MusicManager.Play(MusicTrack.None);
            TransitionManager.ToScene(index);
        }