Created
February 27, 2014 08:18
-
-
Save touyou/9246328 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UnityEngine | |
class BallController(MonoBehaviour): | |
public Speed as single = 20.0f | |
def Start(): | |
rigidbody.AddForce((transform.forward+transform.right) * Speed, ForceMode.VelocityChange) | |
def Update(): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UnityEngine | |
class RacketController (MonoBehaviour): | |
public Accel as single = 1000.0f | |
def Start (): | |
pass | |
def Update (): | |
rigidbody.AddForce(transform.right*Input.GetAxisRaw("Horizontal")*Accel,ForceMode.Impulse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment