Esempio n. 1
0
        public override void Initialize()
        {
            AFAssetManager.SetDirectoryOwner("QuebraCuca");

            m_stateManager = AFObject.Create <AFStateManager>();

            m_stateManager.Initialize(new GameStateFactory());

            _resolutionController = ResolutionController.Instance();
            _paths  = PathConstants.Instance();
            _sounds = SoundConstants.Instance();

            GameObject _soundManager = new GameObject();

            _soundManager.name = "SoundManager";
            _soundManager.AddComponent <SoundManager>().Init();
            //SoundManager.PlaySoundByName(SoundConstants.BG_SOUND);

            AFSingleTransition tras = AFObject.Create <AFSingleTransition>();
            SpriteRenderer     sr   = tras.gameObject.AddComponent <SpriteRenderer>();

            sr.transform.position   = new Vector3(0, 0, 6);
            sr.sprite               = AFAssetManager.Instance.CreateSpriteFromTexture("Common/High/loadingscreen");
            sr.transform.localScale = new Vector3(1, 1, 1);
            m_stateManager.AddTransition(tras);

            m_stateManager.GotoState(AState.EGameState.MENU);

            base.Initialize();
        }
Esempio n. 2
0
    public override void Initialize()
    {
        //AFDebug.SetConfigs( AFDebugSettings.OUTPUT_SCREEN | AFDebugSettings.OUTPUT_UNITY );

        AFAssetManager.SetDirectoryOwner("");

        m_stateManager = AFObject.Create <AFStateManager>();
        m_stateManager.Initialize(new StartStateFactory());
        m_stateManager.GotoState(AState.EGameState.MENU);

        base.Initialize();

        AFSingleTransition tras = AFObject.Create <AFSingleTransition>();
        SpriteRenderer     sr   = tras.gameObject.AddComponent <SpriteRenderer>();

        sr.sprite = AFAssetManager.Instance.CreateSpriteFromTexture("Common/High/loadingscreen");
        sr.transform.localScale = new Vector3(1, 1, 1);
        m_stateManager.AddTransition(tras);
    }