/// <summary> /// Raises the passed in <see cref="BoolGameEvent"/>, after confirming /// the name is valid. /// </summary> /// <param name="eventName">The name of the event.</param> /// <param name="value">The bool value the event is passing in with.</param> public void RaiseBoolEvent(string eventName, bool value) { //Raise the bool event if not null, else print an error. BoolGameEvent boolEvent = this.GetBoolEvent(eventName); if (!boolEvent) { Debug.LogError("ERROR: Invalid Bool Event name: " + eventName + ". Double check Event Constants/your spelling."); } else { this.GetBoolEvent(eventName).Raise(value); } }