public static void TriggerEvent(Details data) { //Debug.Log("TriggerEvent: GetNextDialogueAction = " + data.GetNextDialogueAction().ToString()); SenderEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(data.GetNextDialogueAction().ToString(), out thisEvent)) { thisEvent.Invoke(data); } data.SetDialogueAsComplete(data.GetNextDialogueAction()); }
public void Modify(ProjectileKind kind, int amount) { if (ammoCounts[(int)kind] != int.MaxValue) { if (amount == int.MaxValue) { ammoCounts[(int)kind] = amount; } else { ammoCounts[(int)kind] += amount; } } onModifyEvent.Invoke(this); }