Пример #1
0
    void RegisterAction(BaseAction action, BattleQueueType type)
    {
        if (_logRegistrations)
        {
            LogEx.Log <BattleQueue>("Registered action: {0} of type '{1}'", action.GetType().Name, type.ToString());
        }

        switch (type)
        {
        case BattleQueueType.GenericUpdate:
            _genericUpdates.Queue.Enqueue(action);
            break;

        case BattleQueueType.PlayerCommand:
            _playerCommands.Queue.Enqueue(action);
            break;

        case BattleQueueType.StatusUpdate:
            _statusUpdates.Queue.Enqueue(action);
            break;

        case BattleQueueType.Weather:
            _weatherUpdates.Queue.Clear();
            _weatherUpdates.Queue.Enqueue(action);
            break;
        }
    }
Пример #2
0
    void RegisterAction(BaseAction action, BattleQueueType type)
    {
        if (_logRegistrations)
        {
            LogEx.Log <BattleQueue>("Registered action: {0} of type '{1}'", action.GetType().Name, type.ToString());
        }

        if (ActionRegistered != null)
        {
            ActionRegistered.Invoke(action, type);
        }
    }