Health/Assets/Scripts/UI/RobotController.cs

47 lines
1.1 KiB
C#
Raw Normal View History

2023-11-07 13:55:35 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Yoga;
public class RobotController : MonoBehaviour
{
public void ActionEnd(AvatarAction action)
2023-11-07 13:55:35 +00:00
{
EventManager.Instance.Dispatch(YogaEventType.Action_End, action, true);
2023-11-07 13:55:35 +00:00
}
public void ActionHold(AvatarAction action)
{
EventManager.Instance.Dispatch(YogaEventType.Action_End, action, false);
}
public void FinishCurrentLevel()
2023-11-07 13:55:35 +00:00
{
EventManager.Instance.Dispatch(YogaEventType.UI_LevelFinished);
2023-11-10 08:12:37 +00:00
}
public void ActionStart(AvatarAction action)
{
EventManager.Instance.Dispatch(YogaEventType.Action_Start, action, true);
}
public void ActionBackStart(AvatarAction action)
2023-11-10 08:12:37 +00:00
{
EventManager.Instance.Dispatch(YogaEventType.Action_Start, action, false);
2023-11-07 13:55:35 +00:00
}
}
public enum AvatarAction
{
HeadTurnLeft,
HeadTurnRight,
2023-11-10 07:17:23 +00:00
HeadTurnUp,
HeadTurnDown,
2023-11-07 13:55:35 +00:00
LeftLateralHead,
RightLateralHead,
FinishCurrentAction,
2023-11-10 07:17:23 +00:00
HeadShake,
Nod,
HandsUp,
HandsDown,
Stop,
Hold,
2023-11-07 13:55:35 +00:00
None
2023-11-10 07:17:23 +00:00
}