private void Awake() { if (instance) { DestroyImmediate(gameObject); return; } instance = this; }
private void Awake() { animator = GetComponent <Animator>(); #if UNITY_EDITOR gmst = FindObjectOfType <GameStatics>(); #else gmst = GameStatics.Instance; #endif }
private void Start() { animator = GetComponent <Animator>(); spriteRenderer = GetComponent <SpriteRenderer>(); #if UNITY_EDITOR gmst = FindObjectOfType <GameStatics>(); #else gmst = GameStatics.Instance; #endif }
public void InitBoard() { if (!GameObject.Find(ConstantNames.Board)) { new GameObject(ConstantNames.Board); } #if UNITY_EDITOR gmst = FindObjectOfType <GameStatics>(); preload = FindObjectOfType <_preload>(); #else gmst = GameStatics.Instance; preload = _preload.Instance; #endif InitBoardItems(); InitFigureItems(); InitQueueFigureItems(); }