C#

Unity C# オブジェクトからオブジェクト 距離の計算

using UnityEngine; using System.Collections; using System.Collections.Generic; using UnityEngine.UI; public class GameDirector : MonoBehaviour { GameObject car; GameObject flag; GameObject distance; // Use this for initialization void Star…

C# ゲーム 2D 移動 スワイプの強さに合わせて  X軸移動 & 効果音

using UnityEngine; using System.Collections; public class CarController : MonoBehaviour { float speed = 0; Vector2 startPos; // Use this for initialization void Start () { } // Update is called once per frame void Update () { if (Input.Get…

C# ゲーム 減速

using UnityEngine; using System.Collections; public class CarController : MonoBehaviour { float speed = 0; // Use this for initialization void Start () { } // Update is called once per frame void Update () { if(Input.GetMouseButtonDown(0))…