Example #1
0
 protected override void UpdateProcess()
 {
     base.UpdateProcess();
     this.mBoxTime += Updater.delta;
     this.mBoxTime  = MathDxx.Clamp01(this.mBoxTime);
     this.UpdateBox();
 }
Example #2
0
 protected override void OnUpdate()
 {
     if (this.starttime == 0f)
     {
         if (base.m_Entity.m_AttackCtrl.RotateOver())
         {
             this.starttime       = Updater.AliveTime + 0.5f;
             this.startattacktime = this.starttime + 0.2f;
         }
     }
     else if ((this.starttime > 0f) && (Updater.AliveTime >= this.starttime))
     {
         if (!this.bStartAttack && (Updater.AliveTime >= this.startattacktime))
         {
             this.bStartAttack = true;
             this.Attack();
         }
         this.moveby += (Updater.delta / this.movetime) * this.alldis;
         if (this.moveby >= this.perdis)
         {
             this.moveby -= this.perdis;
             this.AttackGround();
         }
         this.percentby = ((Updater.AliveTime - this.starttime) / this.movetime) - this.percent;
         this.percent   = (Updater.AliveTime - this.starttime) / this.movetime;
         this.percent   = MathDxx.Clamp01(this.percent);
         base.m_Entity.SetPositionBy((this.endpos - this.startpos) * this.percentby);
         if (this.percent == 1f)
         {
             this.starttime = -1f;
         }
     }
 }
Example #3
0
 private void SetTrailScaleZ(float scalez)
 {
     if (this.trail != null)
     {
         scalez = MathDxx.Clamp01(scalez);
         this.trail.transform.localScale = new Vector3(1f, 1f, scalez);
     }
 }
Example #4
0
 protected override void OnUpdate()
 {
     if (this.flytime > 0f)
     {
         this.flytime           -= Updater.delta;
         this.mColor.a           = 1f - (this.flytime / 1f);
         this.mColor.a           = MathDxx.Clamp01(this.mColor.a);
         this.sprite_sword.color = this.mColor;
     }
     else
     {
         base.OnUpdate();
     }
 }
 protected override void OnUpdate()
 {
     if (this.time < this.endtime)
     {
         this.time   += Updater.delta;
         this.percent = this.time / this.maxtime;
         this.percent = MathDxx.Clamp01(this.percent);
         this.UpdateBoxColloder(this.percent);
     }
     else
     {
         this.UpdateBoxColloder(0f);
     }
 }
 private void HeroDroping()
 {
     if (this.bDropStart && (this.frameCount <= (Time.frameCount - 3)))
     {
         this.mDropStartTime += Updater.delta;
         float num = this.mDropStartTime / this.mDropTime;
         num = MathDxx.Clamp01(num);
         GameLogic.Self.SetPosition(new Vector3(GameLogic.Self.position.x, this.starty * this.curve.Evaluate(num), GameLogic.Self.position.z));
         if ((num == 1f) && (GameLogic.Self.position.y <= 0f))
         {
             GameLogic.Self.SetPosition(new Vector3(GameLogic.Self.position.x, 0f, GameLogic.Self.position.z));
             this.bDropStart = false;
             this.CreateSmoke();
             GameLogic.Hold.Sound.PlayBattleSpecial(0x4c4b45, Vector3.zero);
             GameNode.CameraShake(CameraShakeType.FirstDrop);
             this.action.AddActionWaitDelegate(0.6f, delegate {
                 GameLogic.Release.Game.ShowJoy(true);
                 GameLogic.Release.Game.SetRunning();
                 this.DeInit();
                 if (GameLogic.Hold.BattleData.GetMode() == GameMode.eLevel)
                 {
                     ChooseSkillProxy.Transfer transfer;
                     if (LocalSave.Instance.BattleIn_GetIn())
                     {
                         if (LocalSave.Instance.BattleIn_GetLevelUpSkills() != null)
                         {
                             transfer = new ChooseSkillProxy.Transfer {
                                 type = (ChooseSkillProxy.ChooseSkillType)LocalSave.Instance.BattleIn_GetLevelUpType()
                             };
                             Facade.Instance.RegisterProxy(new ChooseSkillProxy(transfer));
                             WindowUI.ShowWindow(WindowID.WindowID_ChooseSkill);
                         }
                     }
                     else if (GameLogic.Self.m_EntityData.attribute.ExtraSkill.Value > 0L)
                     {
                         transfer = new ChooseSkillProxy.Transfer {
                             type = ChooseSkillProxy.ChooseSkillType.eFirst
                         };
                         Facade.Instance.RegisterProxy(new ChooseSkillProxy(transfer));
                         WindowUI.ShowWindow(WindowID.WindowID_ChooseSkill);
                     }
                 }
                 LocalSave.Instance.BattleIn_UpdateIn();
             });
         }
     }
 }
Example #7
0
    private void AIMoving()
    {
        float num = ((Updater.AliveTime - this.startTime) - this.delaytime) / this.jumptime;

        num = MathDxx.Clamp01(num);
        Vector3 vector = ((this.endpos - this.startpos) * num) + this.startpos;

        base.m_Entity.SetPosition(vector + new Vector3(0f, this.curve.Evaluate(num) * this.height, 0f));
        if (num == 1f)
        {
            this.obj = GameLogic.EffectGet("Effect/Boss/BossJumpHit5028");
            this.obj.transform.position = base.m_Entity.position;
            float[] args = new float[] { 1f };
            SkillAloneAttrGoodBase.Add(base.m_Entity, this.obj, true, args);
            this.bjumpend = true;
        }
    }
Example #8
0
 private void OnUpdate(float delta)
 {
     if (this.bStart && (Updater.AliveTime >= this.starttime))
     {
         this.percent       = (Updater.AliveTime - this.starttime) / this.updatetime;
         this.percent       = MathDxx.Clamp01(this.percent);
         this.percentchange = this.percent - this.percentbefore;
         this.percentbefore = this.percent;
         this.currentmove   = (this.endpos - this.startpos) * this.percentchange;
         base.m_Entity.SetPositionBy(this.currentmove);
         this.OnUpdateMove(this.currentmove.magnitude);
         if (this.percent == 1f)
         {
             this.bStart = false;
         }
     }
 }
Example #9
0
 private void LateUpdate()
 {
     if ((this == null) || (this.mTransform == null))
     {
         this.Despawn();
     }
     else
     {
         this.percent = (Updater.AliveTime - this.starttime) / mTimes[this.mHitType];
         this.percent = MathDxx.Clamp01(this.percent);
         if (this.percent >= 1f)
         {
             this.Despawn();
         }
         else
         {
             if (this.m_Entity != null)
             {
                 this.entitypos = this.m_Entity.position;
             }
             if ((this.m_Entity != null) && (this.m_Entity.m_Body != null))
             {
                 this.entitybodypos = this.m_Entity.m_Body.HPMask.transform.localPosition;
             }
             if (this.CurrentMoveCount > 0)
             {
                 this.CurrentMoveCount--;
                 this.MoveAll += this.MovePer;
             }
             this.screens = Utils.World2Screen(this.entitypos);
             if (this.curve_pos != null)
             {
                 this.screens.y += ((this.entitybodypos.y * 23f) * GameLogic.HeightScale) + this.curve_pos.Evaluate(this.percent);
             }
             this.mTransform.position = this.screens + this.MoveAll;
             if (this.curve_scale != null)
             {
                 this.mTransform.localScale = Vector3.one * this.curve_scale.Evaluate(this.percent);
             }
             if ((this.curve_alpha != null) && (this.mCanvasGroup != null))
             {
                 this.mCanvasGroup.alpha = this.curve_alpha.Evaluate(this.percent);
             }
         }
     }
 }
Example #10
0
 protected override void OnUpdate()
 {
     if ((this.starttime == 0f) && base.m_Entity.m_AttackCtrl.RotateOver())
     {
         this.starttime = Updater.AliveTime;
     }
     if ((this.starttime > 0f) && !this.bJumpEnd)
     {
         this.percent = (Updater.AliveTime - this.starttime) / this.jumptime;
         this.percent = MathDxx.Clamp01(this.percent);
         base.m_Entity.SetPosition((this.startpos + ((this.endpos - this.startpos) * this.percent)) + new Vector3(0f, this.curve.Evaluate(this.percent) * 6f, 0f));
         if (this.percent == 1f)
         {
             this.bJumpEnd = true;
             this.Attack();
         }
     }
 }
Example #11
0
 private void OnUpdate(float delta)
 {
     if (this.bStart && (Updater.AliveTime >= this.starttime))
     {
         if (this.percentbefore == 0f)
         {
             GameLogic.Hold.Sound.PlayBattleSpecial(0x4dd1e4, base.m_Entity.position);
         }
         this.percent       = (Updater.AliveTime - this.starttime) / this.updatetime;
         this.percent       = MathDxx.Clamp01(this.percent);
         this.percentchange = this.percent - this.percentbefore;
         this.percentbefore = this.percent;
         base.m_Entity.SetPositionBy((this.endpos - this.startpos) * this.percentchange);
         base.m_Entity.SetPosition(new Vector3(base.m_Entity.position.x, this.curve.Evaluate(this.percent) * 3f, base.m_Entity.position.z));
         if (this.percent == 1f)
         {
             this.bStart = false;
         }
     }
 }
Example #12
0
    public void Update()
    {
        Vector2Int roomXY = GameLogic.Release.MapCreatorCtrl.GetRoomXY(this.m_Entity.position);

        this.bombpos = GameLogic.Release.MapCreatorCtrl.GetWorldPosition(roomXY);
        if (this.groundlight != null)
        {
            this.groundlight.position = this.bombpos;
        }
        if (this.bStand)
        {
            if (!GameLogic.Release.MapCreatorCtrl.Bomberman_is_empty(this.m_Entity.position))
            {
                this.starttime = Updater.AliveTime;
                this.SetProgressShow(false);
            }
            else
            {
                float num2 = (Updater.AliveTime - this.starttime) / this.updatetime;
                num2 = MathDxx.Clamp01(num2);
                this.SetProgressShow(true);
                this.SetProgressValue(num2);
                if (this.progress != null)
                {
                    Vector3 vector = Utils.World2Screen(this.bombpos);
                    float   x      = vector.x;
                    float   y      = vector.y;
                    this.progress.position = new Vector3(x, y - 50f, 0f);
                }
                if (num2 >= 1f)
                {
                    this.starttime += this.updatetime;
                    this.CreateBomb();
                }
            }
        }
        else
        {
            this.SetProgressShow(false);
        }
    }