Esempio n. 1
0
 void TimerAccelerateHandler(Timer.TimerData data)
 {
     if (EffType != EffectType.ACCELERATE)
     {
         GameMgr.Instance.MainEntity.IsRecoverEnergy = true;
     }
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 void ProtectTimerOut(Timer.TimerData data)
 {
     if (State == StateType.STATE_PROTECT)
     {
         State = StateType.NONE;
     }
     protectTimerID = string.Empty;
 }
Esempio n. 4
0
 void RemoveBody(Timer.TimerData data)
 {
     if (!IsAlive)
     {
         CacheModel.gameObject.SetActive(false);
         ResourcesMgr.Instance.Despawner(ResourceType.RESOURCE_ENTITY, RoleModel);
         RoleModel = null;
     }
 }
Esempio n. 5
0
 public void Protect()
 {
     State = StateType.STATE_PROTECT;
     Timer.TimerData data = Timer.Instance.AddTimer(3, 1, true, ProtectTimerOut);
     if (null != data)
     {
         protectTimerID = data.ID;
     }
 }
Esempio n. 6
0
 void TimerEndWalkInstant(Timer.TimerData data)
 {
     if (RoleEntityControl.Fsm.CurrentStateID != RoleStateID.Skill)
     {
         return;
     }
     EventCenter.Instance.Publish <Event_StopSkill>(null, new Event_StopSkill());
     EndCurrentStateToOtherState(RoleStateID.Switch);
 }
Esempio n. 7
0
 void Handler(Timer.TimerData data)
 {
     if (null != timer)
     {
         timer.text = (data.invokeTimes - 1).ToString();
         if (data.invokeTimes == 1)
         {
             Debug.LogError("倒計時時間到,復活!");
             HeroRelive(null);
         }
     }
 }
Esempio n. 8
0
    //取消变身
    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);
    }
Esempio n. 9
0
 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;
 }
Esempio n. 10
0
File: Test.cs Progetto: k3498gg/TSC
 void Handler(Timer.TimerData data)
 {
     Debug.LogError(data.ID + " " + data.invokeTimes);
 }
Esempio n. 11
0
 void ProtectTimerOut(Timer.TimerData data)
 {
     RemoveProtect();
 }
Esempio n. 12
0
 void BackSpeed(Timer.TimerData data)
 {
     //发送事件 可以使用加速功能
     this.Attribute.Speed = Attribute.BaseSpeed;
 }
Esempio n. 13
0
 void TimerAccelerateHandler(Timer.TimerData data)
 {
     GameMgr.Instance.MainEntity.IsRecoverEnergy = true;
 }
Esempio n. 14
0
 void BackSpeed(Timer.TimerData data)
 {
     //发送事件 可以使用加速功能
     EventCenter.Instance.Publish <Event_OpenAcct>(null, new Event_OpenAcct());
     this.Attribute.Speed = Attribute.BaseSpeed;
 }