You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
2 weeks ago
|
using System;
|
||
|
using Unity.BossRoom.Gameplay.GameplayObjects.Character;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Unity.BossRoom.Gameplay.Actions
|
||
|
{
|
||
|
[CreateAssetMenu(menuName = "BossRoom/Actions/Emote Action")]
|
||
|
public class EmoteAction : Action
|
||
|
{
|
||
|
public override bool OnStart(ServerCharacter serverCharacter)
|
||
|
{
|
||
|
serverCharacter.serverAnimationHandler.NetworkAnimator.SetTrigger(Config.Anim);
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
public override bool OnUpdate(ServerCharacter clientCharacter)
|
||
|
{
|
||
|
// since we return false at Start(), this method should not execute
|
||
|
throw new InvalidOperationException("No logic defined.");
|
||
|
}
|
||
|
|
||
|
public override void Cancel(ServerCharacter serverCharacter)
|
||
|
{
|
||
|
if (!string.IsNullOrEmpty(Config.Anim2))
|
||
|
{
|
||
|
serverCharacter.serverAnimationHandler.NetworkAnimator.SetTrigger(Config.Anim2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public override bool OnUpdateClient(ClientCharacter clientCharacter)
|
||
|
{
|
||
|
return ActionConclusion.Continue;
|
||
|
}
|
||
|
}
|
||
|
}
|