Beispiel #1
0
        public static Pos MoveObject(this GridStruct grid, int x, int y, Move direction)
        {
            Pos newPos = GetNewLocation(x, y, direction);

            grid.GetTile(newPos.x, newPos.y).gameObject = grid.GetTile(x, y).gameObject;
            grid.GetTile(x, y).gameObject = BaseObjectFacotry.Create(Blocks.EMPTY);
            return(newPos);
        }
Beispiel #2
0
 public static TileStruct Create(Type floor, Type enivornmentObj, Type obj)
 {
     return(new TileStruct(
                BaseObjectFacotry.Create(floor),
                BaseObjectFacotry.Create(enivornmentObj),
                BaseObjectFacotry.Create(obj)
                ));
 }
Beispiel #3
0
 public static void UpdateEnvironment(this TileStruct tile, Type EnvironmentObj)
 {
     tile.environmentObject = BaseObjectFacotry.Create(EnvironmentObj);
 }
Beispiel #4
0
 private static void UpdateObject(this TileStruct tile, Type obj)
 {
     tile.gameObject = BaseObjectFacotry.Create(obj);
 }
Beispiel #5
0
 private static void UpdateFloor(this TileStruct tile, Type floor)
 {
     tile.floor = BaseObjectFacotry.Create(floor);
 }
Beispiel #6
0
        private BuilderItemStruct createItem(Type item)
        {
            BaseObject obj = BaseObjectFacotry.Create(item);

            return(new BuilderItemStruct(item, obj.name, obj.GetTexure()));
        }