Skip to content

Instantly share code, notes, and snippets.

@Zerophase
Last active August 29, 2015 14:04
Show Gist options
  • Save Zerophase/24eb40831e9866895e73 to your computer and use it in GitHub Desktop.
Save Zerophase/24eb40831e9866895e73 to your computer and use it in GitHub Desktop.
public class Ball : MonoBehaviour
{
private IBounce bounce;
public void Initialize(IBounce bounce)
{
this.bounce = bounce;
}
void Update ()
{
bounce.BounceOnWall(rigidbody2D);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment