1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using KairoEngine.Core;
- namespace KairoEngine.CharacterSystem
- {
- public class CharacterAnimator : MonoBehaviour
- {
- private CharacterController character;
- public void Start()
- {
- character = gameObject.GetComponentInParent<CharacterController>();
- if(character == null) Debug.LogError("Missing character controller for " + gameObject.transform.parent.name);
-
- }
- public void FootR()
- {
- if(character == null) return;
- GenericEvents.Trigger(character.unique_name + "-AnimationStepDone");
- }
- public void FootL()
- {
- if(character == null) return;
- GenericEvents.Trigger(character.unique_name + "-AnimationStepDone");
- }
- public void Hit()
- {
- if(character == null) return;
- GenericEvents.Trigger(character.unique_name + "-AnimationHit");
- }
- public void Shoot()
- {
-
- }
- public void MeleeEnd()
- {
- if(character == null) return;
- GenericEvents.Trigger(character.unique_name + "-AnimationMeleeEnd");
- }
- }
- }
|