47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Yoga;
|
|
|
|
public class RobotController : MonoBehaviour
|
|
{
|
|
public void ActionEnd(AvatarAction action)
|
|
{
|
|
EventManager.Instance.Dispatch(YogaEventType.Action_End, action, true);
|
|
}
|
|
public void ActionHold(AvatarAction action)
|
|
{
|
|
EventManager.Instance.Dispatch(YogaEventType.Action_End, action, false);
|
|
}
|
|
public void FinishCurrentLevel()
|
|
{
|
|
EventManager.Instance.Dispatch(YogaEventType.UI_LevelFinished);
|
|
}
|
|
|
|
public void ActionStart(AvatarAction action)
|
|
{
|
|
EventManager.Instance.Dispatch(YogaEventType.Action_Start, action, true);
|
|
}
|
|
public void ActionBackStart(AvatarAction action)
|
|
{
|
|
EventManager.Instance.Dispatch(YogaEventType.Action_Start, action, false);
|
|
}
|
|
}
|
|
|
|
public enum AvatarAction
|
|
{
|
|
HeadTurnLeft,
|
|
HeadTurnRight,
|
|
HeadTurnUp,
|
|
HeadTurnDown,
|
|
LeftLateralHead,
|
|
RightLateralHead,
|
|
FinishCurrentAction,
|
|
HeadShake,
|
|
Nod,
|
|
HandsUp,
|
|
HandsDown,
|
|
Stop,
|
|
Hold,
|
|
None
|
|
} |