コード例 #1
0
ファイル: Meteorite.cs プロジェクト: isoundy000/ahzs-client
    public void HitGround()
    {
        Mogo.Util.LoggerHelper.Debug("HitGround");

        motor.StopRotate();

        handler.HandleFx(6004, hitPosition, (go, i) =>
        {
            go.transform.parent        = hitPosition;
            go.transform.localPosition = Vector3.zero;
        });
        // handler.RemoveFXs(6005);

        transform.Find("fx_fbx_aerolite02/fx_fbx_aerolite_tail").gameObject.SetActive(false);

        TimerHeap.AddTimer(300, 0, () =>
        {
            handler.HandleFx(6006, hitPosition, (go, i) =>
            {
                go.transform.parent        = hitPosition;
                go.transform.localPosition = Vector3.zero;
            });
        });

        MogoMainCamera.Instance.Shake(shakeCamAnimID, shakeCamAnimTime);
    }
コード例 #2
0
    private void TruelyFillChooseCharacterGridData()
    {
        if (!inited)
        {
            TimerHeap.AddTimer(100, 0, TruelyFillChooseCharacterGridData);
            return;
        }
        for (int i = 0; i < 4; ++i)
        {
            ChooseCharacterUIGrid cg = m_listChooseCharacterGrid[i].GetComponentsInChildren <ChooseCharacterUIGrid>(true)[0];

            if (i < m_listCCGD.Count)
            {
                cg.ShowAsEnable(true);

                cg.Name        = m_listCCGD[i].name;
                cg.Level       = m_listCCGD[i].level;
                cg.HeadImgName = m_listCCGD[i].headImg;
                cg.DefaultText = m_listCCGD[i].defautText;
            }
            else
            {
                cg.ShowAsEnable(false);
            }
        }
    }
コード例 #3
0
    protected void ShowPowerChange(int oldValue, int newValue, string prefix, int animateCounter, int animateTimes)
    {
        int thisValue = (int)((float)oldValue + (float)(newValue - oldValue) * (float)animateCounter / (float)animateTimes);

        if (animateCounter == 0)
        {
            this.SetNum(thisValue, prefix);
            this.numTimer = TimerHeap.AddTimer(this.beginInterval + this.interval, 0, delegate
            {
                this.ShowPowerChange(oldValue, newValue, prefix, animateCounter + 1, animateTimes);
            });
        }
        else if (animateCounter > animateTimes)
        {
            this.IsRollingNumber = false;
            this.CheckOpenEnd();
        }
        else if (animateCounter > this.slowDownTimes)
        {
            this.SetNum(thisValue, prefix);
            this.numTimer = TimerHeap.AddTimer(this.slowDownInterval, 0, delegate
            {
                this.ShowPowerChange(oldValue, newValue, prefix, animateCounter + 1, animateTimes);
            });
        }
        else
        {
            this.SetNum(thisValue, prefix);
            this.numTimer = TimerHeap.AddTimer(this.interval, 0, delegate
            {
                this.ShowPowerChange(oldValue, newValue, prefix, animateCounter + 1, animateTimes);
            });
        }
    }
コード例 #4
0
    public void AutoFlipCard()
    {
        uint n = 100;

        for (int i = 0; i < 5; i++)
        {
            if (flipCount <= 0)
            {
                TimerHeap.AddTimer(n + 1500, 0, () =>
                {
                    EventDispatcher.TriggerEvent(Events.InstanceUIEvent.AutoFlipRestCard);
                });
                break;
            }

            if (hasClick.Contains(i))
            {
                continue;
            }

            flipCount--;
            hasClick.Add(i);
            TimerHeap.AddTimer(n, 0, (index) =>
            {
                EventDispatcher.TriggerEvent(Events.InstanceUIEvent.AutoFlipCard, index);
            }, i);
            n += 100;
        }
    }
コード例 #5
0
ファイル: DragonMatchManager.cs プロジェクト: mengtest/xxxxx
 static private void TimerShow(int totalSeconds)
 {
     TimerHeap.AddTimer <int>(1000, 0,
                              (sec) =>
     {
         if (sec > 0)
         {
             sec--;
             MainUIViewManager.Instance.SetSelfAttackText(sec.ToString(), false);
             TimerShow(sec);
         }
         else
         {
             //MogoWorld.arenaState = 1;
             ClientEventData.TriggerGearEvent(181);
             MainUIViewManager.Instance.ShowNormalAttackButton(true);
             MainUIViewManager.Instance.ShowSkillButton(true, 0);
             MainUIViewManager.Instance.ShowSkillButton(true, 1);
             MainUIViewManager.Instance.ShowSkillButton(true, 2);
             MainUILogicManager.Instance.ShowSpriteSkillButton();
             MainUIViewManager.Instance.SetSelfAttackText(String.Empty, false);
         }
     },
                              totalSeconds);
 }
コード例 #6
0
 public void PlayAnimation(InstanceResultType type)
 {
     this.DeleteAllFX();
     TimerHeap.AddTimer(50u, 0, delegate
     {
         if (type == InstanceResultType.Win)
         {
             this.fx_WinStart = FXSpineManager.Instance.PlaySpine(425, this.fxTrans, "CommonBattlePassUI", 3002, delegate
             {
                 FXSpineManager.Instance.DeleteSpine(this.fx_WinStart, true);
                 this.fx_WinIdle = FXSpineManager.Instance.ReplaySpine(this.fx_WinIdle, 422, this.fxTrans, "CommonBattlePassUI", 3002, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
             }, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
             this.fx_WinExplode = FXSpineManager.Instance.PlaySpine(428, this.fxTrans, "CommonBattlePassUI", 3003, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
         }
         else if (type == InstanceResultType.Result)
         {
             this.fx_ResultStart = FXSpineManager.Instance.PlaySpine(423, this.fxTrans, "CommonBattlePassUI", 3002, delegate
             {
                 FXSpineManager.Instance.DeleteSpine(this.fx_ResultStart, true);
                 this.fx_ResultIdle = FXSpineManager.Instance.ReplaySpine(this.fx_ResultIdle, 420, this.fxTrans, "CommonBattlePassUI", 3002, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
             }, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
             this.fx_ResultExplode = FXSpineManager.Instance.PlaySpine(426, this.fxTrans, "CommonBattlePassUI", 3003, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
         }
         else if (type == InstanceResultType.Lose)
         {
             this.fx_LoseStart = FXSpineManager.Instance.PlaySpine(424, this.fxTrans, "CommonBattlePassUI", 3002, delegate
             {
                 FXSpineManager.Instance.DeleteSpine(this.fx_LoseStart, true);
                 this.fx_LoseIdle = FXSpineManager.Instance.ReplaySpine(this.fx_LoseIdle, 421, this.fxTrans, "CommonBattlePassUI", 3002, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
             }, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
             this.fx_LoseExplode = FXSpineManager.Instance.PlaySpine(427, this.fxTrans, "CommonBattlePassUI", 3003, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
         }
     });
 }
コード例 #7
0
 public override bool PressIcon(int icon, int count, int interval)
 {
     if (!this.CheckCanContinuePressIcon())
     {
         return(false);
     }
     if (this.owner.AITarget != null && this.owner.AITarget.Actor)
     {
         this.ownerActor.ForceSetDirection(new Vector3(this.owner.AITarget.Actor.FixTransform.get_position().x - this.ownerActor.FixTransform.get_position().x, 0f, this.owner.AITarget.Actor.FixTransform.get_position().z - this.ownerActor.FixTransform.get_position().z));
         this.ownerActor.ApplyMovingDirAsForward();
     }
     if (!this.owner.IsAssault)
     {
         (this.ownerActor as ActorPlayer).PressSimulateKey(icon);
     }
     count--;
     if (count > 0 && base.IsActive)
     {
         this.pressIconTimer = TimerHeap.AddTimer((uint)interval, 0, delegate
         {
             this.PressIcon(icon, count, interval);
         });
     }
     return(true);
 }
コード例 #8
0
    public void SetData(int godId, Action nextAction)
    {
        this.mNextAction = nextAction;
        this.mGodData    = DataReader <Artifact> .Get(godId);

        if (this.mGodData != null)
        {
            if (UIManagerControl.Instance.IsOpen("TownUI") && this.mGodData.areaIndex == 5)
            {
                Transform transform = WidgetSystem.FindWidgetOnUI(this.mGodData.widgetId, true);
                if (transform != null)
                {
                    transform.get_gameObject().SetActive(true);
                }
                TownUI.Instance.ForceOpenRightBottom();
            }
            this.RefreshDesc(this.mGodData);
            this.mFxIconId = FXSpineManager.Instance.PlaySpine(3907, this.mRectIcon.get_transform(), "TownUI", 14001, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
            TimerHeap.AddTimer(500u, 0, delegate
            {
                this.mCanClick = true;
            });
            Debug.Log("=====神器[" + godId + "]开放指导!!!=====");
        }
        else
        {
            this.ExecuteNext();
        }
    }
コード例 #9
0
 private void OnClearMonsterBatchNty(short state, ClearMonsterBatchNty down = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (down != null && down.isBossBatch)
     {
         TimerHeap.AddTimer(3000u, 0, delegate
         {
             DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(512048, false), GameDataUtils.GetChineseContent(512052, false), delegate
             {
             }, delegate
             {
                 NetworkManager.Send(new ContinueSecretAreaChallengeReq
                 {
                     isContinue = false
                 }, ServerType.Data);
             }, delegate
             {
                 NetworkManager.Send(new ContinueSecretAreaChallengeReq
                 {
                     isContinue = true
                 }, ServerType.Data);
             }, GameDataUtils.GetChineseContent(512057, false), GameDataUtils.GetChineseContent(512056, false), "button_orange_1", "button_orange_1", null);
             DialogBoxUIView dialogBoxUIView = UIManagerControl.Instance.GetUIIfExist("DialogBoxUI") as DialogBoxUIView;
             if (dialogBoxUIView != null)
             {
                 dialogBoxUIView.isClick = false;
                 dialogBoxUIView.SetMask();
             }
         });
     }
 }
コード例 #10
0
 public override void ShowLoseUI()
 {
     base.ShowLoseUI();
     TimerHeap.AddTimer(1000u, 0, delegate
     {
         UIManagerControl.Instance.HideUI("BattleUI");
         BattleLoseUI battleLoseUI  = LinkNavigationManager.OpenBattleLoseUI();
         battleLoseUI.BtnExitAction = delegate
         {
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnEquipQuaAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_EQUIPQUALITY";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnEquipLvAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_EQUIPLEVEL";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnGemLvAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_GEMLEVEL";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnSkillAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_SKILL";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnPetLvAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_PETLEVEL";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnPetStarAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_PETSTRA";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnPetSkillAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_PETSKILL";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnGodSoldierAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_GODSOLDIER";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.BtnWingAction = delegate
         {
             SceneLoadedUISetting.CurrentType = "SHOW_WING";
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
         battleLoseUI.ShowBtnAgainBtn(false);
         battleLoseUI.ShowBtnDamageCal(false);
     });
 }
コード例 #11
0
 public override void ShowWinUI()
 {
     base.ShowWinUI();
     UIManagerControl.Instance.HideUI("BattleUI");
     TimerHeap.AddTimer(1000u, 0, delegate
     {
         int num = (base.InstanceResult.startStage - 1 <= 0) ? 1 : (base.InstanceResult.startStage - 1);
         if (num == base.InstanceResult.endStage && base.InstanceResult.copyRewards.get_Count() <= 0)
         {
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
             return;
         }
         CommonBattlePassUI commonBattlePassUI = LinkNavigationManager.OpenCommonBattlePassUI();
         commonBattlePassUI.PlayAnimation(InstanceResultType.Result);
         commonBattlePassUI.BtnStatictisVisibity  = false;
         commonBattlePassUI.BtnAgainVisibility    = false;
         commonBattlePassUI.BtnMultipleVisibility = false;
         commonBattlePassUI.BtnTipTextVisibility  = false;
         commonBattlePassUI.PassTimeVisibility    = false;
         commonBattlePassUI.UpdateScResultUI(base.InstanceResult);
         commonBattlePassUI.ExitCallback = delegate
         {
             SurvivalManager.Instance.SendExitSecretAreaChallengeReq();
         };
     });
 }
コード例 #12
0
 protected void InitActorState()
 {
     if (EntityWorld.Instance.EntSelf != null && this.OwnerID == EntityWorld.Instance.EntSelf.ID)
     {
         this.talkTimer = TimerHeap.AddTimer((uint)this.talkInterval, this.talkInterval, new Action(this.CheckTalk));
     }
 }
コード例 #13
0
ファイル: PlayerBattleManager.cs プロジェクト: mengtest/xxxxx
        // 普攻,先进入Entity的GoingToCastSpell
        public void NormalAttack()
        {
            if (MogoWorld.inCity ||
                (theOwner as EntityMyself).deathFlag == 1 ||
                theOwner.stiff ||
                theOwner.charging)
            {
                return;
            }
            if ((skillManager as PlayerSkillManager).IsCommonCooldown())
            {
                preCmds.Add(0);
                return;
            }
            int nextskill = (skillManager as PlayerSkillManager).GetNormalAttackID();

            if (nextskill == theOwner.currSpellID && theOwner.currSpellID != -1)
            {
                preCmds.Add(0);
                return;
            }
            if ((skillManager as PlayerSkillManager).IsSkillCooldown(nextskill))
            {
                (skillManager as PlayerSkillManager).ClearComboSkill();
                preCmds.Add(0);
                return;
            }
            if (!(skillManager as PlayerSkillManager).HasDependence(nextskill))
            {
                CleanPreSkill();
            }
            //if (theOwner.IsInTransition())
            //{
            //    if (timeOutId != 0)
            //    {
            //        TimerHeap.DelTimer(timeOutId);
            //    }
            //    timeOutId = TimerHeap.AddTimer(100, 0, NormalAttack);
            //    return;
            //}
            //TimerHeap.DelTimer(timeOutId);
            //timeOutId = 0;

            /*if (theOwner.currSpellID != -1)
             * {
             *  SkillData s = SkillData.dataMap.Get(theOwner.currSpellID);
             *  SkillData ns = SkillData.dataMap.Get(nextskill);
             *  if (s.posi != 0 && ns.posi != 4)
             *  {//蓄力接普攻,蓄力没完不放普攻
             *      (skillManager as PlayerSkillManager).ClearComboSkill();
             *      return;
             *  }
             * }*/
            theOwner.motor.TurnToControlStickDir();
            Util.MogoUtils.LookAtTargetInRange(theOwner.Transform, 6, 360);
            (skillManager as PlayerSkillManager).ResetCoolTime(nextskill);
            EntityMyself.preSkillTime = Time.realtimeSinceStartup;
            theOwner.CastSkill(nextskill);
            TimerHeap.AddTimer((uint)((skillManager as PlayerSkillManager).GetCommonCD(nextskill)), 0, NextCmd);
        }
コード例 #14
0
 private void RefreshLeft(GodWeaponInfo data)
 {
     if (data != null)
     {
         if (this.mLastSelectToggle != null && !this.mLastSelectToggle.Data.isOpen && data.isOpen)
         {
             this.UnLockingEffect();
             TimerHeap.AddTimer(500u, 0, delegate
             {
                 this.UnLockedEffect(data.Type);
                 this.BottomEffect(data.isOpen);
             });
         }
         else if (data.isOpen)
         {
             this.UnLockedEffect(data.Type);
             this.BottomEffect(data.isOpen);
         }
         else
         {
             this.LockedEffect(data.Type);
             this.BottomEffect(data.isOpen);
         }
     }
 }
コード例 #15
0
    private void ShowBubbleDialog(Transform targetTransform, long uuid)
    {
        if (this.MonsterDialogQueue.ContainsKey(targetTransform))
        {
            int key = this.MonsterDialogQueue.get_Item(targetTransform).get_Item(0);
            JuQingZhiYinBuZou dataBZ = DataReader <JuQingZhiYinBuZou> .Get(key);

            if (dataBZ.typeArgs.get_Count() < 2)
            {
                Debug.LogError("dataBZ参数错误, id = " + dataBZ.id);
                return;
            }
            if (dataBZ.delayTime > 0)
            {
                TimerHeap.AddTimer((uint)dataBZ.delayTime, 0, delegate
                {
                    this.DoAddBubbleDialog(targetTransform, dataBZ, uuid);
                });
            }
            else
            {
                this.DoAddBubbleDialog(targetTransform, dataBZ, uuid);
            }
        }
    }
コード例 #16
0
 protected override void OnEnable()
 {
     SoundManager.PlayUI(10041, false);
     EventDispatcher.Broadcast <bool, float, float>(ShaderEffectEvent.ENABLE_BG_BLUR, true, 30f, 0f);
     this.PassTimeNum.set_text(string.Empty);
     this.countDownText.set_text(string.Empty);
     this.MyPowerValueDesc.set_text("我的战力:");
     this.MyPowerValue.set_text(EntityWorld.Instance.EntSelf.Fighting.ToString());
     this.AddUpBtns();
     this.AnimationObjs.GetComponent <CanvasGroup>().set_alpha(0f);
     this.timer = TimerHeap.AddTimer(1000u, 0, delegate
     {
         if (this != null && base.get_gameObject() != null && this.AnimationObjs != null)
         {
             BaseTweenAlphaBaseTime component = this.AnimationObjs.GetComponent <BaseTweenAlphaBaseTime>();
             if (component != null)
             {
                 component.TweenAlpha(0f, 1f, 0f, 0.5f);
             }
         }
     });
     EventDispatcher.Broadcast <bool>(ShaderEffectEvent.PLAYER_DEAD, true);
     this.PlayAnimation();
     this.BtnDamageCal.get_gameObject().SetActive(true);
     this.BtnDamageCal2.get_gameObject().SetActive(false);
     this.BtnAgain.get_gameObject().SetActive(true);
     GuideManager.Instance.StopGuideOfFinish();
 }
コード例 #17
0
ファイル: ParentStateProc.cs プロジェクト: mengtest/xxxxx
        virtual protected void CheckImmunity(ulong value)
        {
            if (IsStateReset(m_stateFlag, value, IMMUNITY_STATE))
            {
            }
            else if ((m_stateFlag & IMMUNITY_STATE) != 0)
            {
                if (motor)
                {
                    motor.enableStick = true;
                    motor.canMove     = true;
                }
                canCastSpell = true;

                if (currentMotionState == MotionState.IDLE)
                {
                    if (this is EntityPlayer && MogoWorld.inCity)
                    {
                        SetAction(0);//应为Animator的图没有直线连-1,所以要绕一下
                        TimerHeap.AddTimer <int>(500, 0, SetAction, -1);
                    }
                    else
                    {
                        SetAction(0);
                    }
                }
            }
        }
コード例 #18
0
ファイル: MarketManager.cs プロジェクト: mengtest/xxxxx
    private void GetGift(GiftItem item)
    {
        uint idx = (uint)item.resData.id;

        m_myself.RpcCall("DrawGift", idx);
        TimerHeap.AddTimer(100, 0, GiftRecordReq);
    }
コード例 #19
0
ファイル: MailManager.cs プロジェクト: unseen-code/tianqi_src
 private void DelOfAnim(long mailuid)
 {
     this.RemoveOne2Mails(mailuid);
     if (MailUIViewModel.Instance != null && MailUIViewModel.Instance.get_enabled())
     {
         long nextUid = MailUIViewModel.Instance.GetNextMail(mailuid);
         if (MailUIViewModel.Instance.DelAnim(mailuid))
         {
             TimerHeap.AddTimer(350u, 0, delegate
             {
                 if (MailUIViewModel.Instance != null && MailUIViewModel.Instance.get_enabled())
                 {
                     if (mailuid == MailUIViewModel.Instance.MailDetailUID && nextUid > 0L)
                     {
                         this.SendCheckMail(nextUid);
                     }
                     else
                     {
                         MailUIViewModel.Instance.ShowAs(MailUIViewModel.MailUIStatus.list, false);
                     }
                 }
             });
         }
         else if (mailuid == MailUIViewModel.Instance.MailDetailUID && nextUid > 0L)
         {
             this.SendCheckMail(nextUid);
         }
         else
         {
             MailUIViewModel.Instance.ShowAs(MailUIViewModel.MailUIStatus.list, false);
         }
     }
 }
コード例 #20
0
ファイル: PVPInstance.cs プロジェクト: unseen-code/tianqi_src
 public override void PlayerDie(EntityPlayer player)
 {
     TimerHeap.AddTimer((uint)float.Parse(DataReader <GlobalParams> .Get("instanceEndCameraTime").value), 0, delegate
     {
         FXSpineManager.Instance.PVPSuccess();
     });
 }
コード例 #21
0
ファイル: StateAttacking.cs プロジェクト: mengtest/xxxxx
        public void Process(EntityParent theOwner, params Object[] args)
        {
            if (theOwner is EntityDummy)
            {
                theOwner.animator.applyRootMotion = true;
            }

            if (args.Length != 1)
            {
                Debug.LogError("error spell id");
                return;
            }
            int       spellID = (int)(args[0]);
            SkillData s       = SkillData.dataMap[spellID];

            theOwner.motor.speed       = 0;
            theOwner.motor.targetSpeed = 0;
            int baseTime = 0;

            for (int i = 0; i < s.skillAction.Count; i++)
            {
                SkillAction   action = SkillAction.dataMap[s.skillAction[i]];
                List <object> args1  = new List <object>();
                args1.Add(s.skillAction[0]);
                args1.Add(theOwner.Transform.localToWorldMatrix);
                args1.Add(theOwner.Transform.rotation);
                args1.Add(theOwner.Transform.forward);
                args1.Add(theOwner.Transform.position);
                if (i == 0)
                {
                    ProcessHit(theOwner, spellID, args1);
                    if (theOwner is EntityMyself)
                    {
                        theOwner.motor.enableStick = action.enableStick > 0;
                    }
                }
                if (i + 1 == s.skillAction.Count)
                {
                    break;
                }
                uint          tid   = 0;
                List <object> args2 = new List <object>();
                args2.Add(s.skillAction[i + 1]);
                args2.Add(theOwner.Transform.localToWorldMatrix);
                args2.Add(theOwner.Transform.rotation);
                args2.Add(theOwner.Transform.forward);
                args2.Add(theOwner.Transform.position);
                if (action.actionTime > 0)
                {
                    tid       = TimerHeap.AddTimer((uint)((baseTime + action.actionTime) / theOwner.aiRate), 0, ProcessHit, theOwner, spellID, args2);
                    baseTime += action.actionTime;
                }
                if (action.nextHitTime > 0)
                {
                    tid       = TimerHeap.AddTimer((uint)((baseTime + action.nextHitTime) / theOwner.aiRate), 0, ProcessHit, theOwner, spellID, args2);
                    baseTime += action.nextHitTime;
                }
                theOwner.hitTimer.Add(tid);
            }
        }
コード例 #22
0
    void Awake()
    {
        m_transform = transform;
        gameObject.SetActive(false);
        ClimbTowerUILogicManager.Instance.Initialize(this);
        m_rewardList  = m_transform.Find("RightBox/RewardList");
        m_towerList   = m_transform.Find("TowerList");
        m_report      = m_transform.Find("report").gameObject;
        m_reportList  = m_transform.Find("report/BattleReportList");
        m_rewardTitle = m_transform.Find("report/img/lblTitle").GetComponentsInChildren <UILabel>(true)[0];
        m_highHistory = m_transform.Find("RightBox/historyHigh").GetComponentsInChildren <UILabel>(true)[0];
        //m_currentLevel = m_transform.FindChild("RightBox/TriPager/lblCurrentLevel").GetComponentsInChildren<UILabel>(true)[0];
        m_leftChallengeCount = m_transform.Find("LeftBox/lblContainer/lblChallengeCount").GetComponentsInChildren <UILabel>(true)[0];
        m_lblGuide           = m_transform.Find("LeftBox/lblContainer/lblGuide").GetComponentsInChildren <UILabel>(true)[0];
        m_leftVIPSweepCount  = m_transform.Find("LeftBox/lblContainer/lblVIPSweepCount").GetComponentsInChildren <UILabel>(true)[0];
        m_closeAnchor        = m_transform.Find("closeAnchor").GetComponentsInChildren <UIAnchor>(true)[0];
        m_buttonVIP          = m_transform.Find("RightBox/btnTowerVIP").GetComponentsInChildren <MogoTwoStatusButton>(true)[0];
        m_buttonNormal       = m_transform.Find("RightBox/btnTowerNormal").GetComponentsInChildren <MogoTwoStatusButton>(true)[0];
        AddButtonListener("onClicked", "RightBox/btnEnter", ClimbTowerUILogicManager.Instance.OnEnterMap);
        AddButtonListener("onClicked", "LeftBox/btnTowerCharge", ClimbTowerUILogicManager.Instance.Charge);
        AddButtonListener("onClicked", "RightBox/btnTowerNormal", ClimbTowerUILogicManager.Instance.NormalSweep);
        AddButtonListener("onClicked", "RightBox/btnTowerVIP", ClimbTowerUILogicManager.Instance.VIPSweep);
        AddButtonListener("onClicked", "closeAnchor/btnClose", Close);
        AddButtonListener("onClicked", "report/img/btnClose", closeReport);
        if (MogoUIManager.Instance.WaitingWidgetName == "btnEnter")
        {
            TimerHeap.AddTimer(100, 0, () => { EventDispatcher.TriggerEvent("WaitingWidgetFinished"); });
        }

        //m_towerList.GetComponent<MogoListImproved>().SetGridLayout<TowerUnit>(7, m_towerList.transform, TowerLoaded);
    }
コード例 #23
0
    public override void CallWhenCreate()
    {
        AttachLogicUnit(BattlePassCardListUILogicManager.Instance);
        RegisterButtonHandler("BattlePassCardListUIOKBtn");
        SetButtonClickHandler("BattlePassCardListUIOKBtn", OnOKBtnUp);

        for (int i = 0; i < 5; ++i)
        {
            RegisterButtonHandler(string.Concat("BattlePassCardListUICard", i));
            SetButtonClickHandler(string.Concat("BattlePassCardListUICard", i), OnCardBtnUp);

            CardRotateAnim anim = GetTransform(string.Concat("BattlePassCardListUICard", i)).gameObject.AddComponent <CardRotateAnim>();
            anim.Speed  = 10;
            anim.CardFX = GetSprite(string.Concat("BattlePassCardListUICard", i, "BGFX")).gameObject;
        }

        GetTransform("BattlePassCardListUICardListCamera").GetComponentsInChildren <UIViewport>(true)[0].sourceCamera =
            MogoUIManager.Instance.GetMainUICamera();

        TimerHeap.AddTimer(100, 0, () => { ShowCard(0); });
        TimerHeap.AddTimer(200, 0, () => { ShowCard(1); });
        TimerHeap.AddTimer(300, 0, () => { ShowCard(2); });
        TimerHeap.AddTimer(400, 0, () => { ShowCard(3); });
        TimerHeap.AddTimer(500, 0, () =>
        {
            ShowCard(4);
            StartCountDown();
        });
    }
コード例 #24
0
ファイル: Magma.cs プロジェクト: isoundy000/ahzs-client
    protected void SetDisable()
    {
        triggleEnable = false;

        // 1.5个时间后所有创生完毕,2个时间确保没问题
        disbaleMagmaTimer = TimerHeap.AddTimer((uint)(2 * nextMagmaRemainTime), 0, DestoryMagma);
    }
コード例 #25
0
    /// <summary>
    /// 播放路径指向动画(自动生成路径指向点)
    /// 路径指向播放动画只用于[普通关卡]
    /// </summary>
    /// <param name="id"></param>
    public void PlayChooseLevelPathAnim(int id)
    {
        if (!(id >= 0 && id <= MaxNormalMissionIndex))
        {
            return;
        }

        ShowChooseLevelPath(id, true);

        for (int i = 0; i < m_listChooseLevelGridPath[id].Count; ++i)
        {
            m_listChooseLevelGridPath[id][i].SetActive(false);
        }

        for (int i = 0; i < PathPointNum; ++i)
        {
            int index   = i;
            int idIndex = id;
            TimerHeap.AddTimer((uint)index * 200, 0, () =>
            {
                m_listChooseLevelGridPath[idIndex][index].SetActive(true);
                if (index == PathPointNum - 1)
                {
                    EventDispatcher.TriggerEvent <int>("ChooseLevelPathAnimPlayDone", idIndex);
                }
            });
        }
    }
コード例 #26
0
 public override void Active()
 {
     if (base.IsActive)
     {
         return;
     }
     if (DataReader <Monster> .Get(this.owner.TypeID).mode == 1)
     {
         return;
     }
     TimerHeap.DelTimer(this.timerID);
     this.GetAIDataByType();
     base.AIRoot = BTLoader.GetBehaviorTree(this.AIType);
     if (base.AIRoot == null)
     {
         return;
     }
     base.IsActive   = true;
     base.IsThinking = InstanceManager.IsAIThinking;
     this.owner.GetConditionManager().RegistThinkCondition(base.GetAIConditionMessage(base.AIRoot));
     if (base.IsFirstActive)
     {
         base.IsFirstActive = false;
         this.timerID       = TimerHeap.AddTimer((uint)DataReader <Monster> .Get(this.owner.TypeID).aiDelay, this.ThinkInterval, new Action(this.Think));
     }
     else
     {
         this.timerID = TimerHeap.AddTimer(0u, this.ThinkInterval, new Action(this.Think));
     }
 }
コード例 #27
0
 public void InitUI(int titleId, Dictionary <int, int> itemIdNum)
 {
     this.isClick = false;
     base.SetMask();
     for (int i = 0; i < this.Items.get_childCount(); i++)
     {
         Object.Destroy(this.Items.GetChild(i).get_gameObject());
     }
     using (Dictionary <int, int> .Enumerator enumerator = itemIdNum.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             KeyValuePair <int, int> current = enumerator.get_Current();
             ItemShow.ShowItem(this.Items, current.get_Key(), (long)current.get_Value(), false, null, 2001);
         }
     }
     FXSpineManager.Instance.PlaySpine(801, base.get_transform(), string.Empty, 3001, delegate
     {
         FXSpineManager.Instance.PlaySpine(802, UINodesManager.MiddleUIRoot, string.Empty, 3002, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
         TimerHeap.AddTimer(300u, 0, delegate
         {
             base.GetComponent <CanvasGroup>().set_alpha(1f);
             this.isClick = true;
             base.SetMask();
         });
     }, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
 }
コード例 #28
0
    protected void ShowHookQuitUI()
    {
        if (EntityWorld.Instance.EntSelf == null)
        {
            return;
        }
        InstanceManager.StopAllClientAI(true);
        if (UIManagerControl.Instance.IsOpen("BattleBackpackUI"))
        {
            UIManagerControl.Instance.HideUI("BattleBackpackUI");
        }
        CommonBattlePassUI commonBattlePassUI = LinkNavigationManager.OpenCommonBattlePassUI();

        if (commonBattlePassUI)
        {
            commonBattlePassUI.UpdateHookReward(this.fixRealTimeExp, this.fixRealTimeGold, (this.CurWave - 1 >= 0) ? (this.CurWave - 1) : 0, delegate
            {
                BattleBackpackUI battleBackpackUI = UIManagerControl.Instance.OpenUI("BattleBackpackUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as BattleBackpackUI;
                battleBackpackUI.SetTitleName(GameDataUtils.GetChineseContent(511612, false));
                battleBackpackUI.ShowTips(false, string.Empty);
                this.UpdateRealTimeDrop(InstanceManager.RealTimeDropCache);
            }, new Action(this.ExitHookInstance));
            commonBattlePassUI.PlayAnimation(InstanceResultType.Result);
            this.autoExitTimer = TimerHeap.AddTimer(this.autoExitTime, 0, new Action(this.ExitHookInstance));
        }
        else
        {
            this.ExitHookInstance();
        }
    }
コード例 #29
0
 public override void ShowWinPose()
 {
     TimerHeap.AddTimer(1000u, 0, delegate
     {
         base.ShowWinPose();
     });
 }
コード例 #30
0
    public void ShowAsFail(int petId, int monster_modelId, Action action)
    {
        this.ResetSelf();
        Pet pet = DataReader <Pet> .Get(petId);

        if (pet == null)
        {
            return;
        }
        if (pet.model.get_Count() == 0)
        {
            return;
        }
        PetInfo petInfoById = PetManager.Instance.GetPetInfoById(petId);

        if (petInfoById == null)
        {
            return;
        }
        int pet_modelId = PetManagerBase.GetPlayerPetModel(pet, petInfoById.star);

        this.m_preview01.SetModelWithAction(pet_modelId, "idle", null);
        this.m_preview02.SetModelWithAction(monster_modelId, "idle", null);
        TimerHeap.AddTimer(1000u, 0, delegate
        {
            this.m_preview01.SetModelWithSkill(pet_modelId, PetManager.Instance.GetPetSkill(petId, 1), delegate
            {
                this.IsModel01 = true;
                this.ModelFinish(action);
            });
        });
    }