Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class NewBehaviourScript : MonoBehaviour {
- void Awake() {
- //print( "Waking Up" );
- }
- // Use this for initialization
- void Start () {
- //print( "Hello World" );
- }
- // Update is called once per frame
- void Update () {
- //print( "Hello Again" );
- transform.Translate(new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical") ) * Time.deltaTime * 10, Space.World);
- if (Input.GetAxis("Jump") > 0) {
- rigidbody.AddForce(Vector3.up * Time.deltaTime * 1000);
- }
- }
- void LateUpdate() {
- //print( "Sorry I'm Late" );
- }
- void OnCollisionEnter( Collision collisionInfo ) {
- foreach( ContactPoint contact in collisionInfo ) {
- print( "Hit: "+contact.otherCollider.gameObject.name );
- }
- }
- }
Add Comment
Please, Sign In to add comment