// Use this for initialization void Start () { PuzzleBoard = ComponentContainer.PuzzleBoardController.PuzzleBoard; PuzzlePresentation = ComponentContainer.PuzzlePresentation; PuzzlePresentation.Instance.GemCellAdded += Grid_GemCellAdded; PuzzlePresentation.Instance.GemCellRemoved += Grid_GemCellRemoved; selectedGemCell = null; }
// Use this for initialization void Start() { PuzzleBoard = ComponentContainer.PuzzleBoardController.PuzzleBoard; PuzzlePresentation = ComponentContainer.PuzzlePresentation; PuzzlePresentation.Instance.GemCellAdded += Grid_GemCellAdded; PuzzlePresentation.Instance.GemCellRemoved += Grid_GemCellRemoved; selectedGemCell = null; }
void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } Instance = this; // Furthermore we make sure that we don't destroy between scenes (this is optional) DontDestroyOnLoad(gameObject); }