Shielding

Shield behavior now provides protection from damage at the expense of heat and energy usage
Weapon scripts check for the presence of a shield when detecting collisions (TODO: TEST ALL WEAPON TYPES)
Shields can be toggled on/off (G key)
Database cache now included in repo (saves some confusion)
This commit is contained in:
Reinier Vens 2021-03-06 01:04:26 +00:00
commit 8920b48977
19 changed files with 377 additions and 95 deletions

View file

@ -18,6 +18,7 @@ public class SchematicDisplay : MonoBehaviour
public Color HeaderElementEnabledColor;
public Color HeaderElementDisabledColor;
public GameObject ShieldIcon;
public Image HeatsinkBackground;
public TextMeshProUGUI EnergyLabel;
@ -215,6 +216,7 @@ public class SchematicDisplay : MonoBehaviour
{
if (!_enemy)
{
ShieldIcon.SetActive(_entity.Shield!=null && _entity.Shield.Item.Active);
if (_radiators.Length == 1)
RadiatorTemperatureLabel.text = $"{((int)(_radiators[0].Temperature - 273.15f)).ToString()}°C";
else if (_radiators.Length > 1)