public void subscribeToChoiceEffectEvent(UnityAction <ChoiceEffect> Action) { if (this.intEvent == null) { this.intEvent = new ChoiceButtonEffectEvent(); } this.intEvent.AddListener(Action); }
void Awake() { this.button = this.GetComponent <Button> (); this.buttonText = this.GetComponentInChildren <Text> (); this.nextNodeID = -1; this.intEvent = new ChoiceButtonEffectEvent(); this.button.onClick.AddListener(delegate { this.intEvent.Invoke(cEffect); }); }