예제 #1
0
 private void Awake()
 {
     if (instance)
     {
         DestroyImmediate(gameObject);
         return;
     }
     instance = this;
 }
예제 #2
0
        private void Awake()
        {
            animator = GetComponent <Animator>();

#if UNITY_EDITOR
            gmst = FindObjectOfType <GameStatics>();
#else
            gmst = GameStatics.Instance;
#endif
        }
예제 #3
0
        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();
        }