移动 前端 Python Android Java

Script-点击鼠标左键触发

2017-08-31  本文已影响8人  zcwfeng
public class Test : MonoBehaviour {
    public GameObject getBulle;

    GameObject bullet;

    // Use this for initialization
    void Start () {
        
    }
    
    // Update is called once per frame
    void Update () {
        if (Input.GetButton ("Fire1")) {
            bullet =  Instantiate (getBulle);
            bullet.transform.parent = this.transform;
        }
    }
}

上一篇下一篇

猜你喜欢

热点阅读