Example #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);
        }
    }
Example #2
0
    public void CompleteDish(CommandCompleteDish _command)
    {
        Dish dish = dishList[_command.pos];

        if (_command.targetPos != -1)
        {
            DishResultContainer dishResultContainer = dishResultContainerArr[_command.targetPos];

            dishResultContainer.SetResult(dish.resultUnit);

            dish.RemoveDishResult();
        }
        else
        {
            dish.DestroyDishResult();
        }
    }
Example #3
0
    private void GetCommandCompleteDish(CommandCompleteDish _command)
    {
        PlayerDataUnit unit = _command.isMine == client.clientIsMine ? mPlayerData : oPlayerData;

        unit.CompleteDish(_command);
    }