Exemplo n.º 1
0
        public PlateHoldingAction(PlayerControls player)
        {
            this.player = player;

            plate = ComponentUtil.GetClosestComponent <ClientPlate>(PlayerUtil.GetChefPosition(player));
            state = 0;

            if (ComponentUtil.IsPlateOnComponent(plate))
            {
                currentAction = new PathFindAction(player, ComponentUtil.GetPlateLocationComponent(plate));
            }
            else
            {
                currentAction = new PathFindAction(player, plate);
            }
        }
Exemplo n.º 2
0
        public PlateHoldingAction(PlayerControls player, ClientPlate plate)
        {
            this.player = player;
            this.plate  = plate;
            state       = 0;

            Logger.Log("PlateHoldingAction instantiated");

            if (ComponentUtil.IsPlateOnComponent(plate))
            {
                currentAction = new PathFindAction(player, ComponentUtil.GetPlateLocationComponent(plate));
                Logger.Log("Pathfinding component?");
            }
            else
            {
                currentAction = new PathFindAction(player, plate);
                Logger.Log("Pathfinding plate?");
            }
        }