public void StartState()
 {
     vulnerability.SetInvulnerable();
     yeetTimeLeft                = yeetTime;
     unmergeTimeLeft             = unmergeTime;
     physics.velocity.bounciness = yeetedBounciness;
     AudioSingleton.PlaySound(AudioSingleton.Instance.clips.yeet);
 }
Exemple #2
0
 public void StartState()
 {
     physics.force.SetForce(value: pushForce, duration: paralyzeDuration, curve: hitForceCurve.Evaluate);
     AudioSingleton.PlaySound(AudioSingleton.Instance.clips.playerHit);
     if (vulnerability.IsVulnerable())
     {
         vulnerability.SetInvulnerable(invulnerableTime);
     }
 }
    public void StartState()
    {
        timeLeft = timeToRespawn;
        di.animator.Hide();
        PlayerUnitController unit = di.controller;

        physics.movement.boxCollider.enabled = false;
        unit.mainController.di.spawnables.OnDeath(unit, physics.velocity.Value);
        physics.velocity.Value = Vector2.zero;
        vulnerability.SetInvulnerable(timeToRespawn);
    }
 public void TakePoisonDamage()
 {
     hp.TakeDamage(1);
     if (hp.IsDead)
     {
         stateMachine.SetDeadState();
     }
     else
     {
         vulnerability.SetInvulnerable();
     }
 }