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
            }
        }
Example #2
0
 /// <summary>
 /// Destroys the singleton instance.
 /// </summary>
 internal static void DestroyInstance()
 {
     Instance = null;
 }
Example #3
0
 /// <summary>
 /// Creates the singleton instance.
 /// </summary>
 internal static void CreateInstance()
 {
     Instance = new CleanDropManager();
 }
Example #4
0
 internal static void DestroyCleanDrop()
 {
     PUtil.LogDebug("Destroying CleanDropManager");
     CleanDropManager.DestroyInstance();
 }
Example #5
0
 internal static void CreateCleanDrop()
 {
     CleanDropManager.CreateInstance();
     PUtil.LogDebug("Created CleanDropManager");
 }