public void ClickEvent() { //UltValue ultval = Instantiate(obj, new Vector3(40, 150, 75), new Quaternion(0, 180, 0 ,0)).GetComponent<UltValue>(); //ultval.ultrasonic = type; UltValue ultval = Instantiate(obj, spwnPoint.transform.position, spwnPoint.transform.rotation).GetComponent <UltValue>(); ultval.ultrasonic = type; ultval.gameObject.transform.parent = GameObject.Find("CraftTable").transform; }
public void ClickEvent() { if (int.Parse(input1.text) <= 0 || input1.text == null || input1.text == "") { return; } if (int.Parse(input2.text) <= 0 || input2.text == null || input2.text == "" || int.Parse(input2.text) > 180) { return; } UltValue ultval = Instantiate(obj, new Vector3(40, 150, 75), new Quaternion(0, 180, 0, 0)).GetComponent <UltValue>(); ultval.ultrasonic = type; ultval.CustomDis = int.Parse(input1.text) * 30; ultval.CustomWil = int.Parse(input2.text); penel.SetActive(false); }
// Start is called before the first frame update void Start() { ultmanager = GetComponentInParent <UltValue>(); Data = 0; OnArround(true); }
public void ClickEvent() { UltValue ultval = Instantiate(obj, new Vector3(40, 150, 75), new Quaternion(0, 180, 0, 0)).GetComponent <UltValue>(); ultval.ultrasonic = type; }