Example #1
0
        /// <summary>
        /// Marks the direction where a worker was standing.
        /// </summary>
        /// <param name="instance">The target workable.</param>
        /// <param name="worker">The Duplicant working the task.</param>
        private static void MarkDirection(Workable instance, Worker worker)
        {
            var inst = CleanDropManager.Instance;

            if (inst != null && worker != null)
            {
                int targetCell = instance.GetCell();
                inst[targetCell] = CleanDropManager.GetWorkerDirection(Grid.PosToCell(worker),
                                                                       targetCell);
#if DEBUG
                Grid.CellToXY(targetCell, out int x, out int y);
                PUtil.LogDebug("Mark workable {0} in cell ({1:D}, {2:D}) direction = {3}".F(
                                   instance.GetType().FullName, x, y, inst[targetCell]));
#endif
            }
        }