edu.trinity.cs.gamecore.basic
Class BasicBlock1

java.lang.Object
  extended by edu.trinity.cs.gamecore.basic.BasicBlock
      extended by edu.trinity.cs.gamecore.basic.BasicBlock1
All Implemented Interfaces:
Block<BasicBlock,BasicEntity>, java.io.Serializable

public class BasicBlock1
extends BasicBlock

This was just another sample block.

Author:
Mark Lewis
See Also:
Serialized Form

Constructor Summary
BasicBlock1()
           
 
Method Summary
 java.awt.Container getEditPropertiesPanel()
          This method returns a panel that should be set up so that users can edit the properties of this block.
 java.awt.Image getImage()
          This returns the image that should be drawn for this block.
 Location<BasicBlock,BasicEntity> getLinkLocation()
          Returns the location that this block links to.
 void setLinkLocation(Location<BasicBlock,BasicEntity> linkLocation)
          Sets the location that this block links to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicBlock1

public BasicBlock1()
Method Detail

getImage

public java.awt.Image getImage()
Description copied from interface: Block
This returns the image that should be drawn for this block. What is returned will be scaled to the size of one block for drawing. Note that blocks will not properly display animations.

Specified by:
getImage in interface Block<BasicBlock,BasicEntity>
Overrides:
getImage in class BasicBlock
Returns:
The image that is to be drawn for this block.

getEditPropertiesPanel

public java.awt.Container getEditPropertiesPanel()
Description copied from interface: Block
This method returns a panel that should be set up so that users can edit the properties of this block. Block properties can be used to reduce the number of block types that you create if you have many blocks in your game that server very similar functions. The returned value can be any java.awt.Container though I recommend that you use javax.swing.JPanel. The properties for blocks don't have to include link locations because the screen editor handles those in another way.

Specified by:
getEditPropertiesPanel in interface Block<BasicBlock,BasicEntity>
Overrides:
getEditPropertiesPanel in class BasicBlock
Returns:
A Container with a GUI set up for editing properties. If there are no editable properties it should return null.

getLinkLocation

public Location<BasicBlock,BasicEntity> getLinkLocation()
Description copied from interface: Block
Returns the location that this block links to. When an entity that follows links moves onto a block with a link it will be "transported" to that location. If a given type of block should never have a link from it, this can simply return null.

Specified by:
getLinkLocation in interface Block<BasicBlock,BasicEntity>
Overrides:
getLinkLocation in class BasicBlock
Returns:
The location this block links to or null if no link.

setLinkLocation

public void setLinkLocation(Location<BasicBlock,BasicEntity> linkLocation)
Description copied from interface: Block
Sets the location that this block links to. Some blocks can ignore this if they don't support linking.

Specified by:
setLinkLocation in interface Block<BasicBlock,BasicEntity>
Overrides:
setLinkLocation in class BasicBlock
Parameters:
linkLocation - The location the block should link to.