/// <summary>
        /// Upon the asset being done loading from resources send it to the correct place to store
        /// </summary>
        /// <param name="to"></param>
        public void HandleAssetLoaded(AssetLoadRequestTO to)
        {
            switch (to.assetLoadType)
            {
            case AssetLoadType.Conversation:
                DialogController.GetInstance().LoadDialogFromTO(to);
                DialogController.GetInstance().PreloadPortraits();
                DialogController.GetInstance().PreloadMusic();
                break;

            case AssetLoadType.MapData:
                MapData md = MapData.FromTO(to);
                MapController.GetInstance().LoadMapData(md);
                break;

            case AssetLoadType.MapMaterial:
                MapController.GetInstance().LoadCurrMapMaterialFromTO(to);
                break;

            case AssetLoadType.Metadata:
                MetaDataManager.GetInstance().LoadMetadataFromTO(to);
                break;

            case AssetLoadType.Music:
                MusicController.GetInstance().LoadMusicFromTO(to);
                break;

            case AssetLoadType.SoundEfect:
                SoundEffectController.GetInstance().LoadSoundEffectFromTO(to);
                break;
            }
        }
示例#2
0
        protected override void OnClicked()
        {
            Debug.Log("Save File Button Clicked");

            GameObject    MainMenu   = GameObject.Find(GameConstants.UI_MAIN_MENU);
            ConfirmScreen screenComp =
                UIFactory.CreateScreenAndAddComponent <ConfirmScreen>(UIFactory.SCR_CONFIRM, MainMenu);

            ScreenQueueManager sqm = ScreenQueueManager.GetInstance();

            sqm.ShowScreenNow(screenComp.gameObject);
            sqm.QueueScreenAsNext(parentScreen);

            screenComp.SetData(UIConstants.SAVE_FILE_TITLE, UIConstants.SAVE_FILE_DESC, OnYes, OnNo);

            SoundEffectController.GetInstance().PlaySound(GameConstants.SND_BUTTON);
        }
示例#3
0
        // Use this for initialization
        public void Start()
        {
            MusicController.GetInstance().Initialize();
            SoundEffectController.GetInstance().Initialize();

            List <AssetLoadRequestTO> preloadAssets = new List <AssetLoadRequestTO>();

            // Preload some button sound effects
            AssetLoadRequestTO btnSFX =
                AssetLoadRequestTO.CreateSoundEffectAssetRequest(GameConstants.SND_BUTTON);

            preloadAssets.Add(btnSFX);

            AssetLoadRequestTO escSFX =
                AssetLoadRequestTO.CreateSoundEffectAssetRequest(GameConstants.SND_MENU);

            preloadAssets.Add(escSFX);

            AssetLoader.GetInstance().LoadAssets(preloadAssets);
        }