private void OnMouseOver() { if (!ifBeforeSettle && Input.GetMouseButtonUp(0)) { DetectPhoneSystem.pushIn(this); } }
private IEnumerator beforeSettle() { if (Input.GetMouseButtonUp(0) && GameSystem.ifOnLand()) { ifBeforeSettle = false; transform.GetChild(0).gameObject.layer = 0; gameObject.layer = 0; DetectPhoneSystem.Settle(); GameSystem.PlayAudio(GameSystem.settings.音效clip.种监视器); GameSystem.ShowWave(transform.position); GameSystem.AddAlert(GameSystem.settings.方式的警戒影响基数.监听); yield return(0); } else if (Input.GetMouseButtonUp(1)) { DetectPhoneSystem.Settle(); Destroy(gameObject); } else { transform.position = Camera.main.ScreenToWorldPoint(Input.mousePosition) + Vector3.forward * 20; yield return(0); yield return(beforeSettle()); } }
private void Awake() { setting = this; }