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); }
public static TileStruct Create(Type floor, Type enivornmentObj, Type obj) { return(new TileStruct( BaseObjectFacotry.Create(floor), BaseObjectFacotry.Create(enivornmentObj), BaseObjectFacotry.Create(obj) )); }
public static void UpdateEnvironment(this TileStruct tile, Type EnvironmentObj) { tile.environmentObject = BaseObjectFacotry.Create(EnvironmentObj); }
private static void UpdateObject(this TileStruct tile, Type obj) { tile.gameObject = BaseObjectFacotry.Create(obj); }
private static void UpdateFloor(this TileStruct tile, Type floor) { tile.floor = BaseObjectFacotry.Create(floor); }
private BuilderItemStruct createItem(Type item) { BaseObject obj = BaseObjectFacotry.Create(item); return(new BuilderItemStruct(item, obj.name, obj.GetTexure())); }