public CharacterData(AttackAttribute attackAttribute, DefenseAttribute defenseAttribute, SpeedAttribute speedAttribute, HealthAttribute healthAttribute) { this.attackAttribute = attackAttribute; this.defenseAttribute = defenseAttribute; this.speedAttribute = speedAttribute; this.HealthAttribute = healthAttribute; }
/// <summary> /// 初始化英战斗属性 /// </summary> /// <param name="baseHero"></param> /// <param name="inscriptionPage"></param> public void InitBatteryAttibute(BaseHero baseHero, InscriptionPage inscriptionPage) { baseAttibute = CopyTool.DeepCopy <BaseAttribute>(baseHero.baseAttribute); attackAttibute = CopyTool.DeepCopy <AttackAttribute>(baseHero.attackAttribute); defenseAttibute = CopyTool.DeepCopy <DefenseAttribute>(baseHero.defenseAttribute); InitInscriptionAttibute(inscriptionPage); }
private void CharacterTestDefault() { AttackAttribute attackAttribute = new AttackAttribute(1, 1.0f); DefenseAttribute defenseAttribute = new DefenseAttribute(1, 1.0f); HealthAttribute healthAttribute = new HealthAttribute(1, 1.0f); SpeedAttribute speedAttribute = new SpeedAttribute(1, 1.0f); this.character = new CharacterData(attackAttribute, defenseAttribute, speedAttribute, healthAttribute); Debug.Log("-----Default Stats------"); Debug.Log("Health: " + this.character.GetHealthAttribute().GetModifiedValue() + " Attack: " + this.character.GetAttackAttribute().GetModifiedValue() + " Defense: " + this.character.GetDefenseAttribute().GetModifiedValue() + " Speed: " + this.character.GetSpeedAttribute().GetModifiedValue()); Debug.Log("----Default Stats End----"); }
private void CharacterTestDefault() { AttackAttribute attackAttribute = new AttackAttribute(1, 1.0f); DefenseAttribute defenseAttribute = new DefenseAttribute(1, 1.0f); HealthAttribute healthAttribute = new HealthAttribute(1,1.0f); SpeedAttribute speedAttribute = new SpeedAttribute(1,1.0f); this.character = new CharacterData(attackAttribute, defenseAttribute, speedAttribute, healthAttribute); Debug.Log ("-----Default Stats------"); Debug.Log ("Health: " +this.character.GetHealthAttribute().GetModifiedValue() + " Attack: " +this.character.GetAttackAttribute().GetModifiedValue() + " Defense: " +this.character.GetDefenseAttribute().GetModifiedValue() + " Speed: " +this.character.GetSpeedAttribute().GetModifiedValue()); Debug.Log ("----Default Stats End----"); }