Esempio n. 1
0
 // main logic
 private void Init()
 {
     if (!gameController)
     {
         gameController = GameController_Plt2D.Instance;
     }
 }
Esempio n. 2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        GameController_Plt2D spc = (GameController_Plt2D)target;

        if (GUILayout.Button("Set Time Scale = 1"))
        {
            Time.timeScale = 1f;
        }

        if (GUILayout.Button("Set Time Scale = 0.75"))
        {
            Time.timeScale = 0.75f;
        }

        if (GUILayout.Button("Set Time Scale = 0.5"))
        {
            Time.timeScale = 0.5f;
        }

        if (GUILayout.Button("Set Time Scale = 0"))
        {
            Time.timeScale = 0f;
        }
    }
Esempio n. 3
0
 // main event
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Esempio n. 4
0
    // main logic
    public override void Init()
    {
        base.Init();

        if (!coinSpawner)
        {
            coinSpawner = myGO.GetComponent <SpawnCoins_Plt2D> ();
        }

        if (!gameController)
        {
            gameController = GameController_Plt2D.Instance;
        }
    }