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();
        }
Пример #2
0
        private void Awake()
        {
            if (instance)
            {
                DestroyImmediate(gameObject);
                return;
            }
            instance = this;

            Call_hash  = Animator.StringToHash("call");
            Call2_hash = Animator.StringToHash("call2");
            Back_hash  = Animator.StringToHash("back");
            Kill_hash  = Animator.StringToHash("kill");

            DontDestroyOnLoad(gameObject);
            SceneManager.activeSceneChanged += InitMenu_;
            SceneManager.LoadScene(1);
        }