2020-06-02から1日間の記事一覧

当たったものを消す

using System.Collections; using System.Collections.Generic; using UnityEngine; public class tama : MonoBehaviour { private void OnCollisionEnter(Collision collision) { if(collision.gameObject.tag == "Enemy") { Destroy(collision.gameObject)…

弾を撃つ

using System.Collections; using System.Collections.Generic; using UnityEngine; public class fire : MonoBehaviour { public GameObject Tama; // Start is called before the first frame update void Start() { } // Update is called once per frame…

オブジェクトの移動と回転

using System.Collections; using System.Collections.Generic; using UnityEngine; public class move : MonoBehaviour { public float speed = 10.0f; public Rigidbody rb; // Start is called before the first frame update void Start() { rb = GetCom…