예제 #1
0
    public static void FadeFromBlack(float durationSeconds)
    {
        GameObject     camera = GameObject.Find("Camera");
        SceneDirection sd     = camera.GetComponent <SceneDirection>();

        sd.FadeFromBlack(durationSeconds);
    }
예제 #2
0
    IEnumerator DoTransition()
    {
        GameObject     camera = GameObject.Find("Main Camera");
        SceneDirection sd     = camera.GetComponent <SceneDirection>();

        sd.FadeToBlack(fadeDuration);
        yield return(new WaitForSeconds(fadeDuration));

        Globals.ResetMinerals();
        Application.LoadLevel(nextLevelName);
    }
예제 #3
0
    IEnumerator OnMouseDown()
    {
        Globals.currentMinerals = 0;
        Globals.maxMinerals     = 0;

        SceneDirection director = GetComponent <SceneDirection>();

        director.FadeToBlack(1.0f);

        yield return(new WaitForSeconds(1.0f));

        Application.LoadLevel("Kentta0Assy");
    }
예제 #4
0
    void MoveTo(string pDirection)
    {
        // get the scene where SceneDirection label is pDirection
        int            lcCurrentSceneId = _currentPlayer.CurrentScene;
        SceneDirection lcSceneDirection = Db.Connection.Table <SceneDirection>().Where <SceneDirection>(
            x => x.FromSceneId == lcCurrentSceneId & x.Label == pDirection
            ).ToList <SceneDirection>().First <SceneDirection>();

        int   lcNextSceneId = lcSceneDirection.ToSceneId;
        Scene lcScene       = Db.Connection.Table <Scene>().Where <Scene>(
            x => x.Id == lcNextSceneId
            ).ToList <Scene>().First <Scene>();

        _currentPlayer.CurrentScene = lcScene.Id;

        // Update the Current player
        Db.Connection.InsertOrReplace(_currentPlayer);
    }