AkiraPixelWind/Assets/Scripts/Main/Definition/DataStruct/Role/RoleData.cs
2023-01-03 23:53:30 +08:00

198 lines
4.1 KiB
C#

using System;
using UnityEngine;
namespace Game
{
//角色经验
public class S_ROLE_EXP
{
public int level;//等级
public int exp;//经验
public void Init()
{
level = 0;
exp = 0;
}
}
//角色经济
public class S_ROLE_ECON
{
public long gold;//金币
public long vcoin;//元宝
public long silverCoin;//银币
public void Init()
{
gold = 0;
vcoin = 0;
silverCoin = 0;
}
}
//角色生命信息
public class S_ROLE_LIFE
{
public int curHP;
public int curMP;
public int maxHP;
public int maxMP;
public void Init()
{
curHP = 0;
curMP = 0;
maxHP = 0;
maxMP = 0;
}
}
//角色状态信息
public class S_ROLE_STATUS
{
public int state;//状态
public int face;//朝向
public int mapid;//地图ID
public Vector3 rot;//旋转
public Vector3 pos;
public Vector3 targetpos;//目标位置
public void Init()
{
state = 0;
face = 0;
mapid = 0;
pos.x = 0;
pos.y = 0;
pos.z = 0;
targetpos.x = 0;
targetpos.y = 0;
targetpos.z = 0;
rot.x = 0; rot.y = 0; rot.z = 0;
}
}
//角色先天属性 出身即有的
public class S_ROLE_INNATE
{
public Int64 roleid;//角色id
public int job;//职业
public int sex;//性别
public string nick;//昵称
public void Init()
{
roleid = 0;
job = 0;
sex = 0;
nick = "";
}
}
//1级战斗属性
public class S_ROLE_BATTLEATTR_1ST
{
public uint Strength;//力量
public uint Agility;//敏捷
public uint Intellect;//智力
public uint Constitution;//体质
public void Init()
{
Strength = 0;
Agility = 0;
Intellect = 0;
Constitution = 0;
}
}
//战斗属性
public class S_ROLE_BATTLEATTR
{
public int pAtkMin; //最小物理攻击
public int pAtkMax; //最大物理攻击
public int PDef; //物理防御
public int Hit; //命中值
public int Dodge; //闪避值
public int CritRate; //暴击率(百分比)
public int Speed; //移动速度
public int StiffnessRes; //僵直耐性
public void Init()
{
pAtkMin = 0;
pAtkMax = 0;
PDef = 0;
Hit = 0;
Dodge = 0;
CritRate = 0;
Speed = 0;
StiffnessRes = 0;
}
}
//攻击锁定
public class S_LOCK_DATA
{
public byte lock_state;
public byte lock_type;
public Vector3 lock_targetpos;
public int lock_distance;
public void Init()
{
lock_state = 0;
lock_type = 0;
lock_targetpos.x = 0;
lock_targetpos.y = 0;
lock_targetpos.z = 0;
lock_distance = 0;
}
}
//移动控制数据
public class S_ROLE_MOVE
{
public int state;//状态
public int oldstate;//历史状态
public float speed;//速度
public float face;//方向 = y轴
public Vector3 pos;//坐标
public float syncTime;//同步时间
public void Init()
{
state = 0;
oldstate = 0;
speed = 0;
face = 0;
syncTime = 0;
pos.x = 0; pos.y = 0; pos.z = 0;
}
}
//主控玩家角色数据
public class S_ROLE_SELF : S_ROLE_BASE
{
public S_ROLE_ECON econ;//经济
public S_ROLE_MOVE move;
public S_ROLE_SELF()
{
move = new S_ROLE_MOVE();
econ = new S_ROLE_ECON();
}
override public void Init()
{
base.Init();
exp.Init();
move.Init();
econ.Init();
}
}
}