纳金网

标题: 小球自由落体 点击小球 小球弹起 [打印本页]

作者: 烟雨    时间: 2015-5-29 02:49
标题: 小球自由落体 点击小球 小球弹起
小球自由落体 点击小球 小球弹起
  1. using UnityEngine;
  2. using System.Collections;

  3. public class sadawd : MonoBehaviour {
  4.    
  5.         // Use this for initialization
  6.         void Start () {
  7.         
  8.         
  9.         }
  10.        
  11.         // Update is called once per frame
  12.         void Update () {
  13.         if (Input.GetMouseButtonDown(0))
  14.         {
  15.             rigidbody.AddForce(new Vector3(0, 1, 0) * 100f);
  16.         }
  17.         }
  18. }
复制代码





欢迎光临 纳金网 (http://go.narkii.com/club/) Powered by Discuz! X2.5