| Package | org.ffilmation.engine.interfaces |
| Interface | public interface fEngineMaterial |
| Method | Defined by | ||
|---|---|---|---|
|
fEngineMaterial(definition:fMaterialDefinition)
Constructor
| fEngineMaterial | ||
|
dispose():void
Frees all allocated resources for this material.
| fEngineMaterial | ||
|
getBump(element:fRenderableElement, width:Number, height:Number):DisplayObject
Retrieves the bump map for this material.
| fEngineMaterial | ||
|
getContours(element:fRenderableElement, width:Number, height:Number):Array
Retrieves an array of contours that define the shape of this material.
| fEngineMaterial | ||
|
getDiffuse(element:fRenderableElement, width:Number, height:Number):DisplayObject
Retrieves the diffuse map for this material.
| fEngineMaterial | ||
|
getHoleBlock(element:fRenderableElement, index:Number):MovieClip
Retrieves the graphic element that is to be used to block a given hole when it is closed
| fEngineMaterial | ||
|
getHoles(element:fRenderableElement, width:Number, height:Number):Array
Retrieves an array of holes (if any) of this material.
| fEngineMaterial | ||
| dispose | () | method |
public function dispose():voidFrees all allocated resources for this material. It is called when the scene is destroyed and we want to free as much RAM as possible
| getBump | () | method |
public function getBump(element:fRenderableElement, width:Number, height:Number):DisplayObjectRetrieves the bump map for this material. If you write custom classes, make sure they return the proper size 0,0 of the returned DisplayObject corresponds to the top-left corner of material
Parameterselement:fRenderableElement — The element( wall or floor ) where this map will be applied
|
|
width:Number — Requested width
|
|
height:Number — Requested height
|
DisplayObject — A DisplayObject (either Bitmap or MovieClip) that will used as BumpMap. If it is a MovieClip, the first frame will we used
|
| getContours | () | method |
public function getContours(element:fRenderableElement, width:Number, height:Number):ArrayRetrieves an array of contours that define the shape of this material. Every contours is an Array of Points
Parameterselement:fRenderableElement — The element( wall or floor ) where the holes will be applied
|
|
width:Number — Requested width
|
|
height:Number — Requested height
|
Array — An array of arrays of points, one for each contour. Positions and sizes are relative to material origin of coordinates
|
| getDiffuse | () | method |
public function getDiffuse(element:fRenderableElement, width:Number, height:Number):DisplayObjectRetrieves the diffuse map for this material. If you write custom classes, make sure they return the proper size. 0,0 of the returned DisplayObject corresponds to the top-left corner of material
Parameterselement:fRenderableElement — The element( wall or floor ) where this map will be applied
|
|
width:Number — Requested width
|
|
height:Number — Requested width
|
DisplayObject — A DisplayObject (either Bitmap or MovieClip) that will be display onscreen
|
| getHoleBlock | () | method |
public function getHoleBlock(element:fRenderableElement, index:Number):MovieClipRetrieves the graphic element that is to be used to block a given hole when it is closed
Parameterselement:fRenderableElement — The element( wall or floor ) where the block will be applied
|
|
index:Number — The hole index, as returned by the getHoles() method
|
MovieClip — A MovieClip that will used to close the hole. If null is returned, the hole won't be "closeable".
|
| getHoles | () | method |
public function getHoles(element:fRenderableElement, width:Number, height:Number):ArrayRetrieves an array of holes (if any) of this material. These holes will be used to render proper lights and calculate collisions and bullet impacts
Parameterselement:fRenderableElement — The element( wall or floor ) where the holes will be applied
|
|
width:Number — Requested width
|
|
height:Number — Requested height
|
Array — An array of Rectangle objects, one for each hole. Positions and sizes are relative to material origin of coordinates
|