Esempio n. 1
0
    public IEnumerator FreezePlayers(Collider2D _collider)
    {
        PhysicsController _otherPhys     = _collider.gameObject.GetComponent <PhysicsController>();
        SpellCharges      _otherCharge   = _collider.gameObject.GetComponent <SpellCharges>();
        Animator          _otherAnimator = _collider.gameObject.GetComponent <Animator>();

        _otherPhys.PausePhysics(true);
        _otherCharge.SetFreezeTimer(true);
        _otherAnimator.speed = 0.0f;

        SFXManager.PlayOneShot(m_reference.GetComponent <AudioSource>(), SFXManager.GetHitEffect());

        yield return(new WaitForSeconds(0.2f));

        _collider.gameObject.GetComponent <PlayerFSM>().SetCurrentState(PlayerFSM.States.HIT, true);

        _otherPhys.ClearValues();
        _otherPhys.PausePhysics(false);
        _otherCharge.SetFreezeTimer(false);
        _otherAnimator.speed = 1.0f;



        ApplyForce(_collider);

        DestroyObject();
    }
Esempio n. 2
0
    public void StartDash(Vector2 _direction)
    {
        m_direction = _direction;
        GetDiamondGateDirection(ref m_direction, ref m_orientSelf);

        if (m_direction.y <= 0)
        {
            if (m_dashComplete)
            {
                m_movementController.m_capAcceleration = false;
                m_forceCompletion = false;
                m_dashComplete    = false;
                m_dashTimer       = dashDuration;
                m_physicsController.ClearValues();
            }
        }
    }
Esempio n. 3
0
 public override void BeforeAttack()
 {
     //throw new System.NotImplementedException();
     m_physicsController.ClearValues();
 }