Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using UnityEngine;
  4.  
  5. public class nama : MonoBehaviour {
  6.     void Update () {
  7.         if (Input.GetKey (KeyCode.Space)) {
  8.             GetComponent<Rigidbody>().AddForce (new Vector3 (0, 10, 0), ForceMode.Impulse);
  9.         }
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement