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