public bool Init() { LoggerSystem.Instance.Debug("BattleSystem init begin"); lockStep.frameThreshold = 3; lockStep.AddListennerLogic(FrameTick); lockStep.AddListennerPacket(FramePacketRun); string produceValue = GameVariableConfigProvider.Instance.GetData(3); string[] pros = produceValue.Split(';'); for (int i = 0; i < pros.Length; ++i) { List <float> args = Converter.ConvertNumberList <float> (pros [i]); sceneManager.AddProduce(args [0], args[1]); } battleData.Init(); sceneManager.Init(); #if !SERVER AssetManager.Get().Init(); //EffectManager.Get ().Init (); GameTimeManager.Get().Init(); #endif pause = false; bStartBattle = true; LoggerSystem.Instance.Debug("BattleSystem init end"); return(true); }
public void PlayCapture(Vector3 pos) { if (!GameTimeManager.Get().CheckTimer(TimerType.T_Capture)) { return; } float pan = GetAudioPan(pos); PlayAudioEffect("capture", 1.0f, pan); }
public void PlayWarp(Vector3 pos) { if (!GameTimeManager.Get().CheckTimer(TimerType.T_Warp)) { return; } float pan = GetAudioPan(pos); PlayAudioEffect("warp", 0.7f, pan); }
public void PlayLaser(Vector3 pos) { if (!GameTimeManager.Get().CheckTimer(TimerType.T_Laser)) { return; } float pan = GetAudioPan(pos); PlayAudioEffect("laser", 1.0f, pan); }
public void PlayJumpEnd(Vector3 pos) { if (!GameTimeManager.Get().CheckTimer(TimerType.T_JumpEnd)) { return; } float pan = GetAudioPan(pos); PlayAudioEffect("jumpEnd", 0.6f, pan); }
public void Reset() { pause = false; bStartBattle = false; BeginFadeOut(); battleData.Init(); // add new init here by fangjun if (battleController != null) { battleController.Reset(); } lockStep.StopLockStep(false); sceneManager.Destroy(); battleData.Destroy(); #if !SERVER GameTimeManager.Get().Release(); Resources.UnloadUnusedAssets(); #endif System.GC.Collect(); }