private IEnumerator LoadAssetbundle() { string path = "IPhonePlayer"; if (Application.platform == RuntimePlatform.IPhonePlayer) { path = "IPhonePlayer"; } StoryAnim = new WWW("file:///" + Application.dataPath + "/StreamingAssets/ScenceEditor/" + path + "/" + SceneName + "/StoryAnim/" + SceneName + "StoryAnim" + ".assetbundle"); yield return(StoryAnim); if (StoryAnim.error != null) { Debug.Log(StoryAnim.error); } if (StoryAnim.isDone) { StoryObj = StoryAnim.assetBundle.mainAsset as StoryAnimDataObj; StoryAnimEditorContrler.GetInst().Init(StoryObj, true); Camera.main.transform.parent = GameObject.Find("StoryTempContrler").transform.GetChild(0); Camera.main.transform.localPosition = Vector3.zero; Camera.main.transform.localEulerAngles = Vector3.zero; Invoke("hehe", 0.2f); } }
/// <summary> /// 点击跳过 /// </summary> private void OnClickSkipBtn() { if (FightControler.isOpeningAnimation) { FightControler.isOpeningAnimation = false; if (FightControler.Inst.GetFightState() != FightState.FightInstantiateHero) { GameEventDispatcher.Inst.dispatchEvent(GameEventID.SE_StoryEnd); GameEventDispatcher.Inst.dispatchEvent(GameEventID.SE_FightEditorLoadDone); } } else { if (StoryAnimEditorContrler.GetInst().GetStoryAnimID() != 1) { FightEditorContrler.GetInstantiate().HeroPathFightEnterEnd(); GameEventDispatcher.Inst.dispatchEvent(GameEventID.SE_StoryEnd); //GameEventDispatcher.Inst.dispatchEvent(GameEventID.SE_EnterFightState, StoryAnimEditorContrler.GetInst().GetCurrentFightCount()); } } }