private void ProcessRandomEvent(RandomEvent random) { this.playerAge.Add(random.ageChange); this.playerIncome.Add(random.incomingChange); this.playerCosts.Add(random.outGoingChange); this.inflationRate.Add(random.inflationChange); randomEventNotification.Fire(new NotificationData( random.description, random.incomingChange, random.outGoingChange, random.inflationChange)); }
public override void OnInspectorGUI() { DrawDefaultInspector(); if (!EditorApplication.isPlaying) { return; } NotificationDataEvent notificationDataEvent = (NotificationDataEvent)target; if (GUILayout.Button("Fire default")) { notificationDataEvent.Fire(new NotificationData("Something important happened!", 2f, 1f, 0.2f)); } }