155 lines
3.9 KiB
C#
155 lines
3.9 KiB
C#
using ET;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ET
|
|
{
|
|
public class ClientUnitCharacterDestroySystem : DestroySystem<ClientUnitCharacter>
|
|
{
|
|
public override void Destroy(ClientUnitCharacter self)
|
|
{
|
|
self.Destroy();
|
|
}
|
|
}
|
|
|
|
public class ClientUnitCharacter : Entity
|
|
{
|
|
private string _nickName;
|
|
public string NickName
|
|
{
|
|
get => _nickName; set
|
|
{
|
|
if (_nickName == value)
|
|
return;
|
|
_nickName = value;
|
|
}
|
|
}
|
|
public JobType JobType { get; private set; }
|
|
public string Job
|
|
{
|
|
get
|
|
{
|
|
switch (JobType)
|
|
{
|
|
case JobType.Officer:
|
|
return "军官";
|
|
case JobType.Sportsman:
|
|
return "运动员";
|
|
case JobType.Nurse:
|
|
return "护士";
|
|
case JobType.Superman:
|
|
return "超能力";
|
|
default:
|
|
case JobType.UnKnown:
|
|
return "未知";
|
|
}
|
|
}
|
|
}
|
|
public SexType SexType { get; private set; }
|
|
public string Sex => SexType == SexType.Male ? "男" : "女";
|
|
private int _jobId;
|
|
public int JobId
|
|
{
|
|
get => _jobId;
|
|
set
|
|
{
|
|
if (_jobId == value)
|
|
return;
|
|
_jobId = value;
|
|
SexType = _jobId % 2 == 1 ? SexType.Male : SexType.Famale;
|
|
JobType = (JobType)(SexType == SexType.Male ? _jobId / 2 + 1 : _jobId / 2);
|
|
}
|
|
}
|
|
private CampType _campType;
|
|
public CampType CampType
|
|
{
|
|
get => _campType; set
|
|
{
|
|
if (_campType == value)
|
|
return;
|
|
_campType = value;
|
|
}
|
|
}
|
|
public string Camp
|
|
{
|
|
get
|
|
{
|
|
switch (CampType)
|
|
{
|
|
default:
|
|
case CampType.NoneCamp:
|
|
return "无";
|
|
case CampType.Pioneer:
|
|
return "开拓者";
|
|
case CampType.Guardian:
|
|
return "守护者";
|
|
}
|
|
}
|
|
}
|
|
private string _family;
|
|
public string Family
|
|
{
|
|
get => _family; set
|
|
{
|
|
if (_family == value)
|
|
return;
|
|
_family = value;
|
|
}
|
|
}
|
|
private int _title;
|
|
public int Title
|
|
{
|
|
get => _title; set
|
|
{
|
|
if (_title == value)
|
|
return;
|
|
_title = value;
|
|
}
|
|
}
|
|
|
|
private int skinId;
|
|
public int SkinId
|
|
{
|
|
get => skinId; set
|
|
{
|
|
if (skinId == value)
|
|
return;
|
|
skinId = value;
|
|
}
|
|
}
|
|
|
|
private int characterPoint;
|
|
public int CharacterPoint
|
|
{
|
|
get => characterPoint; set
|
|
{
|
|
if (characterPoint == value)
|
|
return;
|
|
characterPoint = value;
|
|
}
|
|
}
|
|
private int skillPoint;
|
|
public int SkillPoint
|
|
{
|
|
get => skillPoint; set
|
|
{
|
|
if (skillPoint == value)
|
|
return;
|
|
skillPoint = value;
|
|
}
|
|
}
|
|
|
|
internal void Destroy()
|
|
{
|
|
_nickName = null;
|
|
_jobId = 0;
|
|
_family = null;
|
|
_campType = CampType.NoneCamp;
|
|
_title = 0;
|
|
characterPoint = 0;
|
|
skillPoint = 0;
|
|
skinId = 0;
|
|
}
|
|
}
|
|
}
|