Пример #1
0
        private void UpdateNextUnlockText()
        {
            ComputerSpawnableObject nextUnlock = FindNextUnlock();

            if (!nextUnlock.Equals(default(ComputerSpawnableObject)))
            {
                nextUnlockText.UpdateMessage("Next Unlock: " + nextUnlock.friendlyName);
            }
            else
            {
                nextUnlockText.UpdateMessage("");
            }
        }
Пример #2
0
        private ComputerSpawnableObject FindNextUnlock()
        {
            int count = int.MaxValue;
            ComputerSpawnableObject nextUnlock = default(ComputerSpawnableObject);

            foreach (var unlock in unlockableObjects)
            {
                if (!unlockableObjectsWorkingSet.Contains(unlock))
                {
                    if (unlock.moneyToUnlock < count)
                    {
                        nextUnlock = unlock;
                        count      = unlock.moneyToUnlock;
                    }
                }
            }

            return(nextUnlock);
        }