Example #1
0
 public WidgetEvent(eEventType eventType, IWidget eventSource, object eventParameters)
 {
     EventType = eventType;
     EventSource = eventSource;
     EventParameters = eventParameters;
 }
Example #2
0
    private static Type GetEventClassForType(eEventType eventType)
    {
        Type eventClass = null;

        switch(eventType)
        {
        case eEventType.character_joined_game:
            eventClass = typeof(GameEvent_CharacterJoinedGame);
            break;
        case eEventType.character_left_game:
            eventClass = typeof(GameEvent_CharacterLeftGame);
            break;
        case eEventType.character_died:
            eventClass = typeof(GameEvent_CharacterDied);
            break;
        case eEventType.character_moved:
            eventClass = typeof(GameEvent_CharacterMoved);
            break;
        case eEventType.character_portaled:
            eventClass = typeof(GameEvent_CharacterPortaled);
            break;
        case eEventType.character_attacked:
            eventClass = typeof(GameEvent_CharacterAttacked);
            break;
        case eEventType.mob_spawned:
            eventClass = typeof(GameEvent_MobSpawned);
            break;
        case eEventType.mob_died:
            eventClass = typeof(GameEvent_MobDied);
            break;
        case eEventType.mob_moved:
            eventClass = typeof(GameEvent_MobMoved);
            break;
        case eEventType.mob_attacked:
            eventClass = typeof(GameEvent_MobAttacked);
            break;
        case eEventType.mob_dialog:
            eventClass = typeof(GameEvent_MobDialog);
            break;
        case eEventType.mob_player_prop_spotted:
            eventClass = typeof(GameEvent_MobPlayerPropSpotted);
            break;
        case eEventType.mob_player_prop_lost_track:
            eventClass = typeof(GameEvent_MobPlayerPropLostTrack);
            break;
        case eEventType.mob_ai_prop_spotted:
            eventClass = typeof(GameEvent_MobAIPropSpotted);
            break;
        case eEventType.mob_energy_tank_prop_spotted:
            eventClass = typeof(GameEvent_MobEnergyTankPropSpotted);
            break;
        case eEventType.energy_tank_drained:
            eventClass = typeof(GameEvent_EnergyTankDrained);
            break;
        case eEventType.energy_tank_hacked:
            eventClass = typeof(GameEvent_EnergyTankHacked);
            break;
        case eEventType.character_updated:
            eventClass = typeof(GameEvent_CharacterUpdated);
            break;
        }

        return eventClass;
    }