private void OnResourceFocusDropdownChanged(int newValue)
        {
            var newOption = ResourceFocusDropdown.options[newValue];
            var newFocus  = (YieldFocusType)Enum.Parse(typeof(YieldFocusType), newOption.text, true);

            ObjectToDisplay.YieldFocus = newFocus;
            ObjectToDisplay.PerformDistribution();
        }
Beispiel #2
0
        private void OnSlotClicked(IWorkerSlot slot)
        {
            if (ObjectToDisplay == null)
            {
                return;
            }

            if (slot.IsOccupied && !slot.IsLocked)
            {
                LockOccupiedSlot(slot);
            }
            else if (slot.IsOccupied && slot.IsLocked)
            {
                UnassignLockedSlot(slot);
            }
            else
            {
                AssignAndLockUnoccupiedSlot(slot);
            }

            ObjectToDisplay.PerformDistribution();
        }