//public void OffClickCommand() //{ // if (go_CommandButton.GetComponentInChildren<Text>().text == "MOVE") // { // ti.b_TargetChose = true; // go_CommandPanel.SetActive(false); // } // else if (go_CommandButton.GetComponentInChildren<Text>().text == "BUILD") // { // go_BuildingPanel.SetActive(true); // go_CommandPanel.SetActive(false); // } // else if (go_CommandButton.GetComponentInChildren<Text>().text == "CREATE") // { // go_BarracksPanel.SetActive(true); // go_CommandPanel.SetActive(false); // } //} private void Update() { if (b_OnHold) { if (bc.GetRecipient().tag == "PlayerUnit") { int i; for (i = 0; i < bc.GetListOfUnit().Count; i++) { if (bc.GetRecipient().gameObject != bc.GetListOfUnit()[i].gameObject) { if (!bc.GetRecipient().GetComponent <PlayerFSM>().b_Selected) { //bc.GetRecipient().GetComponentInChildren<Transform>().Find("Plane").gameObject.SetActive(true); bc.GetRecipient().GetComponent <PlayerFSM>().b_Selected = true; bc.GetListOfUnit().Add(bc.GetRecipient().transform); } } } } } }