Пример #1
0
        public static void LogChefPositions()
        {
            Vector3 chef1Position = PlayerUtil.GetChefPosition(0);

            Logger.Log($"Chef 1 {Logger.FormatPosition(chef1Position)}");

            Vector3 chef2Position = PlayerUtil.GetChefPosition(1);

            Logger.Log($"Chef 2 {Logger.FormatPosition(chef2Position)}");
        }
Пример #2
0
        public static void PathFindToPlayer()
        {
            GridNavSpace gridNavSpace = GameUtils.GetGridNavSpace();

            Point2 startPoint  = gridNavSpace.GetNavPoint(PlayerUtil.GetChefPosition(1));
            Point2 targetPoint = gridNavSpace.GetNavPoint(PlayerUtil.GetChefPosition(0));

            path = gridNavSpace.FindPath(startPoint, targetPoint);

            pathIteration = 0;

            currentAction = new MoveAction(ObjectUtil.GetBotControls(), path[0]);

            walkingPath = true;
        }
Пример #3
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);
            }
        }