Exemple #1
0
    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);
    }
Exemple #2
0
 protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision)
 {
     if (other.team != team)
     {
         other.DamageThis(damage);
     }
 }
Exemple #3
0
 protected override void DestructableObjectCollision(DestructableObject other)
 {
     if (team != other.team)
     {
         other.DamageThis(damage);
     }
     DestroyThis();
 }
Exemple #4
0
    protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision)
    {
        if (other.team != team)
        {
            other.DamageThis(damage * difficultyModifier);
        }

        Bounce(collision);
    }
Exemple #5
0
    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);
        }
    }
Exemple #7
0
 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);
         }
     }
 }
Exemple #8
0
 protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision)
 {
     other.DamageThis(damage);
     DestroyThis();
 }
Exemple #9
0
 protected override void DestructableObjectCollision(DestructableObject other, Collision2D collision)
 {
     other.DamageThis(damageMultiply * mass * difficultyModifier);
 }