Skip to content

Instantly share code, notes, and snippets.

@monry

monry/Racket.cs Secret

Created April 17, 2015 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monry/3b79031d53381cbf0da3 to your computer and use it in GitHub Desktop.
Save monry/3b79031d53381cbf0da3 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class Racket : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void OnCollisionEnter2D(Collision2D collision2D) {
collision2D.gameObject.GetComponent<Rigidbody2D>().AddForce (Vector2.up * 100.0f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment