示例#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);
        }
示例#2
0
 public static TileStruct Create(Type floor, Type enivornmentObj, Type obj)
 {
     return(new TileStruct(
                BaseObjectFacotry.Create(floor),
                BaseObjectFacotry.Create(enivornmentObj),
                BaseObjectFacotry.Create(obj)
                ));
 }
示例#3
0
 public static void UpdateEnvironment(this TileStruct tile, Type EnvironmentObj)
 {
     tile.environmentObject = BaseObjectFacotry.Create(EnvironmentObj);
 }
示例#4
0
 private static void UpdateObject(this TileStruct tile, Type obj)
 {
     tile.gameObject = BaseObjectFacotry.Create(obj);
 }
示例#5
0
 private static void UpdateFloor(this TileStruct tile, Type floor)
 {
     tile.floor = BaseObjectFacotry.Create(floor);
 }
示例#6
0
        private BuilderItemStruct createItem(Type item)
        {
            BaseObject obj = BaseObjectFacotry.Create(item);

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