// Token: 0x0600121C RID: 4636 RVA: 0x00068BC8 File Offset: 0x00066DC8
 public void DoBlastRadius(IAttackable landedStompAttackable)
 {
     this.m_stompBlastAttackables.Clear();
     this.m_stompBlastAttackables.AddRange(Targets.Attackables);
     for (int i = 0; i < this.m_stompBlastAttackables.Count; i++)
     {
         IAttackable attackable = this.m_stompBlastAttackables[i];
         if (!InstantiateUtility.IsDestroyed(attackable as Component))
         {
             if (attackable != landedStompAttackable)
             {
                 if (attackable.CanBeStomped())
                 {
                     Vector3 vector    = attackable.Position - this.Sein.Position;
                     float   magnitude = vector.magnitude;
                     if (magnitude < this.StompBlashRadius)
                     {
                         Vector3    normalized  = (vector.normalized + Vector3.up * 2f).normalized;
                         GameObject gameObject  = ((Component)attackable).gameObject;
                         float      stompDamage = this.StompDamage;
                         Damage     damage      = new Damage(stompDamage, normalized * 3f, attackable.Position, DamageType.StompBlast, gameObject);
                         damage.DealToComponents(gameObject);
                     }
                 }
             }
         }
     }
     this.m_stompBlastAttackables.Clear();
 }
Exemple #2
0
 // Token: 0x06000FFC RID: 4092 RVA: 0x00060848 File Offset: 0x0005EA48
 public void UpdateState()
 {
     SeinChargeJump.State currentState = this.CurrentState;
     if (currentState != SeinChargeJump.State.Normal)
     {
         if (currentState == SeinChargeJump.State.Jumping)
         {
             if (this.m_stateCurrentTime > this.JumpDuration)
             {
                 this.ChangeState(SeinChargeJump.State.Normal);
             }
             for (int i = 0; i < Targets.Attackables.Count; i++)
             {
                 IAttackable attackable = Targets.Attackables[i];
                 if (!InstantiateUtility.IsDestroyed(attackable as Component))
                 {
                     if (!this.m_attackablesIgnore.Contains(attackable))
                     {
                         if (attackable.CanBeStomped())
                         {
                             Vector3 vector    = attackable.Position - this.Sein.PlatformBehaviour.PlatformMovement.HeadPosition;
                             float   magnitude = vector.magnitude;
                             if (magnitude < 3f && Vector2.Dot(vector.normalized, this.PlatformMovement.LocalSpeed.normalized) > 0f)
                             {
                                 this.m_attackablesIgnore.Add(attackable);
                                 Damage damage = new Damage((float)this.Damage, this.PlatformMovement.WorldSpeed.normalized * 3f, this.Sein.Position, DamageType.Stomp, base.gameObject);
                                 damage.DealToComponents(((Component)attackable).gameObject);
                                 if (attackable.IsDead() && attackable is IStompAttackable && ((IStompAttackable)attackable).CountsTowardsSuperJumpAchievement())
                                 {
                                     AchievementsLogic.Instance.OnSuperJumpedThroughEnemy();
                                 }
                                 if (this.ExplosionEffect)
                                 {
                                     InstantiateUtility.Instantiate(this.ExplosionEffect, Vector3.Lerp(base.transform.position, attackable.Position, 0.5f), Quaternion.identity);
                                 }
                                 break;
                             }
                         }
                     }
                 }
             }
         }
     }
     this.m_stateCurrentTime += Time.deltaTime;
 }
 // Token: 0x0600121B RID: 4635 RVA: 0x00068B0C File Offset: 0x00066D0C
 public void OnCollisionGround(Vector3 normal, Collider collider)
 {
     if (this.Logic.CurrentState == this.State.StompDown)
     {
         this.LandStomp();
         if (!this.Sein.Controller.IsSwimming)
         {
             IAttackable attackable = collider.gameObject.FindComponent <IAttackable>();
             if (attackable != null && attackable.CanBeStomped())
             {
                 Damage damage = new Damage(this.StompDamage, Vector3.down * 3f, Characters.Sein.Position, DamageType.Stomp, base.gameObject);
                 damage.DealToComponents(collider.gameObject);
             }
             this.DoBlastRadius(attackable);
         }
         this.Logic.ChangeState(this.State.StompFinished);
     }
 }
    // Token: 0x06001242 RID: 4674 RVA: 0x00069768 File Offset: 0x00067968
    public void UpdateJumpingState()
    {
        float adjustedDrag = this.HorizontalDrag - this.HorizontalDrag * 0.08f * (float)(RandomizerBonus.Velocity() + RandomizerBonus.Jumpgrades());

        this.PlatformMovement.LocalSpeedX = this.PlatformMovement.LocalSpeedX * (1f - adjustedDrag);
        this.PlatformMovement.LocalSpeedY = this.PlatformMovement.LocalSpeedY * (1f - adjustedDrag);
        if (this.m_stateCurrentTime > (this.AntiGravityDuration + this.AntiGravityDuration * 0.08f * (float)(RandomizerBonus.Velocity() + RandomizerBonus.Jumpgrades())))
        {
            this.ChangeState(SeinWallChargeJump.State.Normal);
            return;
        }
        this.m_sein.PlatformBehaviour.Visuals.SpriteRotater.CenterAngle = this.m_angleDirection;
        this.m_sein.PlatformBehaviour.Visuals.SpriteRotater.UpdateRotation();
        for (int i = 0; i < Targets.Attackables.Count; i++)
        {
            IAttackable attackable = Targets.Attackables[i];
            if (!this.m_attackablesIgnore.Contains(attackable))
            {
                if (attackable.CanBeStomped())
                {
                    Vector3 vector    = attackable.Position - this.m_sein.PlatformBehaviour.PlatformMovement.Position;
                    float   magnitude = vector.magnitude;
                    if (magnitude < 4f && Vector2.Dot(vector.normalized, this.PlatformMovement.LocalSpeed.normalized) > 0f)
                    {
                        this.m_attackablesIgnore.Add(attackable);
                        Damage damage = new Damage((float)this.Damage, this.PlatformMovement.WorldSpeed.normalized * 3f, this.m_sein.Position, DamageType.Stomp, base.gameObject);
                        damage.DealToComponents(((Component)attackable).gameObject);
                        if (this.ExplosionEffect)
                        {
                            InstantiateUtility.Instantiate(this.ExplosionEffect, Vector3.Lerp(base.transform.position, attackable.Position, 0.5f), Quaternion.identity);
                        }
                        break;
                    }
                }
            }
        }
    }