public virtual void Damage(Collider hitCollider, Vector3 position, Vector3 direction, Missile missile) { if (IsLive) { ApplyDamage(missile.GetDamage(), missile.GetOwner()); if (OnDamage != null) OnDamage(hitCollider, position, direction, missile.GetPower(), missile.GetDamage(), missile.GetOwner()); } }
public virtual void Damage(Collider hitCollider, Vector3 position, Vector3 direction, float power, float damage, Missile missile) { if (IsLive) { ApplyDamage(damage, missile.GetOwner()); if (OnDamage != null) { OnDamage(hitCollider, position, direction, power, damage, missile.GetOwner()); } } }
public override void Damage(Collider hitCollider, Vector3 position, Vector3 direction, Missile missile) { killPosition = position; killDirection = direction; killPower = missile.GetPower(); var damageAmount = missile.GetDamage(); if (hitCollider == HeadCollider) { Debug.Log("HEADSHOT!"); damageAmount *= 10f; } base.Damage(hitCollider, position, direction, killPower, damageAmount, missile.GetOwner()); }
public void Trigger(Missile missile) { //Debug.Log("MISSILE SENSOR TRIGGERED!!!!"); var missileOwner = missile.GetOwner(); if (missileOwner != null) { var missileOwnerActor = missileOwner.GetComponentInParent<ActorAgent>(); if (missileOwnerActor != null) { if (missileOwnerActor.Team == opposingTeam) { var target = Targeting.FindNearest(opposingTeam, owner.GetVehicle().transform.position, 500f); owner.SetTarget(target); } } } }
public void Trigger(Missile missile) { //Debug.Log("MISSILE SENSOR TRIGGERED!!!!"); var missileOwner = missile.GetOwner(); if (missileOwner != null) { var missileOwnerActor = missileOwner.GetComponentInParent <ActorAgent>(); if (missileOwnerActor != null) { if (missileOwnerActor.Team == opposingTeam) { var target = Targeting.FindNearest(opposingTeam, owner.GetVehicle().transform.position, 500f); owner.SetTarget(target); } } } }