예제 #1
0
    // MonoBehaviors
    public void Awake()
    {
        //this voodoo makes sure the singleton instance is set
        //wish it didn't need to be done this way, but oh well
        inst.enabled = inst.enabled;

        if (SceneSetup.inst != null)
        {
            canUseStasis   = SceneSetup.inst.canUseStasis;
            canUseDash     = SceneSetup.inst.canUseDash;
            endTimerLength = SceneSetup.inst.endTimerLength;
            m_useEndTimer  = SceneSetup.inst.useEndTimer;
            m_endTimer     = endTimerLength;
        }

        if (playerObj != null)
        {
            playerObj.GetComponent <Entity> ().died += killPlayer;
            playerScript   = playerObj.GetComponent <Player>();
            playerAnimator = playerObj.GetComponent <Animator>();

            Controller.setPlayer(playerObj.GetComponent <Controller> ());
        }
        codeEnumNames = System.Enum.GetNames(typeof(CodeName));

        //make sure there's a TransitionBuddy
        TransitionBuddy.getInstance();

        controlManager.setAsPrimary();
    }
예제 #2
0
    private IEnumerator endDelay()
    {
        yield return(new WaitForSecondsRealtime(finalDelayTime));

        TransitionBuddy.getInstance().endCurrentScene(nextScene);
    }