init
This commit is contained in:
commit
fca6784fe7
571 changed files with 84105 additions and 0 deletions
56
Assets/Scripts/Combat/PlayerAttack.cs
Normal file
56
Assets/Scripts/Combat/PlayerAttack.cs
Normal file
|
@ -0,0 +1,56 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerAttack : MonoBehaviour{
|
||||
|
||||
[SerializeField] Animator attack = default;
|
||||
[SerializeField] Animator[] enemyAnim = default;
|
||||
[SerializeField] Animator flash = default;
|
||||
|
||||
[SerializeField] EnemyController[] enemy = default;
|
||||
[SerializeField] HandManager hand = default;
|
||||
|
||||
[Space]
|
||||
public bool open1;
|
||||
public bool open2;
|
||||
public bool open3;
|
||||
public bool open4;
|
||||
public bool open5;
|
||||
|
||||
public void Attack(){
|
||||
hand.open1 = false;
|
||||
hand.open2 = false;
|
||||
hand.open3 = false;
|
||||
hand.open4 = false;
|
||||
hand.open5 = false;
|
||||
|
||||
attack.SetTrigger("Attack");
|
||||
foreach(Animator anim in enemyAnim){
|
||||
anim.SetTrigger("Attack");
|
||||
}
|
||||
foreach(EnemyController e in enemy){
|
||||
e.Shake();
|
||||
}
|
||||
}
|
||||
|
||||
public void CountdownSound(){
|
||||
AudioManager.instance.PlayOneShot("cuentaAtras");
|
||||
}
|
||||
|
||||
public void ShowArms(){
|
||||
hand.open1 = open1;
|
||||
hand.open2 = open2;
|
||||
hand.open3 = open3;
|
||||
hand.open4 = open4;
|
||||
hand.open5 = open5;
|
||||
|
||||
GetComponent<HandManager>().enabled = true;
|
||||
flash.SetTrigger("Flash");
|
||||
AudioManager.instance.Play("lanzar");
|
||||
|
||||
foreach (EnemyController e in enemy){
|
||||
e.ShowArm();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue