Exemplo n.º 1
0
    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());
    }
Exemplo n.º 2
0
 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);
 }