void TimerAccelerateHandler(Timer.TimerData data) { if (EffType != EffectType.ACCELERATE) { GameMgr.Instance.MainEntity.IsRecoverEnergy = true; } }
void TimerWalkInstantHandler(Timer.TimerData data) { EffType = EffectType.NONE; GameMgr.Instance.MainEntity.Attribute.Speed = GameMgr.Instance.MainEntity.Attribute.BaseSpeed; GameMgr.Instance.ARPGAnimatController.Skill = 0; GameMgr.Instance.MainEntity.DespawnerParticle(EffectType.WALKINSTANT); }
void ProtectTimerOut(Timer.TimerData data) { if (State == StateType.STATE_PROTECT) { State = StateType.NONE; } protectTimerID = string.Empty; }
void RemoveBody(Timer.TimerData data) { if (!IsAlive) { CacheModel.gameObject.SetActive(false); ResourcesMgr.Instance.Despawner(ResourceType.RESOURCE_ENTITY, RoleModel); RoleModel = null; } }
public void Protect() { State = StateType.STATE_PROTECT; Timer.TimerData data = Timer.Instance.AddTimer(3, 1, true, ProtectTimerOut); if (null != data) { protectTimerID = data.ID; } }
void TimerEndWalkInstant(Timer.TimerData data) { if (RoleEntityControl.Fsm.CurrentStateID != RoleStateID.Skill) { return; } EventCenter.Instance.Publish <Event_StopSkill>(null, new Event_StopSkill()); EndCurrentStateToOtherState(RoleStateID.Switch); }
void Handler(Timer.TimerData data) { if (null != timer) { timer.text = (data.invokeTimes - 1).ToString(); if (data.invokeTimes == 1) { Debug.LogError("倒計時時間到,復活!"); HeroRelive(null); } } }
//取消变身 void BackBody(Timer.TimerData data) { Debug.LogError("返回变身效果"); HeroInfo heroInfo = InfoMgr <HeroInfo> .Instance.GetInfo(HeroId); GameObject go = ResourcesMgr.Instance.Spawner(heroInfo.model, ResourceType.RESOURCE_ENTITY, CacheModel);// ResourcesMgr.Instance.Instantiate(prefab); if (null == go) { return; } ResourcesMgr.Instance.Despawner(ResourceType.RESOURCE_ENTITY, RoleModel); InitCharactor(go); }
void DelayToShowDeadUI() { Init(); timer.text = AppConst.RebornTime.ToString(); Debug.LogError("Die HideUI!!!"); if (!gameObject.activeSelf) { gameObject.SetActive(true); } cache.localScale = Vector3.one; Timer.TimerData data = Timer.Instance.AddTimer(1, AppConst.RebornTime, true, Handler); TimerDataId = data.ID; //GameMgr.Instance.MainEntity.IsRecoverEnergy = true; }
void Handler(Timer.TimerData data) { Debug.LogError(data.ID + " " + data.invokeTimes); }
void ProtectTimerOut(Timer.TimerData data) { RemoveProtect(); }
void BackSpeed(Timer.TimerData data) { //发送事件 可以使用加速功能 this.Attribute.Speed = Attribute.BaseSpeed; }
void TimerAccelerateHandler(Timer.TimerData data) { GameMgr.Instance.MainEntity.IsRecoverEnergy = true; }
void BackSpeed(Timer.TimerData data) { //发送事件 可以使用加速功能 EventCenter.Instance.Publish <Event_OpenAcct>(null, new Event_OpenAcct()); this.Attribute.Speed = Attribute.BaseSpeed; }