Exemplo n.º 1
0
    //hit detection
    private void OnTriggerStay(Collider other)
    {
        if (shieldState != RiotShieldState.Swinging || !other.CompareTag("Player"))
        {
            return;
        }
        var hitPlayer = other.gameObject.GetComponent <Player>();

        if (hitPlayer.ID != player.ID)
        {
            player.RegisterNewValidHit(player, hitPlayer, DamageAmount);
            CreateBloodSpray(hitPlayer.transform.position, transform.rotation);

            //set shieldstate into Damaging here so that only 1 hit per swing is applied as damage
            shieldState = RiotShieldState.Damaging;
        }
    }
Exemplo n.º 2
0
 public void AttackHitBoxActive()
 {
     hitBoxActiveParticles.Play();
     shieldState = RiotShieldState.Swinging;
 }
Exemplo n.º 3
0
 public void AttackEnd()
 {
     shieldState = RiotShieldState.Ready;
     hitBoxActiveParticles.Stop();
 }