This file contains 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
# I wrote these mappings when I wanted to migrate from using PuTTY to using | |
# Windows Terminal. Originally, all of my TinTin++ numpad macros were broken | |
# because the numpad acts differently in WT by default. These remappings | |
# make the keypad act like it did in PuTTY. | |
# | |
# This has only been tested for TinTin++. I don't really use the keypad in other | |
# programs, so I don't know if this breaks the functionality elsewhere. | |
# | |
# In Windows Terminal, open the Settings tab. In the lower left, you | |
# can 'Open JSON File'. Add the following lines to the 'actions' section. |
This file contains 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 System.Collections.Generic; | |
public class RandomizedObjectPool : MonoBehaviour | |
{ | |
public GameObject[] objectPrefabs; | |
public int initObjectAmount; | |
private List<GameObject> objectPool = new List<GameObject>(); | |
private void Start() |
This file contains 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
/// <summary> | |
/// This is used for when we're working with an object pool that has | |
/// a variety of randomized objects and is not seeing frequent heavy use. | |
/// | |
/// For cases where the object pool has randomized elements (such as | |
/// enemies with different stats), working with that pool has the | |
/// possibility of just returning the same exact object every time we | |
/// request an object from it. For random spawns, we don't want this. | |
/// | |
/// Shuffle is used to randomly reorder an object pool so that this doesn't |
This file contains 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; | |
/// <summary> | |
/// Quickly turns any Unity MonoBehaviour into a singleton. | |
/// | |
/// Example of how to implement. Change the class declaration at the top | |
/// of a new Unity C# script to look similar to this ('SpawnManager' is | |
/// just an example, it should be whatever you've named the class): | |
/// | |
/// public class SpawnManager : MonoSingleton<SpawnManager> |