private Tile CreateEnemy(Vector3 position) { PathMoveTile enemy = (PathMoveTile)drawnActors["EnemyTile"]; enemy = enemy.Clone() as PathMoveTile; enemy?.InitializeCollision(position, 0.7f); if (enemy != null) { enemy.ID += id++; } objectManager.Add(enemy); return(enemy); }
private Tile CreateDoorTile(Vector3 position) { PathMoveTile doorTile = (PathMoveTile)drawnActors["DoorTile"]; doorTile = doorTile.Clone() as PathMoveTile; doorTile?.InitializeCollision(position, 0.9f); if (doorTile != null) { doorTile.ID += id++; } objectManager.Add(doorTile); return(doorTile); }