Beispiel #1
0
    // Update is called once per frame
    /* Contributors: Scott Kauker */
    void Update()
    {
        //#TODO: Abstract the controller creation to not require gamemode logic
        if (Input.anyKey && Time.time - startTime > InputWaitDelay)
        {
            TransitionManager.Get().TransitionTo(SceneName);

            //Play a sound? shrug
        }
    }
    // Update is called once per frame
    void Update()
    {
        // Changes by Alexander Bohlen
        //#TODO: Abstract the controller creation to not require gamemode logic
        if (Time.time - startTime > InputWaitDelay)
        {
            TransitionManager.Get().TransitionTo(SceneName);

            //Play a sound? shrug
        }
    }
    /* Contributors: Scott Kauker */
    private void Awake()
    {
        TransitionManager.Get().FadeIn(1.0f);

        State = GameState.WAITING_FOR_PLAYERS;
        if (instance == null)
        {
            instance = this;
        }

        players = new PlayerController[2]; //Hardcoded 2 player game, sue me

        gameObject.AddComponent <SoundManager>();
    }
 // Use this for initialization
 void Start()
 {
     startTime = Time.time;
     TransitionManager.Get().FadeIn(FadeInTime);
 }
 /// <summary>
 /// Immediately restart the current level.
 /// Resets all objects and controls
 /// </summary>
 /* Contributors: Scott Kauker */
 public void RestartLevel()
 {
     PlayersSwitched = !PlayersSwitched;
     TransitionManager.Get().TransitionTo(SceneManager.GetActiveScene().name);
 }