zplax.skin
Interface LavaSkin


public interface LavaSkin

Implementations of this interface are used for the geometry and appearance of the Lava in Zplax! The lava should be about radius 30 on the x and z axis and radius 8 on the y axis. Whatever geometry you create it should be placed in a transform group that is returned in the getLava method. You are free to apply any transform you want to the transform group as it is not altered further. Rather it is added to a seperate transform group in the main application. When the game is not playing the Lava sits at (0,-10,0). When the game starts it moves to (0,0,0). When the game finishes it moves to (0,0,0)


Method Summary
 void gameLost(long currentTime)
          Called once when the game is lost.
 com.xith3d.scenegraph.TransformGroup getLava()
          This method is called once when the skin is loaded.
 void reset()
          Called once at the start of the game.
 void update(long currentTime)
          This method is called once each frame.
 

Method Detail

getLava

public com.xith3d.scenegraph.TransformGroup getLava()
This method is called once when the skin is loaded. The returned TransformGroup is added directly to the scene.

Returns:
A TransformGroup containing the lava.

update

public void update(long currentTime)
This method is called once each frame.

Parameters:
currentTime - The time in nanoseconds. Note that this is not some absolute time, rather it is relative to previous currentTime's passed.

gameLost

public void gameLost(long currentTime)
Called once when the game is lost. Use this method to do something to the lava when the water runs out and the game is lost.

Parameters:
currentTime - The time in nanoseconds. Note that this is not some absolute time, rather it is relative to previous and future currentTime's passed in the update method.

reset

public void reset()
Called once at the start of the game. Use this to reset what ever ended up happening to the lava after game lost



Copyright © 2005 Alistair Dickie. All Rights Reserved.

Alistair Dickie - See http://zplax.alistairdickie.com for contact details and more information.