checkCurrentCellCode()
helper method to the LevelManager class:#region Helper Methods private static void checkCurrentCellCode() { string code = TileMap.CellCodeValue( TileMap.GetCellByPixel(player.WorldCenter)); if (code == "DEAD") { player.Kill(); } } #endregion
checkCurrentCellCode()
as the first task performed inside the if (!player.Dead)
statement in the Update()
method of the LevelManager class:checkCurrentCellCode();
18.191.236.174