Newer
Older
Dreamsturbia-Project-IADE-Unity3D / Assets / PlayerAnimationController.cs
@Rackday Rackday on 21 Aug 683 bytes Project Added
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.Animations;
  5. public class PlayerAnimationController : MonoBehaviour
  6. {
  7. PlayerController playerController;
  8. Animator animator;
  9. public void Start()
  10. {
  11. animator = GetComponent<Animator>();
  12. playerController = transform.parent.GetComponent<PlayerController>();
  13. }
  14. public void Attack()
  15. {
  16. playerController.Attack();
  17. }
  18. public void EndDash()
  19. {
  20. playerController.healthScript.immortality = false;
  21. }
  22. public void EndAnimation(string s)
  23. {
  24. animator.SetTrigger(s);
  25. Debug.Log("End Animation");
  26. }
  27. }