void OnMouseDown() { if (this.gameObject != GUIManager.showTurret) { //清除之前的显示炮塔 if (GUIManager.showTurret != null) { Destroy(GUIManager.showTurret); } //显示炮塔改成自己 GUIManager.showTurret = GameData.CreateTurret(type, seq, "Outfit"); GUIManager.showTurret.transform.position = new Vector3(40, 21); GUIManager.showTurret.transform.localScale = new Vector3(10, 10); //改写追踪数据 GUIManager.ChangeShipOutfitState(seq, type); } }