Ejemplo n.º 1
0
 void Awake()
 {
     // Singleton
     if (instance == null)
     {
         instance = this;
     }
     else if (!instance.Equals(this))
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }
Ejemplo n.º 2
0
        void Start()
        {
            Playing   = true;
            startTime = 0.0f;

            WinText.text = "Rush my little kitten!";
            DelayedAction(2.0f, delegate {
                WinText.text = "! RUSH !";
                DelayedAction(1.5f, delegate { WinText.text = ""; });
            });

            Faider = ScreenFaider.instance;
            Faider.SetTo(Color.black);
            Faider.FadeOut(Color.black, FadeSpeed, null);
        }
Ejemplo n.º 3
0
        void Start()
        {
            Faider = ScreenFaider.instance;

            Faider.SetTo(Color.black);
            Faider.FadeOut(Color.black, FadeSpeed, delegate
            {
                loading = false;
                if (AutoLoad)
                {
                    DelayedAction(AutoLoadTime, delegate
                    {
                        LoadNextScene(ExitScene);
                    });
                }
            });
        }
Ejemplo n.º 4
0
        void Start()
        {
            GameOverText.text = "";

            StartText.text = "Wake up my little dwarf...";
            DelayedAction(3.0f, delegate {
                StartText.text = "... it is time to get those diamonds ...";
                DelayedAction(3.0f, delegate {
                    StartText.text = "! Mine, Mine, Mine !";
                    DelayedAction(2f, delegate { StartText.text = ""; });
                });
            });

            Faider = ScreenFaider.instance;
            Faider.SetTo(Color.black);
            Faider.FadeOut(Color.black, FadeSpeed, null);
        }
Ejemplo n.º 5
0
 public static void DestroySingleton()
 {
     Destroy(instance.gameObject);
     instance = null;
 }