- 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");
- }
- }