Exemple #1
0
    public void TriggerAction(PlayerEvent ev, string actionName)
    {
        Debug.Log ("Trigger action " + actionName + " for event " + ev.Content);

        if (ev.type == PlayerEvent.Type.Equipment) {
          var equipmentActionProcessor = new EquipmentActionProcessor(sim);
          equipmentActionProcessor.HandleAction(ev, actionName);
        }

        if (ev.type == PlayerEvent.Type.Consumable) {
          var consumableActionProcessor = new ConsumableActionProcessor(sim);
          consumableActionProcessor.HandleAction(ev, actionName);
        }

        NotificationCenter.PostNotification(Constants.OnUpdateEvents);
    }
Exemple #2
0
    public void TriggerAction(PlayerEvent ev, string actionName)
    {
        Debug.Log("Trigger action " + actionName + " for event " + ev.Content);

        if (ev.type == PlayerEvent.Type.Equipment)
        {
            var equipmentActionProcessor = new EquipmentActionProcessor(sim);
            equipmentActionProcessor.HandleAction(ev, actionName);
        }

        if (ev.type == PlayerEvent.Type.Consumable)
        {
            var consumableActionProcessor = new ConsumableActionProcessor(sim);
            consumableActionProcessor.HandleAction(ev, actionName);
        }

        NotificationCenter.PostNotification(Constants.OnUpdateEvents);
    }