public class SceneObject extends Object
| Modifier and Type | Field and Description |
|---|---|
Rectangle |
bounds
The screen coordinate bounds of our object tile given its position
in the scene.
|
ObjectInfo |
info
The object's info record.
|
ObjectTile |
tile
The object tile used to display this object.
|
| Constructor and Description |
|---|
SceneObject(MisoSceneMetrics metrics,
ObjectInfo info,
ObjectTile tile)
Creates a scene object for display according to the supplied metrics.
|
SceneObject(MisoSceneMetrics metrics,
TileManager mgr,
TileSet.Colorizer colorizer,
ObjectInfo info) |
SceneObject(MisoScenePanel panel,
ObjectInfo info)
Creates a scene object for display by the specified panel.
|
SceneObject(MisoScenePanel panel,
ObjectInfo info,
ObjectTile tile)
Creates a scene object for display by the specified panel.
|
| Modifier and Type | Method and Description |
|---|---|
Polygon |
getObjectFootprint()
Returns a polygon bounding all footprint tiles of this scene
object.
|
Point |
getObjectScreenSpot()
Returns the location associated with this object's "spot" in screen
coordinates or null if it has no spot.
|
Point |
getObjectSpot()
Returns the location associated with this object's "spot" in fine
coordinates or null if it has no spot.
|
int |
getPriority()
Returns the render priority of this scene object.
|
boolean |
objectFootprintOverlaps(Rectangle rect)
Returns true if this object's footprint overlaps the supplied tile
coordinate rectangle.
|
boolean |
objectFootprintOverlaps(SceneObject so)
Returns true if this object's footprint overlaps that of the
specified other object.
|
void |
paint(Graphics2D gfx)
Requests that this scene object render itself.
|
void |
refreshObjectTile(MisoSceneMetrics metrics,
TileManager mgr,
TileSet.Colorizer colorizer)
Reloads and recolorizes our object tile.
|
void |
refreshObjectTile(MisoScenePanel panel)
Reloads and recolorizes our object tile.
|
void |
relocateObject(MisoSceneMetrics metrics,
int tx,
int ty)
Updates this object's origin tile coordinate.
|
boolean |
setHovered(boolean hovered)
Informs this scene object that the mouse is now hovering over it.
|
void |
setPriority(byte priority)
Overrides the render priority of this object.
|
void |
setWarning(boolean warning)
Used to flag overlapping scene objects that have no resolving
object priorities.
|
String |
toString() |
public ObjectInfo info
public ObjectTile tile
public Rectangle bounds
public SceneObject(MisoScenePanel panel, ObjectInfo info)
public SceneObject(MisoSceneMetrics metrics, TileManager mgr, TileSet.Colorizer colorizer, ObjectInfo info)
public SceneObject(MisoScenePanel panel, ObjectInfo info, ObjectTile tile)
public SceneObject(MisoSceneMetrics metrics, ObjectInfo info, ObjectTile tile)
public void setWarning(boolean warning)
public void paint(Graphics2D gfx)
public Point getObjectSpot()
public Point getObjectScreenSpot()
public boolean objectFootprintOverlaps(SceneObject so)
public boolean objectFootprintOverlaps(Rectangle rect)
public Polygon getObjectFootprint()
public int getPriority()
public void setPriority(byte priority)
public boolean setHovered(boolean hovered)
public void relocateObject(MisoSceneMetrics metrics, int tx, int ty)
public void refreshObjectTile(MisoScenePanel panel)
ObjectInfo's
tileId and call this method or things might break.public void refreshObjectTile(MisoSceneMetrics metrics, TileManager mgr, TileSet.Colorizer colorizer)
ObjectInfo's
tileId and call this method or things might break.Copyright © 2015. All rights reserved.