public override BaseTile Break() { if (_hideTileName == "") { return(base.Break()); } var newTile = GridLoader.CreateTile("NormalTile", this.ParentGrid, _hideTileName); return(newTile); }
//--------------------------------------------------------------------- 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); }
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)]; } }
public override BaseTile Elimination() { var newTile = GridLoader.CreateTile("NormalTile", this.ParentGrid, ""); return(newTile); }
//--------------------------- /// <summary> /// 毁掉格子块并用一个新的格子块替换 /// </summary> virtual public BaseTile Break() { var newTile = GridLoader.CreateTile("NormalTile", this.ParentGrid, ""); return(newTile); }