Пример #1
0
    public void TriggerEvent(ValueType _event)
    {
        if (_event is CommandChangeResultPos)
        {
            CommandChangeResultPos command = (CommandChangeResultPos)_event;

            GetCommandChangeResultPos(command);
        }
        else if (_event is CommandChangeWorkerPos)
        {
            CommandChangeWorkerPos command = (CommandChangeWorkerPos)_event;

            GetCommandChangeWorkerPos(command);
        }
        else if (_event is CommandCompleteDish)
        {
            CommandCompleteDish command = (CommandCompleteDish)_event;

            GetCommandCompleteDish(command);
        }
        else if (_event is CommandCompleteRequirement)
        {
            CommandCompleteRequirement command = (CommandCompleteRequirement)_event;

            GetCommandCompleteRequirement(command);
        }
    }
Пример #2
0
    public void ChangeWorkerPos(CommandChangeWorkerPos _command)
    {
        WorkerUnit workerUnit = workerArr[_command.workerIndex];

        SeatUnit seatUnit;

        if (_command.targetPos < 0)
        {
            seatUnit = seatArr[-_command.targetPos - 1];
        }
        else
        {
            seatUnit = dishList[_command.targetPos].dishWorkerBt;
        }

        seatUnit.SetWorker(workerUnit);
    }
Пример #3
0
    private void GetCommandChangeWorkerPos(CommandChangeWorkerPos _command)
    {
        PlayerDataUnit unit = _command.isMine == client.clientIsMine ? mPlayerData : oPlayerData;

        unit.ChangeWorkerPos(_command);
    }