• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*******************************************************************************
2  * Copyright 2011 See AUTHORS file.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *   http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************/
16 
17 package com.badlogic.gdx.maps.tiled;
18 
19 import com.badlogic.gdx.graphics.g2d.TextureRegion;
20 import com.badlogic.gdx.maps.MapProperties;
21 
22 /** @brief Generalises the concept of tile in a TiledMap */
23 public interface TiledMapTile {
24 
25 	public enum BlendMode {
26 		NONE, ALPHA
27 	}
28 
getId()29 	public int getId ();
30 
setId(int id)31 	public void setId (int id);
32 
33 	/** @return the {@link BlendMode} to use for rendering the tile */
getBlendMode()34 	public BlendMode getBlendMode ();
35 
36 	/** Sets the {@link BlendMode} to use for rendering the tile
37 	 *
38 	 * @param blendMode the blend mode to use for rendering the tile */
setBlendMode(BlendMode blendMode)39 	public void setBlendMode (BlendMode blendMode);
40 
41 	/** @return texture region used to render the tile */
getTextureRegion()42 	public TextureRegion getTextureRegion ();
43 
44 	/** Sets the texture region used to render the tile */
setTextureRegion(TextureRegion textureRegion)45 	public void setTextureRegion(TextureRegion textureRegion);
46 
47 	/** @return the amount to offset the x position when rendering the tile */
getOffsetX()48 	public float getOffsetX();
49 
50 	/** Set the amount to offset the x position when rendering the tile */
setOffsetX(float offsetX)51 	public void setOffsetX(float offsetX);
52 
53 	/** @return the amount to offset the y position when rendering the tile */
getOffsetY()54 	public float getOffsetY();
55 
56 	/** Set the amount to offset the y position when rendering the tile */
setOffsetY(float offsetY)57 	public void setOffsetY(float offsetY);
58 
59 	/** @return tile's properties set */
getProperties()60 	public MapProperties getProperties ();
61 
62 }
63