IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]unity3d随笔-7

    u010255642发表于 2017-04-03 19:12:53
    love 0
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;


    public class mycube : MonoBehaviour {


    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void Update () {
            if (Input.GetKey(KeyCode.Space)){
                Rigidbody rigi=gameObject.GetComponent<Rigidbody>();
                Vector3 force = Vector3.up * 50;
                rigi.AddForce(force);
            }

    }
    }


沪ICP备19023445号-2号
友情链接