2018-10-31から1日間の記事一覧
unityroomにあげる用のゲームを作り始めた。ちなみに前回unityroomに投稿したゲームは、閲覧数が100を超えてた。作ったゲームが実際に遊んでもらっていることが分かったので、非常にうれしい。 赤いボールからひたすら逃げろ | 無料ゲーム投稿サイト unityro…
public GameObject bullet; // Update is called once per frame void Update () { if(Input.GetMouseButtonDown(0)) { shot(); } } void shot() { Instantiate(bullet, transform.position, transform.rotation); } ちなみに、弾の方のスクリプトは以下。 p…
public float speed = 10; Rigidbody rb; void Start () { rb = GetComponent<Rigidbody>(); } // Update is called once per frame void Update () { float x = Input.GetAxisRaw("Horizontal"); float y = Input.GetAxisRaw("Vertical"); Vector2 direction = new Vec</rigidbody>…