mirror of
https://github.com/0x7c13/Pal3.Unity.git
synced 2026-11-26 17:38:10 +08:00
50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
// ---------------------------------------------------------------------------------------------
|
|
// Copyright (c) 2021-2024, Jiaqi (0x7c13) Liu. All rights reserved.
|
|
// See LICENSE file in the project root for license information.
|
|
// ---------------------------------------------------------------------------------------------
|
|
|
|
namespace Pal3.Game.Actor
|
|
{
|
|
using Core.Contract.Constants;
|
|
using Core.Contract.Enums;
|
|
using Core.DataReader.Gdb;
|
|
using Data;
|
|
|
|
public sealed class CombatActor : ActorBase
|
|
{
|
|
public CombatActorInfo Info { get; }
|
|
|
|
public CombatActor(GameResourceProvider resourceProvider, CombatActorInfo actorInfo) :
|
|
base(resourceProvider, (int)actorInfo.Id,
|
|
actorInfo.Type == CombatActorType.MainActor ? actorInfo.Id.ToString() : actorInfo.ModelId)
|
|
{
|
|
Info = actorInfo;
|
|
}
|
|
|
|
public string GetPreAttackAction()
|
|
{
|
|
return Info.Type == CombatActorType.MainActor ?
|
|
ActorConstants.ActionToNameMap[ActorActionType.PreAttack] :
|
|
ActorConstants.ActionToNameMap[ActorActionType.NpcStand1];
|
|
}
|
|
|
|
public string GetAttackAction()
|
|
{
|
|
return Info.Type == CombatActorType.MainActor ?
|
|
ActorConstants.ActionToNameMap[ActorActionType.Attack1] :
|
|
ActorConstants.ActionToNameMap[ActorActionType.NpcAttack];
|
|
}
|
|
|
|
public string GetMovementAction()
|
|
{
|
|
return Info.Type == CombatActorType.MainActor ?
|
|
ActorConstants.ActionToNameMap[ActorActionType.AttackMove] :
|
|
ActorConstants.ActionToNameMap[ActorActionType.NpcRun];
|
|
}
|
|
|
|
public float GetMovementSpeed()
|
|
{
|
|
return 12f;
|
|
}
|
|
}
|
|
} |