public static SingletonGame Instance() // get the instance (or create one if none exist) { if (_instance == null) { _instance = new SingletonGame(); boards = new List <ChessBoard>(); } return(_instance); }
void ToPlayScene() { Dictionary <string, bool> options = new Dictionary <string, bool>() { { "highlight", highlight }, { "rotate", rotate } }; SingletonGame.Instance().CreateBoard(8, 8, GameMode.Default, options); Hide(); }
void Awake() { Instance = this; //fx_blood = cam.GetComponent<CameraFilterPack_Vision_Blood>(); //fx_blood.HoleSize = 1; //fx_blood.HoleSmooth = 0; //fx_glitch = cam.GetComponent<CameraFilterPack_TV_Artefact>(); //fx_glitch.enabled = false; }
// called only once when scene is entered private void Awake() { CreateSpriteDictionary(); // store all the sprites into a dictionary variable SingletonGame.Instance(); }