/// <summary> /// 技能或者武器特效等 /// </summary> /// <param name="attacker"></param> /// <param name="defender"></param> /// <returns></returns> public static int GetHit(CharacterLogic attacker, CharacterLogic defender) { var hit = attacker.GetHit() - defender.GetAvoid(); hit = Mathf.Clamp(hit, 0, 100); return(hit); }
public void Init(CharacterLogic ch, int index = -1)//数值在GameChar里面有函数计算 { Text_Attack.text = ch.GetAttack().ToString(); Text_Hit.text = ch.GetHit().ToString(); Text_Critical.text = ch.GetCritical().ToString(); Text_Range.text = ch.GetAttackRangeMin() + "-" + ch.GetAttackRangeMax(); Text_Anger.text = ch.GetAnger().ToString(); Text_AttackSpeed.text = ch.GetAttackSpeed().ToString(); Text_AttackEffect.text = "攻击特效显示";//medifyneed Text_Avoid.text = ch.GetAvoid().ToString(); Text_critAvoid.text = ch.GetCriticalAvoid().ToString(); Text_Movement.text = ch.GetMovement().ToString(); }