public void CoverHealth(Health health) { health.shieldIndex = shieldedHealths.Add (health); health.OnTakeProjectile += OnTakeDamage; health.Agent.onDeactivation += OnCoveredDie; health.Protect (this); }
public void RemoveHealth(Health health) { shieldedHealths.RemoveAt (health.shieldIndex); health.OnTakeProjectile -= OnTakeDamage; health.Agent.onDeactivation -= OnCoveredDie; health.Unprotect (this); }
public void Engage(LSAgent other) { if (other != Agent) { cachedTargetHealth = other.Healther; if (cachedTargetHealth .IsNotNull()) { Target = other; HasTarget = true; targetVersion = Target.SpawnVersion; IsCasting = true; fastRangeToTarget = Range + (Target.Body .IsNotNull() ? Target.Body.Radius : 0); fastRangeToTarget *= fastRangeToTarget; } } }