private void RaiseOnBoardLoaded(BoardDef board) { if (OnBoardLoaded != null) { OnBoardLoaded(board); } }
public void ShowLevel(BoardDef boardDef) { ClearMovableTiles(); for (int x = 0; x < boardDef.w; ++x) { for (int y = 0; y < boardDef.h; ++y) { CreateMovableTile(x, y, boardDef.GetTile(x, y)); } } }
void OnLevelLoaded(LevelDef level) { _boardDef = level.board; // Raise an event for the board inside this level. This is a useful indirection because the undo system will use boards. RaiseOnBoardLoaded(level.board); }
private void OnBoardLoaded(BoardDef boardDef) { ShowLevel(boardDef); }