private void Start() { healthModule = GetComponent <PlayerHealth>(); wardModule = GetComponent <Shielding>(); movementModule = GetComponent <Movement>(); targetingModule = GetComponent <Targeting>(); attackingModule = GetComponent <Sword>(); animatorModule = GetComponent <Animator>(); }
/// <summary> /// Returns a text description of all significant values /// </summary> /// <returns></returns> public override string ToString() { string res = ""; if (HPChange != 0) { res += "\nHP change per day: " + HPChange.ToString("F2"); } if (Space != 0) { res += "\nSpace: " + Space.ToString("F1"); } if (RecuperationPower != 0) { res += "\nRecuperation Power: " + RecuperationPower.ToString("F1") + "% (max " + MaxRecuperaction.ToString("F1") + "%)"; } if (Decay != 0) { res += "\nDecay: " + Shielding.ToString("F1") + "%"; } if (Shielding != 0) { res += "\nShielding: " + Shielding.ToString("F1"); } if (PartsRadiation != 0) { res += "\nParts radiation: " + PartsRadiation.ToString("F0"); } foreach (HealthFactor f in Core.Factors) { if (BonusSums[f.Name] != 0) { res += "\n" + f.Name + " bonus sum: " + BonusSums[f.Name]; } if (FreeMultipliers[f.Name] != 1) { res += "\n" + f.Name + " free multiplier: " + FreeMultipliers[f.Name]; } if (MinMultipliers[f.Name] != 1) { res += "\n" + f.Name + " min multiplier: " + MinMultipliers[f.Name]; } if (MaxMultipliers[f.Name] != 1) { res += "\n" + f.Name + " max multiplier: " + MaxMultipliers[f.Name]; } } if (BonusSums["All"] != 0) { res += "\nWildcard bonus sum: " + BonusSums["All"]; } if (FreeMultipliers["All"] != 1) { res += "\nWildcard free multiplier: " + FreeMultipliers["All"]; } if (MinMultipliers["All"] != 1) { res += "\nWildcard min multiplier: " + MinMultipliers["All"]; } if (MaxMultipliers["All"] != 1) { res += "\nWildcard max multiplier: " + MaxMultipliers["All"]; } return(res.Trim()); }
void Start() { _playerhealth = Violet.GetComponent <PlayerHealth>(); _sword = Violet.GetComponent <Sword>(); _shielding = Violet.GetComponent <Shielding>(); }