public EntityManager(int sizeX, int sizeY) { SizeX = sizeX; SizeY = sizeY; SizeZ = 3; Entities = new Entity[sizeX,sizeY,3]; }
public void SwapWith(Entity destinationEntity) { Entity startEntity = this; int startX = X; int startY = Y; int startZ = Z; int endX = destinationEntity.X; int endY = destinationEntity.Y; int endZ = destinationEntity.Z; startEntity.X = endX; startEntity.Y = endY; startEntity.Z = endZ; destinationEntity.X = startX; destinationEntity.Y = startY; destinationEntity.Z = startZ; Game.EntityManager[startX, startY, startZ] = destinationEntity; Game.EntityManager[endX, endY, endZ] = startEntity; }
public void Destroy(Entity e) { Alive = false; Game.EntityManager[X, Y, Z] = e; }