Esempio n. 1
0
        public override BaseTile Break()
        {
            if (_hideTileName == "")
            {
                return(base.Break());
            }

            var newTile = GridLoader.CreateTile("NormalTile", this.ParentGrid, _hideTileName);

            return(newTile);
        }
Esempio n. 2
0
        //---------------------------------------------------------------------
        public bool Load(string areaName, string levelName)
        {
            _currectArea  = areaName;
            _currectLevel = levelName;

            zeroOffset = Vector3.zero;

            _zeroPoint = GameObject.Find("ZeroPoint")?.transform;
            var ret = GridLoader.LoadGrid(_currectArea, _currectLevel, out rowStartGrids, out colStartGrids, out gridArray);

            blockMap = new int[gridArray.GetLength(0), gridArray.GetLength(1)];

            return(ret);
        }
Esempio n. 3
0
        public void RestartLevel()
        {
            if (_currectLevel != null && _currectArea != null)
            {
                for (var i = 0; i < gridArray.GetLength(0); ++i)
                {
                    for (var j = 0; j < gridArray.GetLength(0); ++j)
                    {
                        gridArray[i, j].AttachTile?.Delete();
                    }
                }

                zeroOffset = Vector3.zero;

                _zeroPoint = GameObject.Find("ZeroPoint")?.transform;
                GridLoader.LoadGrid(_currectArea, _currectLevel, out rowStartGrids, out colStartGrids, out gridArray);

                blockMap = new int[gridArray.GetLength(0), gridArray.GetLength(1)];
            }
        }
Esempio n. 4
0
        public override BaseTile Elimination()
        {
            var newTile = GridLoader.CreateTile("NormalTile", this.ParentGrid, "");

            return(newTile);
        }
Esempio n. 5
0
        //---------------------------
        /// <summary>
        /// 毁掉格子块并用一个新的格子块替换
        /// </summary>
        virtual public BaseTile Break()
        {
            var newTile = GridLoader.CreateTile("NormalTile", this.ParentGrid, "");

            return(newTile);
        }