More work on object tiles. Revamped isometric scene rendering to
gather dirty sprites and objects and render after base and fringe tile layers. Add shadow tiles in the footprint of objects to make them impassable. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@460 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// $Id: ShadowTile.java,v 1.1 2001/10/13 01:08:59 shaper Exp $
|
||||
|
||||
package com.threerings.miso.tile;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Shape;
|
||||
|
||||
/**
|
||||
* The shadow tile extends miso tile to provide an always-impassable
|
||||
* tile that has no display image. Shadow tiles are intended for
|
||||
* placement in the footprint of {@link ObjectTile} objects.
|
||||
*/
|
||||
public class ShadowTile extends MisoTile
|
||||
{
|
||||
/** Single instantiation of shadow tile for re-use in scenes. */
|
||||
public static ShadowTile TILE = new ShadowTile();
|
||||
|
||||
/**
|
||||
* Constructs a shadow tile.
|
||||
*/
|
||||
public ShadowTile ()
|
||||
{
|
||||
super(SHADOW_TSID, SHADOW_TID);
|
||||
|
||||
// shadow tiles are always impassable
|
||||
passable = false;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void paint (Graphics2D gfx, Shape dest)
|
||||
{
|
||||
// paint nothing as we're naught but a measly shadow of a tile
|
||||
}
|
||||
|
||||
/** The shadow tile set id. */
|
||||
protected static final int SHADOW_TSID = -1;
|
||||
|
||||
/** The shadow tile id. */
|
||||
protected static final int SHADOW_TID = -1;
|
||||
}
|
||||
Reference in New Issue
Block a user