Ejemplo n.º 1
0
        /// <summary>
        /// 加载游戏场景
        /// </summary>
        /// <param name="scenename">场景名</param>
        /// <returns></returns>
        public void LoadGameScene(string scenename, UILoading uiload, VoidDelegate loadfinishdo = null)
        {
            if (_sceneBundle != null)
            {
                LeaveGameScene(() => { LoadGameScene(scenename, uiload, loadfinishdo); });
                return;
            }

            string path = PathMod.AssetPath(string.Format("Scene/{0}.unity3d", scenename));

            uiload.GetProgres = () => { return(progress); };
            GameMain.Instance.StartCoroutine(LoadSceneEnumerator(path, scenename, () =>
            {
                if (loadfinishdo != null)
                {
                    loadfinishdo();
                }
                EventManager.Trigger <EventLoadScaneFinish>(new EventLoadScaneFinish(scenename));
            }));
        }
Ejemplo n.º 2
0
        public void LoadMonster(string filename, string sourcename, UnityAction <Object> cb, bool forceloadAsyn = false)
        {
            string path = PathMod.AssetPath(string.Format("SpineData/{0}", filename));

            LoadAsset(path, sourcename, cb, forceloadAsyn);
        }
Ejemplo n.º 3
0
        public void LoadAudio(string filename, string sourcename, UnityAction <Object> cb, bool forceloadAsyn = false)
        {
            string path = PathMod.AssetPath(string.Format("Audio/{0}", 2));

            LoadAsset(path, sourcename, cb, forceloadAsyn);
        }