public static TDCPlayerData operator +(TDCPlayerData lh, TDCPlayerData rh)
 {
     var tmp = new TDCPlayerData ();
     tmp.ID = lh.ID;
     tmp.Name = lh.Name;
     tmp.GameType = lh.GameType;
     tmp.Description = lh.Description;
     tmp.ModelPath = lh.ModelPath;
     tmp.MoveSpeed = (lh.MoveSpeed + rh.MoveSpeed) / 2;
     tmp.CurrentHP = (lh.CurrentHP + rh.CurrentHP) / 2;
     tmp.MaxHP = (lh.MaxHP + rh.MaxHP) / 2;
     tmp.Damage = (lh.Damage + rh.Damage) / 2;
     tmp.CurrentHeatPoint = (lh.CurrentHeatPoint + rh.CurrentHeatPoint) / 2;
     tmp.MaxHeatPoint = (lh.MaxHeatPoint + rh.MaxHeatPoint) / 2;
     tmp.CurrentHungerPoint = (lh.CurrentHungerPoint + rh.CurrentHungerPoint) / 2;
     tmp.MaxHungerPoint = (lh.MaxHungerPoint + rh.MaxHungerPoint) / 2;
     tmp.CurrentSanityPoint = (lh.CurrentSanityPoint + rh.CurrentSanityPoint) / 2;
     tmp.MaxSanityPoint = (lh.MaxSanityPoint + rh.MaxSanityPoint) / 2;
     tmp.Level = lh.Level + 1;
     tmp.Inventory = lh.Inventory;
     tmp.Icon = lh.Icon;
     tmp.ActiveSkill = lh.ActiveSkill;
     tmp.PassiveSkill = lh.PassiveSkill;
     return tmp;
 }
示例#2
0
    public TDCPlayer(TDCBaseController ctrl, TDCBaseData data)
        : base(ctrl, data)
    {
        m_Controller = ctrl as TDCPlayerController;
        m_Data = data as TDCPlayerData;

        m_SkillSlotComponent.CreatePassiveSkillSlot(m_Data.PassiveSkill);
    }
 public static TDCPlayerData Clone(TDCPlayerData instance)
 {
     var tmp = new TDCPlayerData ();
     tmp.ID = instance.ID;
     tmp.Name = instance.Name;
     tmp.GameType = instance.GameType;
     tmp.Description = instance.Description;
     tmp.ModelPath = instance.ModelPath;
     tmp.FSMPath = instance.FSMPath;
     tmp.CreatureType = instance.CreatureType;
     tmp.AttackRange = instance.AttackRange;
     tmp.DetectRange = instance.DetectRange;
     tmp.MoveSpeed = instance.MoveSpeed;
     tmp.CurrentHP = instance.CurrentHP;
     tmp.MaxHP = instance.MaxHP;
     tmp.Damage = instance.Damage;
     tmp.ActiveSkill = instance.ActiveSkill;
     tmp.PassiveSkill = instance.PassiveSkill;
     tmp.CurrentHeatPoint = instance.CurrentHeatPoint;
     tmp.MaxHeatPoint = instance.MaxHeatPoint;
     tmp.CurrentHungerPoint = instance.CurrentHungerPoint;
     tmp.MaxHungerPoint = instance.MaxHungerPoint;
     tmp.CurrentSanityPoint = instance.CurrentSanityPoint;
     tmp.MaxSanityPoint = instance.MaxSanityPoint;
     tmp.Level = instance.Level;
     tmp.Inventory = instance.Inventory;
     tmp.IsShine = instance.IsShine;
     return tmp;
 }
示例#4
0
 public override void SetData(TDCBaseData data)
 {
     base.SetData (data);
     m_Data = data as TDCPlayerData;
 }