protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision) { //push the other away from this, as fast as it can go other.velocity = -collision.relativeVelocity.normalized * other.maxSpeed; other.DamageThis(damage); }
protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision) { if (other.team != team) { other.DamageThis(damage); } }
protected override void DestructableObjectCollision(DestructableObject other) { if (team != other.team) { other.DamageThis(damage); } DestroyThis(); }
protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision) { if (other.team != team) { other.DamageThis(damage * difficultyModifier); } Bounce(collision); }
protected override void DestructableObjectCollision(DestructableObject other) { if (other != attachedTo) { other.DamageThis(damage); //Retract the Lazer to only go to what it collided with, not past it scale = new Vector2(scale.x, DistanceFrom(other) / originalLength); } }
protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision) { //if the collision speed is larger than the minimum, deal damage to the DestructableObject float damageSpeed = collision.relativeVelocity.magnitude - minDamageSpeed; if (damageSpeed > 0) { other.DamageThis(damageSpeed * damageMultiplier * difficultyModifier); } }
protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision) { if (other.team != this.team) { other.DamageThis(scale.x * damageMultiplier * difficultyModifier); } else if (other.GetType() == typeof(Blob)) { if (mergeTimer == 0 && ((Blob)(other)).mergeTimer == 0 && scale.x + other.scale.x < maxSize) { MergeWith((Blob)other); } } }
protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision) { other.DamageThis(damage); DestroyThis(); }
protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision) { other.DamageThis(damageMultiply * mass * difficultyModifier); }