// Token: 0x06001922 RID: 6434
 public new void FixedUpdate()
 {
     base.FixedUpdate();
     if (base.IsSuspended)
     {
         return;
     }
     this.PlatformMovement.LocalSpeedY -= RandomizerBonusSkill.TimeScale(Time.deltaTime) * this.Settings.Gravity;
     if (this.PlatformMovement.LocalSpeedY < -this.Settings.MaxFallSpeed)
     {
         this.PlatformMovement.LocalSpeedY = -this.Settings.MaxFallSpeed;
     }
     if (this.PlatformMovement.IsOnCeiling)
     {
         this.PlatformMovement.LocalSpeedY = Mathf.Min(0f, this.PlatformMovement.LocalSpeedY);
     }
     this.UpdateRotation();
     if (Characters.Sein)
     {
         this.m_playerSmoothSpeed = Vector3.Lerp(this.m_playerSmoothSpeed, Characters.Sein.Speed, 0.1f);
     }
     if (base.IsInWater)
     {
         base.Drown();
     }
 }
    // Token: 0x060031DD RID: 12765 RVA: 0x000D060C File Offset: 0x000CE80C
    public void UpdateVelocity()
    {
        Vector3 vector = -Vector3.ClampMagnitude(this.Displacement / Time.deltaTime, 10f);

        this.Displacement      += vector * Time.deltaTime;
        this.Rigidbody.velocity = RandomizerBonusSkill.TimeScale(this.Direction * this.Speed + vector);
    }
    // Token: 0x06001AA8 RID: 6824
    public new void FixedUpdate()
    {
        base.FixedUpdate();
        if (base.IsSuspended)
        {
            return;
        }
        bool flag;

        if (this.PlatformMovement.MovingHorizontally && EnemyStopper.InsideEnemyStopper(base.Position, (!base.FaceLeft) ? Vector3.right : Vector3.left, out flag))
        {
            base.FaceLeft = !base.FaceLeft;
            if (this.Controller.StateMachine.CurrentState == this.State.RunBack)
            {
                this.Controller.StateMachine.ChangeState(this.State.SpitterEnemyCharging);
            }
        }
        if (!this.PlatformMovement.IsSuspended && this.PlatformMovement.IsInAir)
        {
            this.PlatformMovement.LocalSpeedY -= this.Settings.Gravity * RandomizerBonusSkill.TimeScale(Time.deltaTime);
        }
        this.UpdateRotation();
        if (base.IsInWater)
        {
            base.Drown();
        }
        if (this.WilhelmScreamZoneRectanglesContain(base.transform.position) && !this.m_hasEnteredZone && this.EnterZoneAction)
        {
            this.m_hasEnteredZone = true;
            BingoController.OnScream();
            this.EnterZoneAction.Perform(null);
        }
    }
Пример #4
0
 // Token: 0x06001B82 RID: 7042
 public override void UpdateState()
 {
     if (base.CurrentStateTime >= this.m_shootDelay && !this.m_hasShot)
     {
         this.m_hasShot = true;
         if (this.m_shootEffect)
         {
             this.m_shootEffect.Spawn(null);
         }
         if (this.m_shootSound)
         {
             this.m_shootSound.Play();
         }
         Projectile projectile = this.m_projectileSpawner.SpawnProjectile();
         Vector3    b          = RandomizerBonusSkill.TimeScale(projectile.Direction * projectile.Speed * this.m_shootDelay + Vector3.down * projectile.Gravity * this.m_shootDelay * this.m_shootDelay * 0.5f);
         projectile.Position    += b;
         projectile.SpeedVector += Vector3.down * projectile.Gravity * this.m_shootDelay;
         projectile.GetComponent <DamageDealer>().Damage = this.m_projectileDamage;
         Vector3 vector = this.m_projectileAnimationPosition - projectile.Position;
         vector.z                = 0f;
         projectile.Position    += vector;
         projectile.Displacement = vector;
     }
     base.UpdateState();
 }
    // Token: 0x060019CD RID: 6605
    public override void UpdateState()
    {
        float          accelerationDuration           = this.RammingEnemy.Settings.AccelerationDuration;
        AnimationCurve runningSpeedMultipliedOverTime = this.RammingEnemy.Settings.RunningSpeedMultipliedOverTime;
        float          runSpeed = this.RammingEnemy.Settings.RunSpeed;

        this.GroundEnemy.PlatformMovement.LocalSpeedX = RandomizerBonusSkill.TimeScale((float)((!this.GroundEnemy.FaceLeft) ? 1 : -1) * runSpeed * runningSpeedMultipliedOverTime.Evaluate(base.CurrentStateTime / accelerationDuration));
    }
    // Token: 0x06001697 RID: 5783
    public override void UpdateState()
    {
        this.DashOwl.FlyMovement.Kickback.Stop();
        Vector3 a = this.m_dashTargetOffset * (this.DashOwl.Settings.DashCurve.Evaluate(base.CurrentStateTime + RandomizerBonusSkill.TimeScale(Time.deltaTime)) - this.DashOwl.Settings.DashCurve.Evaluate(base.CurrentStateTime));

        this.DashOwl.FlyMovement.Velocity = ((Time.deltaTime != 0f) ? (a / RandomizerBonusSkill.TimeScale(Time.deltaTime)) : Vector3.zero);
        base.UpdateState();
    }
Пример #7
0
 // Token: 0x06001A54 RID: 6740
 public new void FixedUpdate()
 {
     base.FixedUpdate();
     if (!base.IsSuspended)
     {
         this.Rigidbody.velocity = RandomizerBonusSkill.TimeScale(this.SpeedOverTimeCurve.Evaluate(this.CurrentTime) * base.Direction * base.Speed);
     }
 }
Пример #8
0
 public static void OnSave()
 {
     if (Randomizer.Sync)
     {
         RandomizerSyncManager.onSave();
     }
     RandomizerBonusSkill.OnSave();
 }
Пример #9
0
 public static void OnDeath()
 {
     if (Randomizer.Sync)
     {
         RandomizerSyncManager.onDeath();
     }
     RandomizerBonusSkill.OnDeath();
     RandomizerTrackedDataManager.UpdateBitfields();
     RandomizerStatsManager.OnDeath();
 }
Пример #10
0
 // Token: 0x060007D1 RID: 2001 RVA: 0x0000879A File Offset: 0x0000699A
 public override void Perform(IContext context)
 {
     SaveSlotBackupsManager.ResetBackupDelay();
     InstantLoadScenesController.Instance.LockFinishingLoading = true;
     RandomizerStatsManager.Active = true;
     GameStateMachine.Instance.SetToGame();
     if (!GameController.Instance.SaveGameController.PerformLoad())
     {
     }
     RandomizerBonusSkill.DelayDrainUpdate();
 }
Пример #11
0
 // Token: 0x0600177C RID: 6012
 public void FixedUpdate()
 {
     if (this is Enemy)
     {
         (this as Enemy).Animation.Animator.TextureAnimator.SpeedMultiplier = RandomizerBonusSkill.TimeScale(1f);
     }
     if (this.FrustrumOptimized && !this.m_insideFrustum && this.CanBeOptimized())
     {
         base.gameObject.SetActive(false);
     }
 }
 // Token: 0x06002097 RID: 8343
 public void FixedUpdate()
 {
     this.Ground.Update();
     this.WallLeft.Update();
     this.WallRight.Update();
     this.GroundNormal                 = ((this.m_groundNormal.magnitude != 0f) ? this.m_groundNormal.normalized : Vector3.up);
     this.IsOnGround                   = (this.m_groundNormal.magnitude != 0f);
     this.m_groundNormal               = Vector3.zero;
     this.Speed.z                      = 0f;
     this.m_rigidbody.velocity         = ((!this.IsSuspended) ? RandomizerBonusSkill.TimeScale(this.Speed) : Vector3.zero);
     this.m_rigidbody.detectCollisions = true;
 }
 // Token: 0x060037FB RID: 14331
 public static void Update()
 {
     if (!Characters.Sein.IsSuspended && RandomizerBonusSkill.EnergyDrainRate > 0f)
     {
         if (RandomizerBonusSkill.EnergyDrainRate > Characters.Sein.Energy.Current)
         {
             RandomizerBonusSkill.EnergyDrainRate = 0f;
             RandomizerBonusSkill.DisableAllPersistant();
             return;
         }
         Characters.Sein.Energy.Spend(RandomizerBonusSkill.EnergyDrainRate);
     }
 }
Пример #14
0
 // Token: 0x06003783 RID: 14211 RVA: 0x000E3050 File Offset: 0x000E1250
 public static void Update()
 {
     Characters.Sein.Mortality.Health.GainHealth((float)(RandomizerBonus.HealthRegeneration() + ((!Characters.Sein.PlayerAbilities.HealthMarkers.HasAbility) ? 0 : 2)) * 0.00112f);
     if (RandomizerBonus.Bleeding() > 0)
     {
         Characters.Sein.Mortality.Health.LoseHealth((float)RandomizerBonus.Bleeding() * 0.00112f);
     }
     if (RandomizerBonus.Bleeding() > 0 && Characters.Sein.Mortality.Health.Amount <= 0f)
     {
         Characters.Sein.Mortality.DamageReciever.OnRecieveDamage(new Damage(1f, default(Vector2), default(Vector3), DamageType.Water, null));
     }
     Characters.Sein.Energy.Gain((float)(RandomizerBonus.EnergyRegeneration() + ((!Characters.Sein.PlayerAbilities.EnergyMarkers.HasAbility) ? 0 : 2)) * 0.00028f);
     RandomizerBonusSkill.Update();
 }
 // Token: 0x060031D9 RID: 12761 RVA: 0x000D03CC File Offset: 0x000CE5CC
 public virtual void FixedUpdate()
 {
     if (this.IsSuspended)
     {
         this.Rigidbody.velocity = Vector3.zero;
         return;
     }
     if (this.EnableCollisionGracePeriod && this.CurrentTime > this.CollisionGracePeriod)
     {
         this.m_collider.enabled = true;
     }
     if (this.m_lastLoop == null && this.ProjectileLoop != null)
     {
         this.m_lastLoop = Sound.Play(this.ProjectileLoop.GetSound(null), base.transform.position, this.m_nullify);
         if (this.m_lastLoop)
         {
             this.m_lastLoop.AttachTo = base.transform;
         }
     }
     this.CurrentTime += Time.deltaTime;
     if (this.CurrentTime > this.MaximumLiveTime)
     {
         this.m_explode = true;
     }
     if (WaterZone.PositionInWater(this.Position))
     {
         this.m_explode = true;
     }
     if (this.Gravity > 0f)
     {
         this.SpeedVector += RandomizerBonusSkill.TimeScale(Vector3.down * this.Gravity * Time.fixedDeltaTime);
     }
     this.UpdateVelocity();
     if (this.RotateSpriteToDirection)
     {
         float num = base.transform.eulerAngles.z;
         num = Mathf.MoveTowardsAngle(num, MoonMath.Angle.AngleFromDirection(this.Direction), this.SpriteTurnSpeed * Time.deltaTime);
         base.transform.eulerAngles = new Vector3(0f, 0f, num);
     }
     if (this.m_explode)
     {
         this.ExplodeProjectile();
     }
     if (this.m_explodeLater)
     {
         this.m_explode      = true;
         this.m_explodeLater = false;
     }
 }
    // Token: 0x06000FAB RID: 4011 RVA: 0x0005F690 File Offset: 0x0005D890
    public void AttackTarget()
    {
        Component component = this.Target as Component;

        if (!InstantiateUtility.IsDestroyed(component))
        {
            Vector2 force = -MoonMath.Angle.VectorFromAngle(this.m_bashAngle + 90f) * (4f + (float)RandomizerBonus.Velocity());
            new Damage(RandomizerBonusSkill.AbilityDamage((!this.Sein.PlayerAbilities.BashBuff.HasAbility) ? this.Damage : this.UpgradedDamage), force, Characters.Sein.Position, DamageType.Bash, base.gameObject).DealToComponents(component.gameObject);                 EntityTargetting component2 = component.gameObject.GetComponent <EntityTargetting>();
            if (component2 && component2.Entity is Enemy)
            {
                SeinBashAttack.OnBashEnemy(component2);
            }
            if (this.Sein.PlayerAbilities.BashBuff.HasAbility)
            {
                this.BeginBashThroughEnemies();
            }
        }
    }
 // Token: 0x060031F0 RID: 12784
 public void FixedUpdate()
 {
     if (this.IsSuspended)
     {
         return;
     }
     if (this.trueTimedDuration != null)
     {
         this.m_timedTrigger.Duration = this.trueTimedDuration.Value / RandomizerBonusSkill.TimeScale(1f);
     }
     if (InstantiateUtility.IsDestroyed(this.m_lastProjectile))
     {
         this.m_lastProjectile = null;
     }
     if (this.WaitForProjectileToBeDestroyed && !this.TimerPaused && this.m_lastProjectile != null)
     {
         this.TimerPaused = true;
     }
     if (this.WaitForProjectileToBeDestroyed && this.TimerPaused && this.m_lastProjectile == null)
     {
         this.TimerPaused = false;
     }
     this.TimeSinceLastShot += Time.deltaTime;
 }
Пример #18
0
    // Token: 0x060017AC RID: 6060
    public void FixedUpdate()
    {
        if (this.Entity.IsSuspended)
        {
            return;
        }
        if (this.m_transManager == null)
        {
            this.m_transManager = this.StateMachine.GetTransistionManager <OnFixedUpdate>();
        }
        if (this.m_transManager == null)
        {
            return;
        }
        float deltaTime = Time.deltaTime;

        if (this.Entity is Enemy)
        {
            deltaTime = RandomizerBonusSkill.TimeScale(deltaTime);
        }
        this.StateMachine.UpdateState(deltaTime);
        this.StateMachine.CurrentTrigger = null;
        this.m_transManager.Process(this.StateMachine);
    }
Пример #19
0
    // Token: 0x0600376D RID: 14189 RVA: 0x000E2764 File Offset: 0x000E0964
    public static void UpgradeID(int ID)
    {
        bool flag = ID < 0;

        if (flag)
        {
            ID = -ID;
        }
        if (RandomizerBonusSkill.BonusSkillNames.ContainsKey(ID))
        {
            RandomizerBonusSkill.FoundBonusSkill(ID);
            return;
        }
        if (ID >= 200 && ID < 260)
        {
            int     abilityId = (ID - 200) % 30;
            Ability ability   = abilities[abilityId];
            if (ID < 230)
            {
                ability.Found();
            }
            else
            {
                ability.Lost();
            }
            return;
        }
        switch (ID)
        {
        case 0:
            if (!flag)
            {
                Characters.Sein.Mortality.Health.SetAmount((float)(Characters.Sein.Mortality.Health.MaxHealth + 20));
                RandomizerSwitch.PickupMessage("Mega Health");
                return;
            }
            break;

        case 1:
            if (!flag)
            {
                Characters.Sein.Energy.SetCurrent(Characters.Sein.Energy.Max + 5f);
                RandomizerSwitch.PickupMessage("Mega Energy");
                return;
            }
            break;

        case 2:
            Randomizer.returnToStart();
            RandomizerSwitch.PickupMessage("Go Home!");
            return;

        case 20:
            break;

        case 6:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("Attack Upgrade (" + RandomizerBonus.SpiritFlameLevel().ToString() + ")");
                return;
            }
            if (RandomizerBonus.SpiritFlameLevel() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                RandomizerSwitch.PickupMessage("Attack Upgrade (" + RandomizerBonus.SpiritFlameLevel().ToString() + ")");
                return;
            }
            break;

        case 8:
            RandomizerSwitch.PickupMessage("Explosion Power Upgrade");
            if (!RandomizerBonus.ExplosionPower())
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                return;
            }
            break;

        case 9:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
            }
            else if (Characters.Sein.Inventory.GetRandomizerItem(ID) > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
            }
            if (Characters.Sein.Inventory.GetRandomizerItem(ID) == 1)
            {
                RandomizerSwitch.PickupMessage("Spirit Light Efficiency");
            }
            else
            {
                RandomizerSwitch.PickupMessage("Spirit Light Efficiency (" + Characters.Sein.Inventory.GetRandomizerItem(ID).ToString() + ")");
            }
            break;

        case 10:
            RandomizerSwitch.PickupMessage("Extra Air Dash");
            if (!RandomizerBonus.DoubleAirDash())
            {
                Characters.Sein.Inventory.SetRandomizerItem(ID, 1);
                return;
            }
            break;

        case 11:
            RandomizerSwitch.PickupMessage("Charge Dash Efficiency");
            if (!RandomizerBonus.ChargeDashEfficiency())
            {
                Characters.Sein.Inventory.SetRandomizerItem(ID, 1);
                return;
            }
            break;

        case 12:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                if (RandomizerBonus.DoubleJumpUpgrades() == 1)
                {
                    RandomizerSwitch.PickupMessage("Extra Double Jump");
                    return;
                }
                RandomizerSwitch.PickupMessage("Extra Double Jump (" + RandomizerBonus.DoubleJumpUpgrades().ToString() + ")");
                return;
            }
            else if (RandomizerBonus.DoubleJumpUpgrades() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                if (RandomizerBonus.DoubleJumpUpgrades() == 1)
                {
                    RandomizerSwitch.PickupMessage("Extra Double Jump");
                    return;
                }
                RandomizerSwitch.PickupMessage("Extra Double Jump (" + RandomizerBonus.DoubleJumpUpgrades().ToString() + ")");
                return;
            }
            break;

        case 13:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("Health Regeneration (" + RandomizerBonus.HealthRegeneration().ToString() + ")");
                return;
            }
            if (RandomizerBonus.HealthRegeneration() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                RandomizerSwitch.PickupMessage("Health Regeneration (" + RandomizerBonus.HealthRegeneration().ToString() + ")");
                return;
            }
            break;

        case 15:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("Energy Regeneration (" + RandomizerBonus.EnergyRegeneration().ToString() + ")");
                return;
            }
            if (RandomizerBonus.EnergyRegeneration() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                RandomizerSwitch.PickupMessage("Energy Regeneration (" + RandomizerBonus.EnergyRegeneration().ToString() + ")");
                return;
            }
            break;

        case 17:
            if (flag)
            {
                if (RandomizerBonus.WaterVeinShards() > 0)
                {
                    Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                    RandomizerSwitch.PickupMessage("*Water Vein Shard (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)*");
                }
            }
            else if (RandomizerBonus.WaterVeinShards() >= 3)
            {
                RandomizerSwitch.PickupMessage("*Water Vein Shard (extra)*");
            }
            else
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("*Water Vein Shard (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)*", 300);
            }
            Keys.GinsoTree = (RandomizerBonus.WaterVeinShards() >= 3);
            if (Keys.GinsoTree)
            {
                RandomizerStatsManager.FoundEvent(0);
            }
            return;

        case 19:
            if (flag)
            {
                if (RandomizerBonus.GumonSealShards() > 0)
                {
                    Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                    RandomizerSwitch.PickupMessage("#Gumon Seal Shard (" + RandomizerBonus.GumonSealShards().ToString() + "/3)#");
                }
            }
            else if (RandomizerBonus.GumonSealShards() >= 3)
            {
                RandomizerSwitch.PickupMessage("#Gumon Seal Shard (extra)#");
            }
            else
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("#Gumon Seal Shard (" + RandomizerBonus.GumonSealShards().ToString() + "/3)#", 300);
            }
            Keys.ForlornRuins = (RandomizerBonus.GumonSealShards() >= 3);
            if (Keys.ForlornRuins)
            {
                RandomizerStatsManager.FoundEvent(2);
            }
            return;

        case 21:
            if (flag)
            {
                if (RandomizerBonus.SunstoneShards() > 0)
                {
                    Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                    RandomizerSwitch.PickupMessage("@Sunstone Shard (" + RandomizerBonus.SunstoneShards().ToString() + "/3)@");
                }
            }
            else if (RandomizerBonus.SunstoneShards() >= 3)
            {
                RandomizerSwitch.PickupMessage("@Sunstone Shard (extra)@");
            }
            else
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("@Sunstone Shard (" + RandomizerBonus.SunstoneShards().ToString() + "/3)@", 300);
            }
            Keys.MountHoru = (RandomizerBonus.SunstoneShards() >= 3);
            if (Keys.MountHoru)
            {
                RandomizerStatsManager.FoundEvent(4);
            }
            return;

        case 28:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
            }
            else if (RandomizerBonus.WarmthFrags() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
            }
            if (Randomizer.fragKeyFinish < RandomizerBonus.WarmthFrags())
            {
                RandomizerSwitch.PickupMessage("@Warmth Fragment (extra)@", 300);
                return;
            }
            RandomizerSwitch.PickupMessage(string.Concat(new object[] { "@Warmth Fragment (", RandomizerBonus.WarmthFrags().ToString(), "/", Randomizer.fragKeyFinish, ")@" }), 300);
            break;

        case 29:
            return;

        case 30:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("Bleeding x" + RandomizerBonus.Bleeding().ToString());
                return;
            }
            if (RandomizerBonus.Bleeding() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                RandomizerSwitch.PickupMessage("Bleeding x" + RandomizerBonus.Bleeding().ToString());
                return;
            }
            break;

        case 31:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
            }
            else if (RandomizerBonus.Lifesteal() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
            }
            if (Lifesteal() == 1)
            {
                RandomizerSwitch.PickupMessage("Health Leech");
            }
            else
            {
                RandomizerSwitch.PickupMessage("Health Leech x" + RandomizerBonus.Lifesteal().ToString());
            }
            break;

        case 32:
            if (!flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
            }
            else if (RandomizerBonus.Manavamp() > 0)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
            }
            if (Manavamp() == 1)
            {
                RandomizerSwitch.PickupMessage("Energy Leech");
            }
            else
            {
                RandomizerSwitch.PickupMessage("Energy Leech x" + RandomizerBonus.Manavamp().ToString());
            }
            break;

        case 33:
            if (!flag)
            {
                int v = Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("Skill Velocity Upgrade x" + v.ToString());
                if (Characters.Sein.Inventory.GetRandomizerItem(108) == 0)
                {
                    RandomizerBonusSkill.FoundBonusSkill(108);
                }
                return;
            }
            if (RandomizerBonus.Velocity() > 0)
            {
                int v = Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                RandomizerSwitch.PickupMessage("Skill Velocity Upgrade x" + v.ToString());
                return;
            }
            break;

        case 34:
            Characters.Sein.Inventory.SetRandomizerItem(34, 1);
            RandomizerSwitch.PickupMessage("Return to start disabled!");
            break;

        case 35:
            Characters.Sein.Inventory.SetRandomizerItem(34, 0);
            RandomizerSwitch.PickupMessage("Return to start enabled!");
            break;

        case 36:
            RandomizerSwitch.PickupMessage("Underwater Skill Usage");
            Characters.Sein.Inventory.SetRandomizerItem(36, 1);
            break;

        case 37:
            if (!flag)
            {
                int v = Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
                RandomizerSwitch.PickupMessage("Jump Upgrade x" + v.ToString());
                if (Characters.Sein.Inventory.GetRandomizerItem(108) == 0)
                {
                    RandomizerBonusSkill.FoundBonusSkill(108);
                }
                return;
            }
            if (RandomizerBonus.Jumpgrades() > 0)
            {
                int v = Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
                RandomizerSwitch.PickupMessage("Jump Upgrade x" + v.ToString());
                return;
            }
            break;

        case 40:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Wall Jump Lost!!@", 240);
            Characters.Sein.PlayerAbilities.WallJump.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 41:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@ChargeFlame Lost!!@", 240);
            Characters.Sein.PlayerAbilities.ChargeFlame.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 42:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@DoubleJump Lost!!@", 240);
            Characters.Sein.PlayerAbilities.DoubleJump.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 43:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Bash Lost!!@", 240);
            Characters.Sein.PlayerAbilities.Bash.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 44:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Stomp Lost!!@", 240);
            Characters.Sein.PlayerAbilities.Stomp.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 45:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Glide Lost!!@", 240);
            Characters.Sein.PlayerAbilities.Glide.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 46:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Climb Lost!!@", 240);
            Characters.Sein.PlayerAbilities.Climb.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 47:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Charge Jump Lost!!@", 240);
            Characters.Sein.PlayerAbilities.ChargeJump.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 48:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Dash Lost!!@", 240);
            Characters.Sein.PlayerAbilities.Dash.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 49:
            if (!Characters.Sein || flag)
            {
                return;
            }
            RandomizerSwitch.PickupMessage("@Grenade Lost!!@", 240);
            Characters.Sein.PlayerAbilities.Grenade.HasAbility = false;
            Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities();
            return;

        case 81:
            if (Characters.Sein.Inventory.GetRandomizerItem(ID) > 0)
            {
                return;
            }
            Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
            string s_color = "";
            string g_color = "";
            if (Characters.Sein.PlayerAbilities.HasAbility(AbilityType.Stomp))
            {
                s_color = "$";
            }
            if (Characters.Sein.PlayerAbilities.HasAbility(AbilityType.Grenade))
            {
                g_color = "$";
            }
            RandomizerSwitch.PickupMessage(s_color + "Stomp: " + Randomizer.StompZone + s_color + g_color + "    Grenade: " + Randomizer.GrenadeZone + g_color, 480);
            break;

        default:
            if (flag)
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, -1);
            }
            else
            {
                Characters.Sein.Inventory.IncRandomizerItem(ID, 1);
            }
            return;
        }
    }
Пример #20
0
 // Token: 0x06001810 RID: 6160
 public void AdvanceTime()
 {
     this.m_kickbackTimeRemaining -= RandomizerBonusSkill.TimeScale(Time.deltaTime);
 }
Пример #21
0
 public static void Update()
 {
     Randomizer.UpdateMessages();
     if (Characters.Sein && SkillTreeManager.Instance != null && SkillTreeManager.Instance.NavigationManager.IsVisible)
     {
         if (Characters.Sein.IsSuspended)
         {
             SkillTreeManager.Instance.NavigationManager.FadeAnimator.SetParentOpacity(1f);
         }
         else
         {
             SkillTreeManager.Instance.NavigationManager.FadeAnimator.SetParentOpacity(RandomizerSettings.AbilityMenuOpacity);
         }
     }
     Randomizer.Tick();
     if (Characters.Sein && !Characters.Sein.IsSuspended)
     {
         RandomizerBonus.Update();
         if (!Randomizer.ColorShift)
         {
             RandomizerColorManager.UpdateColors();
         }
         Randomizer.UpdateHoruCutsceneStatus();
         if (Characters.Sein.Inventory.GetRandomizerItem(82) > 0 && Items.NightBerry != null)
         {
             Items.NightBerry.transform.position = new Vector3(-910f, -300f);
             Characters.Sein.Inventory.SetRandomizerItem(82, 0);
         }
         if (RandomizerBonusSkill.LevelExplosionCooldown > 0)
         {
             RandomizerBonusSkill.LevelExplosionCooldown--;
             if (RandomizerBonusSkill.LevelExplosionCooldown > 10)
             {
                 Characters.Sein.Energy.SetCurrent(RandomizerBonusSkill.OldEnergy);
                 Characters.Sein.Mortality.Health.SetAmount(RandomizerBonusSkill.OldHealth);
             }
         }
         if (Randomizer.Chaos)
         {
             RandomizerChaosManager.Update();
         }
         if (Randomizer.Sync)
         {
             RandomizerSyncManager.Update();
         }
         if (Randomizer.Warping > 0)
         {
             if (Randomizer.DelayedWarp)
             {
                 Randomizer.DelayedWarp = false;
                 Randomizer.WarpTo(Randomizer.WarpTarget, Randomizer.Warping);
             }
             else
             {
                 Characters.Sein.Position = Randomizer.WarpTarget;
                 Characters.Sein.Speed    = new Vector3(0f, 0f);
                 Characters.Ori.Position  = new Vector3(Randomizer.WarpTarget.x, Randomizer.WarpTarget.y - 5);
                 bool loading = false;
                 foreach (SceneManagerScene sms in Scenes.Manager.ActiveScenes)
                 {
                     if (sms.CurrentState == SceneManagerScene.State.Loading)
                     {
                         loading = true;
                         break;
                     }
                 }
                 if (!loading)
                 {
                     Randomizer.Warping--;
                 }
                 if (Randomizer.Warping == 0 && Randomizer.SaveAfterWarp)
                 {
                     GameController.Instance.CreateCheckpoint();
                     GameController.Instance.SaveGameController.PerformSave();
                     Randomizer.SaveAfterWarp = false;
                 }
             }
         }
         else if (Randomizer.Returning)
         {
             Characters.Sein.Position = new Vector3(189f, -215f);
             if (Scenes.Manager.CurrentScene.Scene == "sunkenGladesRunaway")
             {
                 Randomizer.Returning = false;
             }
         }
     }
     if (CreditsActive)
     {
         return;
     }
     if (RandomizerRebinding.ReloadSeed.IsPressed())
     {
         Randomizer.initialize();
         Randomizer.showSeedInfo();
         return;
     }
     if (RandomizerRebinding.ShowStats.IsPressed() && Characters.Sein)
     {
         RandomizerStatsManager.ShowStats(10);
         return;
     }
     if (RandomizerRebinding.ListTrees.IsPressed() && Characters.Sein)
     {
         Randomizer.MessageQueueTime = 0;
         RandomizerTrackedDataManager.ListTrees();
         return;
     }
     if (RandomizerRebinding.ListRelics.IsPressed() && Characters.Sein)
     {
         Randomizer.MessageQueueTime = 0;
         RandomizerTrackedDataManager.ListRelics();
         return;
     }
     if (RandomizerRebinding.ListMapAltars.IsPressed() && Characters.Sein)
     {
         Randomizer.MessageQueueTime = 0;
         RandomizerTrackedDataManager.ListMapstones();
         return;
     }
     if (RandomizerRebinding.ListTeleporters.IsPressed() && Characters.Sein)
     {
         Randomizer.MessageQueueTime = 0;
         RandomizerTrackedDataManager.ListTeleporters();
         return;
     }
     if (RandomizerRebinding.BonusSwitch.IsPressed() && Characters.Sein)
     {
         RandomizerBonusSkill.SwitchBonusSkill();
         return;
     }
     if (RandomizerRebinding.BonusToggle.IsPressed() && Characters.Sein)
     {
         RandomizerBonusSkill.ActivateBonusSkill();
         return;
     }
     if (RandomizerRebinding.BonusSwitch.IsPressed() && Characters.Sein)
     {
         RandomizerBonusSkill.SwitchBonusSkill();
         return;
     }
     if (RandomizerRebinding.ReplayMessage.IsPressed())
     {
         Randomizer.playLastMessage();
         return;
     }
     if (RandomizerRebinding.ReturnToStart.IsPressed() && Characters.Sein && Randomizer.Warping <= 0)
     {
         if (Randomizer.AltRDisabled || RandomizerBonus.AltRDisabled())
         {
             Randomizer.printInfo("Return to start is disabled!");
             return;
         }
         Randomizer.returnToStart();
         return;
     }
     if (RandomizerRebinding.ShowProgress.IsPressed() && Characters.Sein)
     {
         Randomizer.MessageQueueTime = 0;
         Randomizer.showProgress();
         return;
     }
     if (RandomizerRebinding.ColorShift.IsPressed())
     {
         string obj = "Color shift enabled";
         if (Randomizer.ColorShift)
         {
             obj = "Color shift disabled";
         }
         else
         {
             Randomizer.changeColor();
         }
         Randomizer.ColorShift = !Randomizer.ColorShift;
         Randomizer.printInfo(obj);
     }
     if (RandomizerRebinding.ToggleChaos.IsPressed() && Characters.Sein)
     {
         if (Randomizer.Chaos)
         {
             Randomizer.showChaosMessage("Chaos deactivated");
             Randomizer.Chaos = false;
             RandomizerChaosManager.ClearEffects();
             return;
         }
         Randomizer.showChaosMessage("Chaos activated");
         Randomizer.Chaos = true;
         return;
     }
     else if (RandomizerRebinding.ChaosVerbosity.IsPressed() && Randomizer.Chaos)
     {
         Randomizer.ChaosVerbose = !Randomizer.ChaosVerbose;
         if (Randomizer.ChaosVerbose)
         {
             Randomizer.showChaosMessage("Chaos messages enabled");
             return;
         }
         Randomizer.showChaosMessage("Chaos messages disabled");
         return;
     }
     else
     {
         if (RandomizerRebinding.ForceChaosEffect.IsPressed() && Randomizer.Chaos && Characters.Sein)
         {
             RandomizerChaosManager.SpawnEffect();
             return;
         }
         return;
     }
 }
Пример #22
0
    public static void initialize()
    {
        Randomizer.OHKO                 = false;
        Randomizer.ZeroXP               = false;
        Randomizer.BonusActive          = true;
        Randomizer.GiveAbility          = false;
        Randomizer.Chaos                = false;
        Randomizer.ChaosVerbose         = false;
        Randomizer.Returning            = false;
        Randomizer.Sync                 = false;
        Randomizer.ForceMaps            = false;
        Randomizer.SyncMode             = 4;
        Randomizer.StringKeyPickupTypes = new List <string> {
            "TP", "SH", "NO", "WT", "MU", "HN", "WP", "RP", "WS"
        };
        Randomizer.ShareParams = "";
        RandomizerChaosManager.initialize();
        Randomizer.DamageModifier             = 1f;
        Randomizer.Table                      = new Hashtable();
        Randomizer.GridFactor                 = 4.0;
        Randomizer.Message                    = "Good luck on your rando!";
        Randomizer.MessageProvider            = (RandomizerMessageProvider)ScriptableObject.CreateInstance(typeof(RandomizerMessageProvider));
        Randomizer.ProgressiveMapStones       = true;
        Randomizer.ForceTrees                 = false;
        Randomizer.CluesMode                  = false;
        Randomizer.Shards                     = false;
        Randomizer.WorldTour                  = false;
        Randomizer.SeedMeta                   = "";
        Randomizer.MistySim                   = new WorldEvents();
        Randomizer.MistySim.MoonGuid          = new MoonGuid(1061758509, 1206015992, 824243626, -2026069462);
        Randomizer.TeleportTable              = new Hashtable();
        Randomizer.TeleportTable["Forlorn"]   = "forlorn";
        Randomizer.TeleportTable["Grotto"]    = "moonGrotto";
        Randomizer.TeleportTable["Sorrow"]    = "valleyOfTheWind";
        Randomizer.TeleportTable["Grove"]     = "spiritTree";
        Randomizer.TeleportTable["Swamp"]     = "swamp";
        Randomizer.TeleportTable["Valley"]    = "sorrowPass";
        Randomizer.TeleportTable["Ginso"]     = "ginsoTree";
        Randomizer.TeleportTable["Horu"]      = "mountHoru";
        Randomizer.TeleportTable["Glades"]    = "sunkenGlades";
        Randomizer.TeleportTable["Blackroot"] = "mangroveFalls";
        Randomizer.Entrance                   = false;
        Randomizer.DoorTable                  = new Hashtable();
        Randomizer.ColorShift                 = false;
        Randomizer.MessageQueue               = new Queue();
        Randomizer.MessageQueueTime           = 0;
        Randomizer.QueueBash                  = false;
        Randomizer.BashWasQueued              = false;
        Randomizer.BashTap                    = false;
        Randomizer.fragsEnabled               = false;
        Randomizer.LastTick                   = 10000000L;
        Randomizer.LockedCount                = 0;
        Randomizer.ResetTrackerCount          = 0;
        Randomizer.HotCold                    = false;
        Randomizer.HotColdTypes               = new string[] { "EV", "RB17", "RB19", "RB21", "RB28", "SK" };
        Randomizer.HotColdItems               = new Dictionary <int, RandomizerHotColdItem>();
        Randomizer.HotColdMaps                = new List <int>();
        int HotColdSaveId = 2000;

        Randomizer.HoruScene = "";
        Randomizer.HoruMap   = new Hashtable();
        Randomizer.HoruMap["mountHoruStomperSystemsR"]    = 2640380;
        Randomizer.HoruMap["mountHoruProjectileCorridor"] = 1720288;
        Randomizer.HoruMap["mountHoruMovingPlatform"]     = 3040304;
        Randomizer.HoruMap["mountHoruLaserTurretsR"]      = 2160192;
        Randomizer.HoruMap["mountHoruBlockableLasers"]    = -919624;
        Randomizer.HoruMap["mountHoruBigPushBlock"]       = -199724;
        Randomizer.HoruMap["mountHoruBreakyPathTop"]      = -1639664;
        Randomizer.HoruMap["mountHoruFallingBlocks"]      = -959848;
        Randomizer.OpenMode  = true;
        Randomizer.OpenWorld = false;
        RandomizerDataMaps.LoadGladesData();
        RandomizerDataMaps.LoadGinsoData();
        RandomizerDataMaps.LoadForlornData();
        RandomizerDataMaps.LoadHoruData();
        RandomizerDataMaps.LoadValleyData();
        RandomizerColorManager.Initialize();
        RandomizerPlantManager.Initialize();
        RandomizerRebinding.ParseRebinding();
        RandomizerSettings.ParseSettings();
        Randomizer.RelicZoneLookup = new Dictionary <string, string>();
        RandomizerTrackedDataManager.Initialize();
        RandomizerStatsManager.Initialize();
        Randomizer.RelicCount        = 0;
        Randomizer.GrenadeZone       = "MIA";
        Randomizer.StompZone         = "MIA";
        Randomizer.RepeatablePickups = new HashSet <int>();
        Randomizer.StompTriggers     = false;
        Randomizer.SpawnWith         = "";
        Randomizer.IgnoreEnemyExp    = false;
        bool relicCountOverride = false;

        try {
            if (File.Exists("randomizer.dat"))
            {
                string[] allLines = File.ReadAllLines("randomizer.dat");
                string[] flagLine = allLines[0].Split(new char[] { '|' });
                string   s        = flagLine[1];
                string[] flags    = flagLine[0].Split(new char[] { ',' });
                Randomizer.SeedMeta = allLines[0];
                foreach (string rawFlag in flags)
                {
                    string flag = rawFlag.ToLower();
                    if (flag == "ohko")
                    {
                        Randomizer.OHKO = true;
                    }
                    if (flag.StartsWith("worldtour"))
                    {
                        Randomizer.WorldTour = true;
                        if (flag.Contains("="))
                        {
                            relicCountOverride    = true;
                            Randomizer.RelicCount = int.Parse(flag.Substring(10));
                        }
                    }
                    if (flag.StartsWith("sync"))
                    {
                        Randomizer.Sync   = true;
                        Randomizer.SyncId = flag.Substring(4);
                        RandomizerSyncManager.Initialize();
                    }
                    if (flag.StartsWith("frags/"))
                    {
                        Randomizer.fragsEnabled = true;
                        string[] fragParams = flag.Split(new char[]
                        {
                            '/'
                        });
                        Randomizer.maxFrags      = int.Parse(fragParams[2]);
                        Randomizer.fragKeyFinish = int.Parse(fragParams[1]);
                    }
                    if (flag.StartsWith("mode="))
                    {
                        string modeStr = flag.Substring(5).ToLower();
                        int    syncMode;
                        if (modeStr == "shared")
                        {
                            syncMode = 1;
                        }
                        else if (modeStr == "none")
                        {
                            syncMode = 4;
                        }
                        else
                        {
                            syncMode = int.Parse(modeStr);
                        }
                        Randomizer.SyncMode = syncMode;
                    }
                    if (flag.StartsWith("shared="))
                    {
                        Randomizer.ShareParams = flag.Substring(7);
                    }
                    if (flag == "noextraexp")
                    {
                        Randomizer.IgnoreEnemyExp = true;
                    }
                    if (flag == "0xp")
                    {
                        Randomizer.IgnoreEnemyExp = true;
                        Randomizer.ZeroXP         = true;
                    }
                    if (flag == "nobonus")
                    {
                        Randomizer.BonusActive = false;
                    }
                    if (flag == "nonprogressivemapstones")
                    {
                        Randomizer.ProgressiveMapStones = false;
                    }
                    if (flag == "forcetrees")
                    {
                        Randomizer.ForceTrees = true;
                    }
                    if (flag == "forcemaps")
                    {
                        Randomizer.ForceMaps = true;
                    }
                    if (flag == "clues")
                    {
                        Randomizer.CluesMode = true;
                        RandomizerClues.initialize();
                    }
                    if (flag == "shards")
                    {
                        Randomizer.Shards = true;
                    }
                    if (flag == "entrance")
                    {
                        Randomizer.Entrance = true;
                    }
                    if (flag == "closeddungeons")
                    {
                        Randomizer.OpenMode = false;
                    }
                    if (flag == "openworld")
                    {
                        Randomizer.OpenWorld = true;
                    }
                    if (flag.StartsWith("hotcold="))
                    {
                        Randomizer.HotCold      = true;
                        Randomizer.HotColdTypes = flag.Substring(8).Split(new char[] { '+' });
                        Array.Sort(Randomizer.HotColdTypes);
                    }
                    if (flag.StartsWith("sense="))
                    {
                        Randomizer.HotColdTypes = flag.Substring(6).Split(new char[] { '+' });
                        Array.Sort(Randomizer.HotColdTypes);
                    }
                    if (flag == "noaltr")
                    {
                        Randomizer.AltRDisabled = true;
                    }
                    if (flag == "stomptriggers")
                    {
                        Randomizer.StompTriggers = true;
                    }
                }
                for (int i = 1; i < allLines.Length; i++)
                {
                    string[] lineParts = allLines[i].Split(new char[] { '|' });
                    int      coords;
                    int.TryParse(lineParts[0], out coords);
                    if (coords == 2)
                    {
                        SpawnWith = lineParts[1] + lineParts[2];
                        continue;
                    }
                    int index = Array.BinarySearch <string>(Randomizer.HotColdTypes, lineParts[1]);
                    if (index < 0)
                    {
                        index = -index - 1;
                    }
                    while (index < Randomizer.HotColdTypes.Length && Randomizer.HotColdTypes[index].Substring(0, 2) == lineParts[1])
                    {
                        if (Randomizer.HotColdTypes[index] == lineParts[1] || Randomizer.HotColdTypes[index].Substring(2) == lineParts[2])
                        {
                            if (Math.Abs(coords) > 100)
                            {
                                Randomizer.HotColdItems.Add(coords, new RandomizerHotColdItem(Randomizer.HashKeyToVector(coords), HotColdSaveId));
                                HotColdSaveId++;
                            }
                            else
                            {
                                Randomizer.HotColdMaps.Add(coords);
                            }
                        }
                        index++;
                    }
                    if (Randomizer.StringKeyPickupTypes.Contains(lineParts[1]))
                    {
                        Randomizer.Table[coords] = new RandomizerAction(lineParts[1], lineParts[2]);
                        if (lineParts[1] == "WT")
                        {
                            Randomizer.RelicZoneLookup[lineParts[2]] = lineParts[3];
                            if (!relicCountOverride)
                            {
                                Randomizer.RelicCount++;
                            }
                        }
                        if (lineParts[1] == "RP")
                        {
                            Randomizer.RepeatablePickups.Add(coords);
                        }
                    }
                    else
                    {
                        int id;
                        int.TryParse(lineParts[2], out id);
                        if (lineParts[1] == "EN")
                        {
                            // door entries are coord|EN|targetX|targetY
                            int doorY;
                            int.TryParse(lineParts[3], out doorY);
                            Randomizer.DoorTable[coords] = new Vector3((float)id, (float)doorY);
                        }
                        else
                        {
                            Randomizer.Table[coords] = new RandomizerAction(lineParts[1], id);
                            if (lineParts[1] == "SK")
                            {
                                if (id == 51)
                                {
                                    GrenadeZone = lineParts[3];
                                }
                                else if (id == 4)
                                {
                                    StompZone = lineParts[3];
                                }
                            }
                            if (Randomizer.CluesMode && lineParts[1] == "EV" && id % 2 == 0)
                            {
                                RandomizerClues.AddClue(lineParts[3], id / 2);
                            }
                        }
                    }
                }
                Randomizer.HotColdMaps.Sort();
                if (Randomizer.CluesMode)
                {
                    RandomizerClues.FinishClues();
                }
            }
            else
            {
                Randomizer.printInfo("Error: randomizer.dat not found");
            }
        }
        catch (Exception e) {
            Randomizer.printInfo("Error parsing randomizer.dat:" + e.Message, 300);
        }
        RandomizerBonusSkill.Reset();
    }
 // Token: 0x0600207E RID: 8318
 public void FixedUpdate()
 {
     if (this.IsSuspended)
     {
         this.m_rigidbody.velocity = Vector3.zero;
         if (this.m_rigidbody.detectCollisions)
         {
             this.m_rigidbody.detectCollisions = false;
             return;
         }
     }
     else
     {
         if (!this.m_rigidbody.detectCollisions)
         {
             this.m_rigidbody.detectCollisions = true;
         }
         base.PreFixedUpdate();
         if (this.m_groundContactNormal.magnitude == 0f)
         {
             this.GroundNormal = Vector3.up;
         }
         else
         {
             this.GroundNormal = this.m_groundContactNormal.normalized;
         }
         this.m_groundContactNormal = Vector3.zero;
         if (base.IsOnGround && !Physics.Raycast(new Ray(base.Position + base.WorldOffsetToBottomSphereOfCapsuleCollider, base.GravityDirection), base.CapsuleCollider.radius * base.transform.lossyScale.y + 0.5f))
         {
             this.Ground.IsOn = false;
         }
         if (base.IsOnGround)
         {
             base.LocalSpeedY = 0f;
             Vector3 position = base.transform.position;
             base.transform.position += base.GroundBinormal * base.LocalSpeedX * Time.deltaTime;
             base.transform.position += this.GroundNormal * 0.02f;
             Vector3    vector = (0.04f + Mathf.Abs(base.LocalSpeedX) * Time.deltaTime) * -this.GroundNormal;
             RaycastHit raycastHit;
             if (this.m_rigidbody.SweepTest(vector.normalized, out raycastHit, vector.magnitude))
             {
                 base.transform.position += vector.normalized * (raycastHit.distance + 0.02f);
             }
             else
             {
                 base.transform.position -= this.GroundNormal * 0.02f;
             }
             if (Time.deltaTime == 0f)
             {
                 this.m_rigidbody.velocity = Vector3.zero;
             }
             else
             {
                 this.m_rigidbody.velocity = (base.transform.position - position) / Time.deltaTime;
             }
             this.m_rigidbody.position = position;
         }
         else
         {
             this.m_rigidbody.velocity = RandomizerBonusSkill.TimeScale(this.WorldSpeed);
         }
         base.PostFixedUpdate();
     }
 }
 // Token: 0x06003798 RID: 14232
 public static void CheckPickups(object sender, UploadValuesCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null)
         {
             if (e.Error is System.NullReferenceException)
             {
                 return;
             }
             Randomizer.LogError("CheckPickups got error: " + e.Error.ToString());
         }
         if (!e.Cancelled && e.Error == null)
         {
             if (!Characters.Sein)
             {
                 return;
             }
             string[] array = System.Text.Encoding.UTF8.GetString(e.Result).Split(new char[]
             {
                 ','
             });
             int bf = int.Parse(array[0]);
             foreach (SkillInfoLine skillInfoLine in SkillInfos)
             {
                 if (getBit(bf, skillInfoLine.bit) && !Characters.Sein.PlayerAbilities.HasAbility(skillInfoLine.skill))
                 {
                     RandomizerSwitch.GivePickup(new RandomizerAction("SK", skillInfoLine.id), 0, false);
                 }
             }
             int bf2 = int.Parse(array[1]);
             foreach (EventInfoLine eventInfoLine in EventInfos)
             {
                 if (getBit(bf2, eventInfoLine.bit) && !eventInfoLine.checker())
                 {
                     RandomizerSwitch.GivePickup(new RandomizerAction("EV", eventInfoLine.id), 0, false);
                 }
             }
             int bf4 = int.Parse(array[2]);
             foreach (TeleportInfoLine teleportInfoLine in TeleportInfos)
             {
                 if (getBit(bf4, teleportInfoLine.bit) && !isTeleporterActivated(teleportInfoLine.id))
                 {
                     RandomizerSwitch.GivePickup(new RandomizerAction("TP", teleportInfoLine.id), 0, false);
                 }
             }
             if (array[3] != "")
             {
                 string[] upgrades = array[3].Split(';');
                 foreach (string rawUpgrade in upgrades)
                 {
                     string[] splitpair = rawUpgrade.Split('x');
                     int      id        = int.Parse(splitpair[0]);
                     int      cnt       = int.Parse(splitpair[1]);
                     if (id >= 100)
                     {
                         if (id >= 900)
                         {
                             if (id < 910)
                             {
                                 int    tree     = id - 899;
                                 string treeName = RandomizerTrackedDataManager.Trees[tree];
                                 if (RandomizerTrackedDataManager.SetTree(tree))
                                 {
                                     Randomizer.showHint(treeName + " tree (activated by teammate)");
                                 }
                             }
                             else if (id < 922)
                             {
                                 string relicZone = RandomizerTrackedDataManager.Zones[id - 911];
                                 if (RandomizerTrackedDataManager.SetRelic(relicZone))
                                 {
                                     Randomizer.showHint("#" + relicZone + " relic# (found by teammate)", 300);
                                 }
                             }
                         }
                         else if (!RandomizerBonusSkill.UnlockedBonusSkills.ContainsValue(id) && cnt > 0)
                         {
                             RandomizerBonus.UpgradeID(id);
                         }
                     }
                     else if (RandomizerBonus.UpgradeCount(id) < cnt)
                     {
                         RandomizerBonus.UpgradeID(id);
                     }
                     else if (!PickupQueue.Where((Pickup p) => p.type == "RB" && p.id == splitpair[0]).Any() && RandomizerBonus.UpgradeCount(id) > cnt)
                     {
                         RandomizerBonus.UpgradeID(-id);
                     }
                 }
             }
             if (array.Length > 5)
             {
                 foreach (string text in array[5].Split(new char[] { '|' }))
                 {
                     if (CurrentSignals.Contains(text))
                     {
                         continue;
                     }
                     if (text == "stop")
                     {
                         RandomizerChaosManager.ClearEffects();
                     }
                     else if (text.StartsWith("msg:"))
                     {
                         Randomizer.printInfo(text.Substring(4), 360);
                     }
                     else if (text.StartsWith("win:"))
                     {
                         if (!RandomizerBonusSkill.UnlockCreditWarp(text.Substring(4)))
                         {
                             Randomizer.Print(text.Substring(4), 10, false, true, false, false);
                             RandomizerStatsManager.WriteStatsFile();
                         }
                     }
                     else if (text.StartsWith("pickup:"))
                     {
                         string[]         parts = text.Substring(7).Split(new char[] { '|' });
                         RandomizerAction action;
                         if (Randomizer.StringKeyPickupTypes.Contains(parts[0]))
                         {
                             action = new RandomizerAction(parts[0], parts[1]);
                         }
                         else
                         {
                             int pickup_id;
                             int.TryParse(parts[1], out pickup_id);
                             action = new RandomizerAction(parts[0], pickup_id);
                         }
                         RandomizerSwitch.GivePickup(action, 0, false);
                     }
                     else if (text == "spawnChaos")
                     {
                         Randomizer.ChaosVerbose = true;
                         RandomizerChaosManager.SpawnEffect();
                         ChaosTimeoutCounter = 3600;
                     }
                     var client = new WebClient();
                     client.DownloadStringAsync(new Uri(RootUrl + "/callback/" + text));
                     CurrentSignals.Add(text);
                 }
             }
             else
             {
                 CurrentSignals.Clear();
             }
             return;
         }
         if (e.Error.GetType().Name == "WebException" && ((HttpWebResponse)((WebException)e.Error).Response).StatusCode == HttpStatusCode.PreconditionFailed)
         {
             if (Randomizer.SyncMode == 1)
             {
                 Randomizer.printInfo("Co-op server error, try reloading the seed (Alt+L)");
             }
             else
             {
                 Randomizer.LogError("Co-op server error, try reloading the seed (Alt+L)");
             }
             return;
         }
     }
     catch (Exception e2)
     {
         Randomizer.LogError("CheckPickups threw error: " + e2.Message);
     }
 }
 // Token: 0x060037FA RID: 14330
 static RandomizerBonusSkill()
 {
     RandomizerBonusSkill.Reset();
 }
 // Token: 0x060031E0 RID: 12768 RVA: 0x000D0678 File Offset: 0x000CE878
 public void UpdateSpeedAndDirection()
 {
     this.Direction = this.Rigidbody.velocity.normalized;
     this.Speed     = RandomizerBonusSkill.TimeScale(this.Rigidbody.velocity.magnitude);
 }
 // Token: 0x060037FE RID: 14334
 public static void OnDeath()
 {
     RandomizerBonusSkill.DisableAllPersistant();
 }