Пример #1
0
 protected override void IndestructableObjectCollision(IndestructableObject other, Collision2D collision)
 {
     Bounce(collision);
 }
Пример #2
0
 protected override void IndestructableObjectCollision(IndestructableObject other, Collision2D collision)
 {
     DestroyThis();
 }
Пример #3
0
 public void AddToGame(IndestructableObject add)
 {
     addIndestructables.Add(add);
 }
Пример #4
0
 public void RemoveFromGame(IndestructableObject remove)
 {
     removeIndestructables.Add(remove);
 }
Пример #5
0
 protected override void IndestructableObjectCollision(IndestructableObject other)
 {
 }
Пример #6
0
 protected abstract void IndestructableObjectCollision(IndestructableObject other);
Пример #7
0
 protected override void IndestructableObjectCollision(IndestructableObject other, Collision2D collision)
 {
     //push the other away from this, as fast as it can go
     other.velocity = -collision.relativeVelocity.normalized * other.maxSpeed;
 }