Added animations to the Wizard in Wizard's Waltz

This commit is contained in:
Carson Kompon
2022-03-03 23:08:55 -05:00
parent 589db0f4e2
commit 6e0d3963f3
16 changed files with 306 additions and 4 deletions

View File

@ -7,6 +7,7 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
{
public class Wizard : MonoBehaviour
{
public Animator animator;
public GameObject shadow;
private WizardsWaltz game;
@ -34,8 +35,18 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
shadow.transform.localScale = new Vector3(scale, scale, 1);
}
private void LateUpdate()
{
if (PlayerInput.Pressed(true))
{
animator.Play("Magic", 0, 0);
}
}
public void Magic(Plant plant, bool hit)
{
animator.Play("Magic", 0, 0);
if(plant == null)
{
// TODO: Play empty A press sound