Added a class to map object ids so they can be called by name
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:wolf_dart/classes/matrix.dart';
|
||||
import 'package:wolf_dart/features/entities/map_objects.dart';
|
||||
|
||||
class Pushwall {
|
||||
int x;
|
||||
@@ -24,8 +25,7 @@ class PushwallManager {
|
||||
|
||||
for (int y = 0; y < objectGrid.length; y++) {
|
||||
for (int x = 0; x < objectGrid[y].length; x++) {
|
||||
// Map ID 98 in the object grid marks a pushwall!
|
||||
if (objectGrid[y][x] == 98) {
|
||||
if (objectGrid[y][x] == MapObjectId.secretDoor) {
|
||||
pushwalls['$x,$y'] = Pushwall(x, y, wallGrid[y][x]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user