public void InitializeTest() { Measures.Instance.Clear(); Units.Instance.Clear(); DistanceUnit.Initialize(); Assert.AreEqual("distance", Measures.Instance.Find(x => x.Name == "distance").Name); Assert.AreEqual("meeter", Units.Instance.Find(x => x.Name == "meeter").Name); }
/// <summary> /// 동그라미 유닛을 클릭했을 때 /// </summary> public void ClickDistanceSpawnButton() { Debug.Log(playerNumber + "player : DistanceUnit Click"); if (!checkSpawnDoing) { checkSpawnDoing = true; unitType = Unit.UnitType.Distance; newUnit = (GameObject)Instantiate(unitList[(int)unitType]); DistanceUnit distanceUnit = newUnit.GetComponent <DistanceUnit>(); distanceUnit.spawnManager = this; distanceUnit.Initialize(); CheckClocking(distanceUnit); } }