public virtual float ComputeScore(SpaceObject target = null) { PrepareEffect(target); float shieldArmorPoints = target.GetShieldPoints() + target.GetArmorPoints("Current"); float damagePoints = AttackManager.Instance.GetShieldDamage() + AttackManager.Instance.GetArmorDamage(); float score = Mathf.Ceil(((Mathf.Clamp(5 * damagePoints / shieldArmorPoints, 0, 5)) + (Mathf.Clamp(AttackManager.Instance.GetAccuracy() * 5 / 100, 0, 5))) / 2); return(score); }
public virtual void DisplayHUD(bool active) { if (active == true) { HUD.Instance.ActiveTargetPanel(true); HUD.Instance.ActiveActionPanel(true); HUD.Instance.ActiveInfoPanel(true); TargetPanel.Instance.DisplayArmorBar(true, m_MySpaceObject.GetArmorPoints("Current"), m_MySpaceObject.GetArmorPoints("Max")); TargetPanel.Instance.DisplayBuffs(true, m_MySpaceObject.GetBuffController().GetBonus(), m_MySpaceObject.GetBuffController().GetMalus()); TargetPanel.Instance.DisplayPassives(true, m_MySpaceObject.GetPassiveController().GetPassives()); TargetPanel.Instance.DisplayFeature(true, "MOV", m_MySpaceObject.GetMoveRange()); TargetPanel.Instance.DisplayFeature(true, "ESQ", m_MySpaceObject.GetEvade()); TargetPanel.Instance.DisplayFeature(true, "DEF", m_MySpaceObject.GetDefence()); TargetPanel.Instance.DisplayFeature(true, "CRT", m_MySpaceObject.GetCritChance()); TargetPanel.Instance.DisplayShieldBar(true, m_MySpaceObject.GetShieldPoints(), m_MySpaceObject.GetArmorPoints("Max") / 2); TargetPanel.Instance.DisplayTargetImage(true, m_MySpaceObject.GetHUDSprite()); ActionPanel.Instance.DisplayEnergyBar(true, m_MySpaceObject.GetEnergyPoints("Current"), m_MySpaceObject.GetEnergyPoints("Max")); ActionPanel.Instance.DisplaySlots(true, m_MySpaceObject.GetWeaponController().GetEquipments()); ActionPanel.Instance.DisplayEngineButton(!m_MySpaceObject.GetHasMoved()); /*if(m_MyShip.GetHasMoved() == true) * ActionPanel.Instance.DisplayEngineButton (false); * else * ActionPanel.Instance.DisplayEngineButton (true);*/ InfoPanel.Instance.SetInfos(m_MySpaceObject.GetWeaponController().GetEquipments(), m_MySpaceObject.GetPassiveController().GetPassives(), m_MySpaceObject.GetBuffController().GetBonus(), m_MySpaceObject.GetBuffController().GetMalus()); } else { HUD.Instance.ActiveTargetPanel(false); HUD.Instance.ActiveActionPanel(false); HUD.Instance.ActiveInfoPanel(false); } }