Newer
Older
Dreamsturbia-Project-IADE-Unity3D / Assets / PlayerAnimationController.cs
@Rackday Rackday on 21 Aug 683 bytes Project Added
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Animations;
public class PlayerAnimationController : MonoBehaviour
{
    PlayerController playerController;
    Animator animator;
    
    public void Start()
    {
        animator = GetComponent<Animator>();
        playerController = transform.parent.GetComponent<PlayerController>();
    }
    public void Attack()
    {
        playerController.Attack();

    }
    public void EndDash()
    {
        playerController.healthScript.immortality = false;
    }
    public void EndAnimation(string s)
    {
        animator.SetTrigger(s);
        Debug.Log("End Animation");
    }
}