public void DoHelp() { PlayButton.GetComponent <Image> ().raycastTarget = false; OptionButton.GetComponent <Image> ().raycastTarget = false; HelpButton.GetComponent <Image> ().raycastTarget = false; ExitButton.GetComponent <Image> ().raycastTarget = false; Instantiate(HelpPrefab, gameObject.transform.parent); }
// Use this for initialization void Start() { Debug.Log("star1"); Button play = PlayButton.GetComponent <Button>(); Button help = HelpButton.GetComponent <Button>(); Button quit = QuitButton.GetComponent <Button>(); Debug.Log("star2"); play.onClick.AddListener(Letplay); help.onClick.AddListener(HELP); quit.onClick.AddListener(Leave); Debug.Log("star3"); }
internal static void Activate() { helpers = 0; helpButton.gameObject.SetActive(true); if (GameManager.singleton.fightingPlayerNetId == PlayerInGame.localPlayerInGame.netId) { textMesh.text = "Request Help (0)"; } else { textMesh.text = "Offer Help"; } helpButton.GetComponent <Image>().raycastTarget = true; helping = false; }