(RECOMMENDED) Download Visual Studio Code: https://code.visualstudio.com/download
(RECOMMENDED) Download the latest release of Quest Script LSP extension for VSCODE: https://github.com/DevEarley/Quest-Script-Language/releases
(RECOMMENDED) Download Visual Studio Code: https://code.visualstudio.com/download
(RECOMMENDED) Download the latest release of Quest Script LSP extension for VSCODE: https://github.com/DevEarley/Quest-Script-Language/releases
1.1.6 | |
enum LOCATION_ID{ | |
UNDECIDED = -1, | |
SUNFIRE=0, | |
MUCKTHORN=1, | |
STEELHAVEN=2, | |
EMERALD_TOWERS=3, | |
DEEP_SPACE=4, | |
THE_VEIL=5, |
_,.---._ ,----. ,-,--. ,--.--------.
,-.' - , `. .--.-. .-.-. ,-.--` , \ ,-.'- _\/==/, - , -\
/==/ , - \ /==/ -|/=/ ||==|- _.-`/==/_ ,_.'\==\.-. - ,-./
|==| - .=. , ||==| ,||=| -||==| `.-.\==\ \ `--`\==\- \
|==| : ;=: - ||==|- | =/ /==/_ , / \==\ -\ \==\_ \
|==|, '=' , ||==|, \/ - |==| .-' _\==\ ,\ |==|- |
\==\ _ - ;|==|- , /==|_ ,`-._/==/\/ _ | |==|, |
'.='. , ; -\/==/ , _ .'/==/ , /\==\ - , / /==/ -/
`--`--'' `--`--`..---' `--`-----`` `--`---' `--`--`
public class RNGController : MonoBehaviour | |
{ | |
private int index = 0; | |
private int lastLargestIndex = 0; | |
private int max_index = 1000; | |
private List <int> values = new List<int>(); | |
public int Next(int RNG_ID) | |
{ | |
var offsetIndex = RNG_ID + index; |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public enum CommonScreenResolutions | |
{ | |
gameConsole_16bit_pocket_10x9, //160 × 144 160∶144 10:9 1∶1 | |
gameConsole_16bit_low_4x3, //256 × 224 256∶224 4∶3 7∶6 | |
gameConsole_16bit_super_4x3, //400 × 300 4∶3 4∶3 1∶1 | |
gameConsole_32bit_low_4x3, //256 × 224 256∶224 4∶3 7∶6 |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
public enum InputControllerState | |
{ | |
NO_INPUT_DEVICE_CONNECTED, | |
NO_CONTROLLER_CONNECTED, | |
NO_KEYBOARD_CONNECTED, | |
BOTH_KEYBOARD_AND_CONTROLLER_CONNECTED |
Using the Service Locator pattern in Unity allows you connect various services together to a single source. When a script needs access to something on the Service Locator, it just needs to access the Service Locators's Instance
. This instance will have any service the invoker may need.
To setup, the service must be referenced in the script and the script must find these services on Awake
. You can look them up by the GameObject they are attached to or attach them to the Service Locator's GO. In this example, I use GetComponentInChildren<T>()
. Alternatively you can search for the GameObject by name and then get the component, PlayerController = GameObject.Find("PlayerController").GetComponent<PlayerController>();