private static bool FindStartPoint(out int x1, out int y1, Map map, int direction) { return(map.FindCell(out x1, out y1, cell => { string enemyName = cell.EnemyName; if (enemyName == GameConsts.ENEMY_NONE) { return false; } Enemy enemy = EnemyCatalog.Create(enemyName, -1, -1); return enemy is Enemy_スタート地点 && ((Enemy_スタート地点)enemy).Direction == direction; })); }
private void ReloadEnemies() { this.Enemies.Clear(); for (int x = 0; x < this.Map.W; x++) { for (int y = 0; y < this.Map.H; y++) { string enemyName = this.Map.Table[x, y].EnemyName; if (enemyName != GameConsts.ENEMY_NONE) { this.Enemies.Add(EnemyCatalog.Create( this.Map.Table[x, y].EnemyName, x * GameConsts.TILE_W + GameConsts.TILE_W / 2.0, y * GameConsts.TILE_H + GameConsts.TILE_H / 2.0 )); } } } }