This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # UNLOCKS_ORDER is a static dictionary where the key is the order in which the unlocks should occur. This is subject | |
| # to change with testing and verification. Unlock is what Unlock should be executed. Level is what level of the | |
| # unlock should be queued. Requirements set is the list of requirements needed to unlock that level. | |
| # | |
| # Order Unlock Level Requirements Set | |
| # ----- ------ ----- ---------------- | |
| UNLOCKS_ORDER = {0: [Unlocks.Speed, 1, UNLOCKS_DATA[Unlocks.Speed] [0]], | |
| 1: [Unlocks.Expand, 1, UNLOCKS_DATA[Unlocks.Expand] [0]], | |
| 2: [Unlocks.Plant, 1, UNLOCKS_DATA[Unlocks.Plant] [0]], | |
| 3: [Unlocks.Expand, 2, UNLOCKS_DATA[Unlocks.Expand] [1]], #SKIP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # UNLOCKS_DATA is valid currently as of February 2026, but is subject to change as the game progresses | |
| # UNLOCKS_DATA is a static dictionary where the key is the Unlocks type and the value is a collection of requirements | |
| # for each level. | |
| # The commented columns exist to help folk who are learning, or just for visualizing data at a quick glance. The 'Index' | |
| # is the index value of the requirements list, e.g. UNLOCKS_DATA[Unlocks.Cactus][2] is the second (2nd) index, which is | |
| # the requirements that need to be met to unlock the third (3rd) 'Level' of Unlocks.Cactus. | |
| # | |
| # The 'ResIdx' the index value of the resource for that given level. NOTE: When a level unlock requires more than | |
| # one resource, you can't index it because it's a dictionary - this is for visualization only. You'll need to iterate | |
| # over each using something like: 'for key in dict:' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| int myInt = 5; | |
| TestValue<float> testValue = new TestValue<float>(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyElement : VisualElement | |
| { | |
| static readonly CustomStyleProperty<int> k_CellSizeProperty = new CustomStyleProperty<int>("--cell-size"); | |
| static readonly CustomStyleProperty<Color> k_OddCellColorProperty = new CustomStyleProperty<Color>("--odd-cell-color"); | |
| static readonly CustomStyleProperty<Color> k_EvenCellColorProperty = new CustomStyleProperty<Color>("--even-cell-color"); | |
| int m_CellSize; | |
| Color m_OddCellColor; | |
| Color m_EvenCellColor; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| using UnityEditor.SceneManagement; | |
| // Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser). | |
| // This opens an empty scene with your prefab where you can edit it. | |
| // Put this script in your project as Assets/Editor/EditPrefab.cs | |
| public class EditPrefab { | |
| static Object getPrefab(Object selection) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| using UnityEditor.SceneManagement; | |
| using UnityEngine.SceneManagement; | |
| // From https://gist.github.com/JohannesDeml/5802473b569718c9c86de906b7039aec | |
| // Original https://gist.github.com/ulrikdamm/338392c3b0900de225ec6dd10864cab4 | |
| // Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser). | |
| // This opens an empty scene with your prefab where you can edit it. | |
| // Put this script in your project as Assets/Editor/EditPrefab.cs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| public static class ReflectiveEnumerator | |
| { | |
| /// <summary> | |
| /// Original class from StackExchange post | |
| /// https://stackoverflow.com/questions/5411694/get-all-inherited-classes-of-an-abstract-class/6944605#6944605 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RollingList<T> : List<T> | |
| { | |
| private int indexer = 0; | |
| private int maxIndexer; | |
| public RollingList() : base() | |
| { | |
| maxIndexer = this.Count; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Runtime.Serialization; | |
| using System.Security.Permissions; | |
| using System.Windows.Forms; | |
| namespace Xeph.Windows.Forms.ExtendedControls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| /// <summary> | |
| /// The MainCameraEllipticalMWE class provides motion of the camera in an ellipse (or a circle) | |
| /// given sizeX and sizeZ where one is the major axis and the other the minor axis. Which is | |
| /// which isn't important, and they can be equal (x == z) if the camera is to track in a circle. | |
| /// | |
| /// The size values assume a 2D surface where x=0, z=0 is at the bottom left and built in both x+ | |
| /// and z+ directions. |
NewerOlder