// Use this for initialization void Start() { m_instance = this; CurrentSceneTag = 1; //播放动画 ShowSceneObject("SceneModel/Sc_animation_xin"); }
/// <summary> /// 动画完成 /// </summary> public void OnOverAnimation() { CameraManager.Instance.CameraCullingMask(Color.black, 0); if (JtddSceneControl.Instance() != null) { JtddSceneControl.Instance().ShowSceneObject("SceneModel/Suidao"); } if (BackCamerControll.Instance() != null) { BackCamerControll.Instance().InitBlackScreenTween(Color.black, 1.0f, 1.0f, 0.0f); BackCamerControll.Instance().PlayBlackScreenTween(); BackCamerControll.Instance().SetAutoClose(true); } if (Singleton <ObjManager> .GetInstance() != null) { Singleton <ObjManager> .GetInstance().CreateMainPlayer(); } ProcessInput.IsProcessInput = true; if (null != GameManager.gameManager.SceneLogic) { GameManager.gameManager.SceneLogic.CharacterDisplayFilter = Games.Scene.SceneLogic.ECharacterDisplayFilter.ShowAll; } Time.timeScale = 1; if (PlayerFrameLogic.Instance() != null) { PlayerFrameLogic.Instance().HideHPAndMPText(); } if (SkillBarLogic.Instance() != null) { SkillBarLogic.Instance().HideTransformButtonInDemo(); } GameManager.gameManager.SoundManager.StopSoundEffect(210); GameManager.gameManager.SoundManager.StopSoundEffect(211); GameManager.gameManager.SoundManager.StopSoundEffect(212); GameManager.gameManager.SoundManager.StopSoundEffect(213); GameManager.gameManager.SoundManager.PlayBGMusic(248, 0.5f, 0.5f); //删除该物体 Destroy(this.gameObject); Resources.UnloadUnusedAssets(); GC.Collect(); }
public uint Execute(PacketDistributed ipacket) { GC_FORCE_SETPOS packet = (GC_FORCE_SETPOS )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic Obj obj = Singleton <ObjManager> .Instance.FindObjInScene(packet.ServerID); if (obj != null) { if (obj.ObjType == Games.GlobeDefine.GameDefine_Globe.OBJ_TYPE.OBJ_MAIN_PLAYER || obj.ObjType == Games.GlobeDefine.GameDefine_Globe.OBJ_TYPE.OBJ_OTHER_PLAYER || obj.ObjType == Games.GlobeDefine.GameDefine_Globe.OBJ_TYPE.OBJ_ZOMBIE_PLAYER || obj.ObjType == Games.GlobeDefine.GameDefine_Globe.OBJ_TYPE.OBJ_FELLOW || obj.ObjType == Games.GlobeDefine.GameDefine_Globe.OBJ_TYPE.OBJ_NPC) { Obj_Character objChar = obj as Obj_Character; Vector3 vec = new Vector3((float)packet.PosX / 100, 0, (float)packet.PosZ / 100); if (objChar.NavAgent != null) { UnityEngine.GameObject.DestroyImmediate(objChar.NavAgent); } objChar.Position = ActiveScene.GetTerrainPosition(vec); if (objChar.NavAgent == null) { objChar.InitNavAgent(); } if (obj.ObjType == Games.GlobeDefine.GameDefine_Globe.OBJ_TYPE.OBJ_MAIN_PLAYER && JtddSceneControl.Instance() != null && GameManager.gameManager.RunningScene == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FB_CABALINTRO) { JtddSceneControl.Instance().GotoNextScene(); GameManager.gameManager.SoundManager.PlayBGMusic(180, 0.5f, 0.5f); Cutscene.CutsceneManager.Instance.CloseSyncPos = false; } } } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
void OnDestroy() { m_instance = null; }