示例#1
0
        protected void Start()
        {
            //initialize timers
            gameTimer      = new Timer(gameTime);
            gameTimer.Done = DoneGame;
            //gui.StartTimer(gameTime);
            plusTimer          = new Timer();
            plusTimer.Done     = DonePause;
            scoreTimer         = new Timer();
            scoreTimer.Started = delegate()
            {
                //also display the score for a second
                spawnedPrefab      = (TextMesh)GameObject.Instantiate(scorePrefab);
                spawnedPrefab.text = "Your Score: " + UserRecorder.Instance.score.score;
            };
            scoreTimer.Done = delegate()
            {
                GameObject.Destroy(spawnedPrefab.gameObject);
            };

            lastRealTime = Time.realtimeSinceStartup;

            periodManager = gameObject.GetComponent <PeriodManager>();

            //pause to start with
            DoneGame();
            //Invoke("DoneGame", 0.03f);
        }
示例#2
0
 protected void Awake()
 {
     pauser        = PauseToolbox.Instance.GetComponent <PauseTimer>();
     periodManager = PauseToolbox.Instance.GetComponent <PeriodManager>();
     bubbleSpawner = BubbleMakerToolbox.Instance.GetComponent <BubbleNumberSpawner>();
     LoadTimes();
 }