// Token: 0x060000D6 RID: 214
 public void UpdatePrechargingState()
 {
     if (this.Logic.CurrentStateTime > 0.3f)
     {
         this.m_chargeFlameChargeEffect = (GameObject)InstantiateUtility.Instantiate(this.ChargeFlameSettings.ChargeFlameChargeEffectPrefab);
         this.m_chargeFlameChargeEffect.transform.position = Characters.Ori.transform.position;
         this.m_chargeFlameChargeEffect.transform.parent   = Characters.Ori.transform;
         this.m_chargeFlameChargeEffect.GetComponentsInChildren <LegacyAnimator>(SeinChargeFlameAbility.s_legacyAnimatorList);
         for (int i = 0; i < SeinChargeFlameAbility.s_legacyAnimatorList.Count; i++)
         {
             SeinChargeFlameAbility.s_legacyAnimatorList[i].Speed = 1f / this.ChargeDuration;
         }
         SeinChargeFlameAbility.s_legacyAnimatorList.Clear();
         if (this.CurrentChargingSound())
         {
             this.CurrentChargingSound().Play();
         }
         this.Logic.ChangeState(this.State.Charging);
         return;
     }
     if (this.ChargeFlameButton.Released)
     {
         this.Logic.ChangeState(this.State.Start);
         return;
     }
     if (this.m_sein.Abilities.SpiritFlame.LockShootingSpiritFlame)
     {
         this.Logic.ChangeState(this.State.Start);
         return;
     }
     if (this.m_sein.Controller.InputLocked)
     {
         this.Logic.ChangeState(this.State.Start);
     }
 }
Exemplo n.º 2
0
    // Token: 0x06000FA7 RID: 4007 RVA: 0x0005F2AC File Offset: 0x0005D4AC
    public void BeginBash()
    {
        this.m_timeRemainingOfBashButtonPress = 0f;
        this.IsBashing = true;
        this.Target.OnEnterBash();
        Transform transform = this.TargetAsComponent.transform;

        Sound.Play((!this.Sein.PlayerAbilities.BashBuff.HasAbility) ? this.BashStartSound.GetSound(null) : this.UpgradedBashStartSound.GetSound(null), this.m_seinTransform.position, null);
        if (GameController.Instance)
        {
            GameController.Instance.SuspendGameplay();
        }
        if (UI.Cameras.Current != null)
        {
            SuspensionManager.GetSuspendables(this.m_bashSuspendables, UI.Cameras.Current.GameObject);
            SuspensionManager.Resume(this.m_bashSuspendables);
            this.m_bashSuspendables.Clear();
        }
        this.PlatformMovement.LocalSpeed = Vector2.zero;
        GameObject gameObject = (GameObject)InstantiateUtility.Instantiate(this.BashAttackGamePrefab);

        this.m_bashAttackGame = gameObject.GetComponent <BashAttackGame>();
        this.m_bashAttackGame.SendDirection(transform.position - this.PlatformMovement.Position);
        this.m_bashAttackGame.BashGameComplete  += this.BashGameComplete;
        this.m_bashAttackGame.transform.position = transform.position;
        Vector3 b = Vector3.ClampMagnitude(transform.position - this.PlatformMovement.Position, 2f);

        this.m_playerTargetPosition = transform.position - b;
        this.m_directionToTarget    = b.normalized;
        SeinBashAttack.OnBashBegin();
        this.Sein.PlatformBehaviour.Visuals.Animation.PlayLoop(this.BashChargeAnimation, 10, new Func <bool>(this.ShouldBashChargeAnimationKeepPlaying), false);
    }
Exemplo n.º 3
0
    // Token: 0x060000B3 RID: 179
    public void DealDamage()
    {
        Vector3 position = base.transform.position;

        foreach (IAttackable attackable in Targets.Attackables.ToArray())
        {
            if (!InstantiateUtility.IsDestroyed(attackable as Component) && !this.m_damageAttackables.Contains(attackable) && attackable.CanBeGrenaded())
            {
                Vector3 position2 = attackable.Position;
                Vector3 vector    = position2 - position;
                if (vector.magnitude <= this.BurstRadius + (float)RandomizerBonus.SpiritFlameLevel())
                {
                    this.m_damageAttackables.Add(attackable);
                    GameObject gameObject = ((Component)attackable).gameObject;
                    new Damage(this.DamageAmount + (float)(3 * RandomizerBonus.SpiritFlameLevel()), vector.normalized * 3f, position, DamageType.Grenade, base.gameObject).DealToComponents(gameObject);
                    if (!attackable.IsDead())
                    {
                        GameObject gameObject2 = (GameObject)InstantiateUtility.Instantiate(this.BurstImpactEffectPrefab, position2, Quaternion.identity);
                        gameObject2.transform.eulerAngles = new Vector3(0f, 0f, MoonMath.Angle.AngleFromVector(vector.normalized));
                        gameObject2.GetComponent <FollowPositionRotation>().SetTarget(gameObject.transform);
                    }
                }
            }
        }
        this.m_waitDelay = 0.1f;
    }
Exemplo n.º 4
0
 // Token: 0x06002CED RID: 11501 RVA: 0x000C4050 File Offset: 0x000C2250
 public void OnFadedToBlack()
 {
     foreach (SavePedestal savePedestal in SavePedestal.All)
     {
         savePedestal.OnFinishedTeleporting();
     }
     if (!InstantiateUtility.IsDestroyed(this.m_teleportingStartSound))
     {
         this.m_teleportingStartSound.FadeOut(0.5f, true);
         this.m_teleportingStartSound = null;
     }
     if (this.BloomFade)
     {
         UberGCManager.CollectResourcesIfNeeded();
     }
     Characters.Sein.Position = this.m_teleporterTargetPosition + Vector3.up * 1.6f;
     CameraPivotZone.InstantUpdate();
     Scenes.Manager.UpdatePosition();
     Scenes.Manager.UnloadScenesAtPosition(true);
     Scenes.Manager.EnableDisabledScenesAtPosition(false);
     Characters.Sein.Controller.StopAnimation();
     UI.Cameras.Current.MoveCameraToTargetInstantly(true);
     if (Characters.Ori)
     {
         Characters.Ori.BackToPlayerController();
     }
     GameController.Instance.CreateCheckpoint();
     GameController.Instance.PerformSaveGameSequence();
     RandomizerStatsManager.UsedTeleporter();
     LateStartHook.AddLateStartMethod(new Action(this.OnFinishedTeleporting));
 }
Exemplo n.º 5
0
 // 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();
 }
Exemplo n.º 6
0
 // Token: 0x0600137F RID: 4991 RVA: 0x0006E448 File Offset: 0x0006C648
 public void HandleNagging()
 {
     if (this.m_readyForReadySequence && this.PlayerCouldSoulFlame && this.IsSafeToCastSoulFlame == SeinSoulFlame.SoulFlamePlacementSafety.Safe && this.CanAffordSoulFlame)
     {
         this.m_readyForReadySequence = false;
         InstantiateUtility.Instantiate(this.SoulFlameReadyText, Characters.Ori.transform.position, Quaternion.identity);
         UI.SeinUI.OnSoulFlameReady();
         GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.SoulFlameReadyEffect);
         gameObject.transform.parent        = Characters.Ori.transform;
         gameObject.transform.localPosition = Vector3.zero;
         Sound.Play(this.SoulFlameReadySoundProvider.GetSound(null), Characters.Sein.Position, null);
         this.m_nagTimer = this.NagDuration;
     }
     if (this.m_nagTimer > 0f)
     {
         this.m_nagTimer -= Time.deltaTime;
         if (this.m_nagTimer <= 0f)
         {
             if (this.PlayerCouldSoulFlame && this.CanAffordSoulFlame && this.IsSafeToCastSoulFlame == SeinSoulFlame.SoulFlamePlacementSafety.Safe)
             {
                 this.m_nagTimer = 0f;
                 InstantiateUtility.Instantiate(this.SoulFlameReadyText, Characters.Ori.transform.position, Quaternion.identity);
                 UI.SeinUI.OnSoulFlameReady();
                 Sound.Play(this.SoulFlameReadySoundProvider.GetSound(null), Characters.Sein.Position, null);
                 this.m_nagTimer = this.NagDuration;
                 return;
             }
             this.m_nagTimer = 2f;
         }
     }
 }
    // Token: 0x060031ED RID: 12781
    public Projectile SpawnProjectile()
    {
        this.TimeSinceLastShot = 0f;
        GameObject gameObject = InstantiateUtility.Instantiate(this.Projectile) as GameObject;

        gameObject.transform.SetParentMaintainingLocalTransform(base.transform.root);
        this.m_lastProjectile         = gameObject;
        gameObject.transform.position = base.transform.position;
        Projectile component = gameObject.GetComponent <Projectile>();

        component.Speed     = this.Speed;
        component.Direction = this.Direction;
        if (this.Direction == Vector3.zero)
        {
            component.Direction = base.transform.up;
        }
        component.Gravity = this.Gravity;
        if (this.Owner)
        {
            component.Owner = this.Owner;
        }
        if (this.SpawnSound)
        {
            Sound.Play(this.SpawnSound, base.transform.position, null, this.SpawnSoundVolume, null);
        }
        return(component);
    }
Exemplo n.º 8
0
 // Token: 0x06000168 RID: 360 RVA: 0x00030510 File Offset: 0x0002E710
 public void GetOutOfWater()
 {
     Sound.Play(this.OutOfWaterSoundProvider.GetSound(null), this.m_sein.transform.position, null);
     InstantiateUtility.Instantiate(this.WaterSplashPrefab, this.m_sein.transform.position, Quaternion.identity);
     this.ChangeState(SeinSwimming.State.OutOfWater);
     this.RemainingBreath = this.Breath;
 }
Exemplo n.º 9
0
 // Token: 0x06001792 RID: 6034 RVA: 0x00014D7D File Offset: 0x00012F7D
 public void SpawnPrefab(GameObject prefab)
 {
     if (prefab != null)
     {
         InstantiateUtility.Instantiate(prefab, this.Position, base.transform.rotation);
     }
 }
Exemplo n.º 10
0
 // Token: 0x06000FB0 RID: 4016 RVA: 0x0000DB91 File Offset: 0x0000BD91
 public void BashFailed()
 {
     if (this.NoBashTargetEffect)
     {
         ((GameObject)InstantiateUtility.Instantiate(this.NoBashTargetEffect, base.transform.position, Quaternion.identity)).transform.parent = this.m_seinTransform;
     }
 }
Exemplo n.º 11
0
    // Token: 0x0600009C RID: 156 RVA: 0x0002D3F8 File Offset: 0x0002B5F8
    public void ChangeState(BashAttackGame.State state)
    {
        this.m_currentState     = state;
        this.m_stateCurrentTime = 0f;
        switch (state)
        {
        case BashAttackGame.State.Appearing:
            this.BashAttackCritical.enabled = false;
            return;

        case BashAttackGame.State.Playing:
            this.BashAttackCritical.enabled = true;
            return;

        case BashAttackGame.State.Disappearing:
            this.BashAttackCritical.enabled = false;
            if (this.m_bashLoopingAudioSource)
            {
                InstantiateUtility.Destroy(this.m_bashLoopingAudioSource.gameObject);
            }
            return;

        default:
            return;
        }
    }
Exemplo n.º 12
0
 // Token: 0x06001770 RID: 6000 RVA: 0x00014B4E File Offset: 0x00012D4E
 public void OnSceneUnloaded(SceneRoot sceneRoot)
 {
     if (!Scenes.Manager.IsInsideActiveSceneBoundary(base.transform.position))
     {
         InstantiateUtility.Destroy(base.gameObject);
     }
 }
 // Token: 0x060000D4 RID: 212
 public void OnEnterStartState()
 {
     if (this.m_chargeFlameChargeEffect)
     {
         InstantiateUtility.Destroy(this.m_chargeFlameChargeEffect);
     }
 }
Exemplo n.º 14
0
    // Token: 0x060000A1 RID: 161 RVA: 0x0002D78C File Offset: 0x0002B98C
    private void UpdateDisappearingState()
    {
        float time = Mathf.Clamp01(this.m_stateCurrentTime / this.DisappearTime);

        this.ArrowSprite.localScale = this.m_originalArrowScale * this.ArrowDisappearScaleCurve.Evaluate(time);
        InstantiateUtility.Destroy(base.gameObject, 1f);
    }
Exemplo n.º 15
0
 // Token: 0x06000FB4 RID: 4020 RVA: 0x0000DBD0 File Offset: 0x0000BDD0
 public void HandleBashAngle()
 {
     if (!InstantiateUtility.IsDestroyed(this.m_bashAttackGame))
     {
         this.m_bashAngle = this.m_bashAttackGame.Angle;
     }
 }
    // Token: 0x06001925 RID: 6437 RVA: 0x0007ED18 File Offset: 0x0007CF18
    public void OnLanded()
    {
        if (this.m_shouldStomp && this.Settings.HasStompExplosion)
        {
            if (this.StompEffect)
            {
                GameObject gameObject = (GameObject)InstantiateUtility.Instantiate(this.StompEffect, base.Position, Quaternion.identity);
                gameObject.GetComponentInChildren <DamageDealer>().Damage = this.Settings.ExplosionDamage;
            }
            base.PlaySound(this.Sounds.Impact);
        }
        else
        {
            if (this.LandEffect)
            {
                InstantiateUtility.Instantiate(this.LandEffect, base.Position, Quaternion.identity);
            }
            base.PlaySound(this.Sounds.Impact);
        }
        Collider groundCollider = this.PlatformMovementListOfColliders.GroundCollider;
        Damage   damage         = new Damage((float)this.Settings.GroundStompDamage, Vector3.down * 3f, base.transform.position, DamageType.Stomp, base.gameObject);

        if (groundCollider)
        {
            damage.DealToComponents(groundCollider.gameObject);
        }
        this.PlatformMovement.LocalSpeed = Vector3.zero;
    }
Exemplo n.º 17
0
    // Token: 0x06001099 RID: 4249 RVA: 0x00062D34 File Offset: 0x00060F34
    public void PerformDoubleJump()
    {
        if (this.Sein.Abilities.ChargeJump)
        {
            this.Sein.Abilities.ChargeJump.OnDoubleJump();
        }
        this.PlatformMovement.LocalSpeedY = this.JumpStrength * RandomizerBonus.Jumpscale;
        this.m_numberOfJumpsAvailable--;
        this.Sein.PlatformBehaviour.Visuals.Animation.PlayRandom(this.DoubleJumpAnimation, 10, new Func <bool>(this.ShouldDoubleJumpAnimationKeepPlaying));
        this.m_doubleJumpSound = Sound.Play(this.DoubleJumpSound.GetSound(null), this.Sein.PlatformBehaviour.PlatformMovement.Position, delegate
        {
            this.m_doubleJumpSound = null;
        });
        SeinDoubleJump.OnDoubleJumpEvent(this.JumpStrength * RandomizerBonus.Jumpscale);
        GameObject original = this.DoubleJumpAfterShock;

        if (this.m_numberOfJumpsAvailable == 0 && this.ExtraJumpsAvailable == 2)
        {
            original = this.TrippleJumpAfterShock;
        }
        Vector2 worldSpeed = this.PlatformMovement.WorldSpeed;
        float   num        = Mathf.Atan2(worldSpeed.x, worldSpeed.y) * 57.29578f;

        InstantiateUtility.Instantiate(original, this.Sein.Position, Quaternion.Euler(0f, 0f, -num));
        JumpFlipPlatform.OnSeinDoubleJumpEvent();
    }
    // Token: 0x06002CD9 RID: 11481 RVA: 0x000C3830 File Offset: 0x000C1A30
    public void Show()
    {
        AreaMapUI instance = AreaMapUI.Instance;

        if (this.Icon == WorldMapIconType.Invisible)
        {
            return;
        }
        if (!this.IsVisible(instance))
        {
            return;
        }
        if (this.m_iconGameObject)
        {
            this.m_iconGameObject.SetActive(true);
        }
        else
        {
            GameObject icon = instance.IconManager.GetIcon(this.Icon);
            this.m_iconGameObject = (GameObject)InstantiateUtility.Instantiate(icon);
            Transform transform = this.m_iconGameObject.transform;
            transform.parent        = instance.Navigation.MapPivot.transform;
            transform.localPosition = this.Position;
            transform.localRotation = Quaternion.identity;
            transform.localScale    = icon.transform.localScale;
            TransparencyAnimator.Register(transform);
        }
    }
Exemplo n.º 19
0
    // Token: 0x06001068 RID: 4200
    public void AttackNearbyEnemies()
    {
        int i = 0;

        while (i < Targets.Attackables.Count)
        {
            IAttackable attackable = Targets.Attackables[i];
            if (!InstantiateUtility.IsDestroyed(attackable as Component) && !this.m_attackablesIgnore.Contains(attackable) && attackable.CanBeChargeFlamed() && (attackable.Position - this.m_sein.PlatformBehaviour.PlatformMovement.HeadPosition).magnitude <= 3f)
            {
                this.m_attackablesIgnore.Add(attackable);
                Vector3 v = (!this.m_chargeDashAtTarget) ? (((!this.m_faceLeft) ? Vector3.right : Vector3.left) * 3f) : (this.m_chargeDashDirection * 3f);
                new Damage((float)this.Damage, v, this.m_sein.Position, DamageType.ChargeFlame, base.gameObject).DealToComponents(((Component)attackable).gameObject);
                this.m_hasHitAttackable = true;
                if (this.ExplosionEffect && Time.time - this.m_timeOfLastExplosionEffect > 0.1f)
                {
                    this.m_timeOfLastExplosionEffect = Time.time;
                    InstantiateUtility.Instantiate(this.ExplosionEffect, Vector3.Lerp(base.transform.position, attackable.Position, 0.5f), Quaternion.identity);
                    return;
                }
                break;
            }
            else
            {
                i++;
            }
        }
    }
Exemplo n.º 20
0
 // Token: 0x0600341E RID: 13342 RVA: 0x000D68DC File Offset: 0x000D4ADC
 public void RemoveGameplayObjects()
 {
     CharacterFactory.Instance.DestroyCharacter();
     if (Characters.Sein)
     {
         InstantiateUtility.Destroy(Characters.Sein.gameObject);
     }
     if (Characters.Naru)
     {
         InstantiateUtility.Destroy(Characters.Naru.gameObject);
     }
     if (Characters.BabySein)
     {
         InstantiateUtility.Destroy(Characters.BabySein.gameObject);
     }
     if (Characters.Ori)
     {
         InstantiateUtility.Destroy(Characters.Ori.gameObject);
     }
     if (UI.SeinUI)
     {
         InstantiateUtility.Destroy(UI.SeinUI.gameObject);
     }
     Core.SoundComposition.Manager.StopMusic();
     UI.Cameras.Current.Target = null;
     if (UI.MainMenuVisible)
     {
         UI.Menu.HideMenuScreen(false);
     }
     UI.Menu.RemoveGameplayObjects();
     WorldMapUI.CancelLoading();
 }
Exemplo n.º 21
0
    // Token: 0x060000B3 RID: 179
    public void DealDamage()
    {
        Vector3 position = base.transform.position;

        IAttackable[] array = Targets.Attackables.ToArray();
        for (int i = 0; i < array.Length; i++)
        {
            IAttackable attackable = array[i];
            if (!InstantiateUtility.IsDestroyed(attackable as Component) && !this.m_damageAttackables.Contains(attackable) && attackable.CanBeGrenaded())
            {
                Vector3 position2 = attackable.Position;
                Vector3 vector    = position2 - position;
                if (vector.magnitude <= (RandomizerBonus.ExplosionPower() ? (this.BurstRadius + 2f) : this.BurstRadius))
                {
                    this.m_damageAttackables.Add(attackable);
                    GameObject gameObject = ((Component)attackable).gameObject;
                    new Damage(RandomizerBonus.ExplosionPower() ? (this.DamageAmount * 2f) : this.DamageAmount, vector.normalized * 3f, position, DamageType.Grenade, base.gameObject).DealToComponents(gameObject);
                    if (!attackable.IsDead())
                    {
                        GameObject expr_106 = (GameObject)InstantiateUtility.Instantiate(this.BurstImpactEffectPrefab, position2, Quaternion.identity);
                        expr_106.transform.eulerAngles = new Vector3(0f, 0f, MoonMath.Angle.AngleFromVector(vector.normalized));
                        expr_106.GetComponent <FollowPositionRotation>().SetTarget(gameObject.transform);
                    }
                }
            }
        }
        this.m_waitDelay = 0.1f;
    }
 // Token: 0x06002CDB RID: 11483 RVA: 0x00024C4B File Offset: 0x00022E4B
 public void SetIcon(WorldMapIconType icon)
 {
     if (this.m_iconGameObject)
     {
         InstantiateUtility.Destroy(this.m_iconGameObject);
     }
     this.Icon = icon;
 }
Exemplo n.º 23
0
 // Token: 0x0600138B RID: 5003 RVA: 0x000118B4 File Offset: 0x0000FAB4
 public void DestroySoulFlame()
 {
     if (this.m_soulFlame)
     {
         InstantiateUtility.Destroy(this.m_soulFlame.gameObject);
         this.m_soulFlame = null;
         this.m_checkpointMarkerGameObject = null;
     }
 }
 // Token: 0x0600116F RID: 4463
 public void OnRespawn()
 {
     if (Randomizer.Sync)
     {
         RandomizerSyncManager.onDeath();
     }
     InstantiateUtility.Instantiate(this.RespawnEffect, this.m_sein.Transform.position, Quaternion.identity);
     this.m_sein.Mortality.DamageReciever.MakeInvincible(1f);
 }
 // Token: 0x0600051A RID: 1306
 public void OnMenuItemPressed()
 {
     if (this.CurrentSkillItem == null)
     {
         return;
     }
     if (this.CurrentSkillItem.HasSkillItem)
     {
         if (this.OnAlreadyEarnedAbility)
         {
             this.RequirementsLineAShake.Restart();
             this.OnAlreadyEarnedAbility.Perform(null);
         }
         return;
     }
     if (this.CurrentSkillItem.CanEarnSkill)
     {
         this.CurrentSkillItem.HasSkillItem = true;
         Characters.Sein.PlayerAbilities.SetAbility(this.CurrentSkillItem.Ability, true);
         Characters.Sein.PlayerAbilities.GainAbilityAction = this.CurrentSkillItem.GainSkillSequence;
         InstantiateUtility.Instantiate(this.GainSkillEffect, this.CurrentSkillItem.transform.position, Quaternion.identity);
         RandomizerBonus.SpentAP(this.CurrentSkillItem.ActualRequiredSkillPoints);
         BingoController.OnGainAbility(this.CurrentSkillItem.Ability);
         Characters.Sein.Level.SkillPoints -= this.CurrentSkillItem.ActualRequiredSkillPoints;
         if (this.OnGainAbility)
         {
             this.OnGainAbility.Perform(null);
         }
         SeinLevel.HasSpentSkillPoint = true;
         AchievementsController.AwardAchievement(this.SpentFirstSkillPointAchievement);
         GameController.Instance.CreateCheckpoint();
         RandomizerStatsManager.OnSave(false);
         GameController.Instance.SaveGameController.PerformSave();
         this.UpdateRequirementsText();
         return;
     }
     if (!this.CurrentSkillItem.SoulRequirementMet)
     {
         if (this.CurrentSkillItem.RequiresAbilitiesOrItems)
         {
             this.RequirementsLineAShake.Restart();
         }
         else
         {
             this.RequirementsLineAShake.Restart();
         }
     }
     if (!this.CurrentSkillItem.AbilitiesRequirementMet)
     {
         this.RequirementsLineAShake.Restart();
     }
     if (this.OnCantEarnSkill)
     {
         this.OnCantEarnSkill.Perform(null);
     }
 }
 // Token: 0x060000D3 RID: 211
 public void OnRestoreCheckpoint()
 {
     if (this.m_chargeFlameChargeEffect)
     {
         InstantiateUtility.Destroy(this.m_chargeFlameChargeEffect);
     }
     if (this.CurrentChargingSound())
     {
         this.CurrentChargingSound().StopAndFadeOut(0.5f);
     }
     this.Logic.ChangeState(this.State.Start);
 }
Exemplo n.º 27
0
 // Token: 0x06001374 RID: 4980 RVA: 0x0006E190 File Offset: 0x0006C390
 public override void OnDestroy()
 {
     base.OnDestroy();
     Game.Checkpoint.Events.OnPostRestore.Remove(new Action(this.OnRestoreCheckpoint));
     Game.Events.Scheduler.OnGameReset.Remove(new Action(this.OnGameReset));
     if (this.m_checkpointMarkerGameObject)
     {
         InstantiateUtility.Destroy(this.m_checkpointMarkerGameObject);
         this.m_soulFlame = null;
         this.m_checkpointMarkerGameObject = null;
     }
 }
Exemplo n.º 28
0
 // Token: 0x06000FBB RID: 4027 RVA: 0x0005FDD0 File Offset: 0x0005DFD0
 public override void Serialize(Archive ar)
 {
     ar.Serialize(ref this.m_timeRemainingOfBashButtonPress);
     ar.Serialize(ref this.m_frictionTimeRemaining);
     ar.Serialize(ref this.m_timeRemainingTillNextBash);
     ar.Serialize(ref this.m_spriteMirrorLock);
     base.Serialize(ar);
     if (ar.Reading && !InstantiateUtility.IsDestroyed(this.m_bashAttackGame))
     {
         InstantiateUtility.Destroy(this.m_bashAttackGame.gameObject);
     }
 }
Exemplo n.º 29
0
 // Token: 0x06001228 RID: 4648 RVA: 0x000692D0 File Offset: 0x000674D0
 public void UpdateStompDownState()
 {
     if (Core.Input.Jump.OnPressed)
     {
         this.EndStomp();
         return;
     }
     if (this.Logic.CurrentStateTime > this.StompDownDuration && !Core.Input.Down.Pressed)
     {
         this.EndStomp();
         return;
     }
     this.PlatformMovement.LocalSpeed = new Vector2(0f, -(this.StompSpeed + this.StompSpeed * 0.2f * RandomizerBonus.Velocity()));
     this.Sein.Mortality.DamageReciever.MakeInvincibleToEnemies(0.2f);
     if (this.Sein.Controller.IsSwimming)
     {
         this.EndStomp();
     }
     for (int i = 0; i < Targets.Attackables.Count; i++)
     {
         IAttackable attackable = Targets.Attackables[i];
         if (!attackable.IsDead())
         {
             if (!InstantiateUtility.IsDestroyed(attackable as Component))
             {
                 if (attackable.IsStompBouncable())
                 {
                     Vector3 a = Characters.Sein.Position + Vector3.down;
                     if (Vector3.Distance(a, attackable.Position) < 1.5f && this.Logic.CurrentState == this.State.StompDown)
                     {
                         GameObject gameObject = ((Component)attackable).gameObject;
                         Damage     damage     = new Damage(this.StompDamage, Vector3.down * 3f, Characters.Sein.Position, DamageType.Stomp, base.gameObject);
                         damage.DealToComponents(gameObject);
                         if (attackable.IsDead())
                         {
                             return;
                         }
                         this.EndStomp();
                         this.PlatformMovement.LocalSpeedY = 17f;
                         this.Sein.PlatformBehaviour.UpwardsDeceleration.Deceleration = 20f;
                         this.Sein.Animation.Play(this.StompBounceAnimation, 111, null);
                         this.Sein.ResetAirLimits();
                         this.StompLandSound.Play();
                         this.DoBlastRadius(attackable);
                         this.DoStompBlastEffect();
                         return;
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 30
0
 // Token: 0x06001069 RID: 4201
 private void PerformDash(TextureAnimationWithTransitions dashAnimation, SoundProvider dashSound)
 {
     this.m_sein.Mortality.DamageReciever.ResetInviciblity();
     this.m_hasDashed = true;
     if (RandomizerBonus.DoubleAirDash() && !RandomizerBonus.DoubleAirDashUsed)
     {
         this.m_hasDashed = false;
         RandomizerBonus.DoubleAirDashUsed = true;
     }
     this.m_isOnGround    = this.m_sein.IsOnGround;
     this.m_lastDashTime  = Time.time;
     this.m_lastPressTime = 0f;
     this.SpriteRotation  = this.m_sein.PlatformBehaviour.PlatformMovement.GroundAngle;
     this.m_allowNoDecelerationForThisDash = true;
     if (this.m_chargeDashAtTarget)
     {
         this.m_faceLeft = (this.m_chargeDashDirection.x < 0f);
     }
     else if (this.m_sein.PlatformBehaviour.PlatformMovement.HasWallLeft)
     {
         this.m_faceLeft = false;
     }
     else if (this.m_sein.PlatformBehaviour.PlatformMovement.HasWallRight)
     {
         this.m_faceLeft = true;
     }
     else if (this.m_sein.Input.NormalizedHorizontal != 0)
     {
         this.m_faceLeft = (this.m_sein.Input.NormalizedHorizontal < 0);
     }
     else if (!Mathf.Approximately(this.m_sein.Speed.x, 0f))
     {
         this.m_faceLeft = (this.m_sein.Speed.x < 0f);
     }
     else
     {
         this.m_faceLeft = this.m_sein.FaceLeft;
         this.m_allowNoDecelerationForThisDash = false;
     }
     this.m_sein.FaceLeft = this.m_faceLeft;
     this.m_stopAnimation = false;
     if (dashSound)
     {
         Sound.Play(dashSound.GetSound(null), this.m_sein.Position, null);
     }
     this.m_sein.Animation.Play(dashAnimation, 154, new Func <bool>(this.KeepDashAnimationPlaying));
     if (SeinDashAttack.RainbowDashActivated)
     {
         ((GameObject)InstantiateUtility.Instantiate(this.DashFollowRainbowEffect, this.m_sein.Position, Quaternion.identity)).transform.parent = this.m_sein.Transform;
     }
     this.m_sein.PlatformBehaviour.PlatformMovement.LocalSpeedY = -this.DashDownwardSpeed;
 }