AkiraPixelWind/Assets/Scripts/Main/Role/RoleBase.cs
2023-01-05 00:28:20 +08:00

46 lines
1.0 KiB
C#

using Axibug;
using Axibug.Runtime;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Game
{
public abstract class RoleBase : MonoBehaviour
{
protected E_NODE_TYPE mRoleType => mData.RoleType;
protected Int64 mRoleID => mData.innate.roleid;
/// <summary>
/// ¶¯»­¿ØÖÆÆ÷
/// </summary>
protected ICharMachineBase Anime;
protected S_ROLE_DATA_BASE mData;
/// <summary>
/// ³õʼ»¯
/// </summary>
/// <param name="data"></param>
public virtual void Init(S_ROLE_DATA_BASE data)
{
mData = data;
if (mRoleType == E_NODE_TYPE.N_MAINPLAYER)
{
Anime = new CharacterMachine();
Anime.InitMachine(transform.Find("Model"));
}
else if (mRoleType == E_NODE_TYPE.N_MONSTER)
{
}
else if (mRoleType == E_NODE_TYPE.N_NPC)
{
}
}
public abstract void Release();
}
}