be.saltwater.jaqel.level
Class Level
java.lang.Object
be.saltwater.jaqel.level.Level
- public class Level
- extends java.lang.Object
Created to contain CreatureSharedData when a game/session has ended and everything is destroyed. An identity is saved to a file by the user as a "user profile", which also contains the last game level he has completed.
- Author:
- Robin Wittevrongel, Bruno Windels
- See Also:
CreatureSharedData
|
Constructor Summary |
Level(Maze maze,
java.lang.String name,
int number)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MONSTER_RANGE
public static final int MONSTER_RANGE
- See Also:
- Constant Field Values
MAGIC_ATTACK_RANGE
public static final int MAGIC_ATTACK_RANGE
- See Also:
- Constant Field Values
Level
public Level(Maze maze,
java.lang.String name,
int number)
getMaze
public Maze getMaze()
getCreatureActionScheduler
public CreatureActionScheduler getCreatureActionScheduler()
- Return the action scheduler of the level.
- See Also:
CreatureActionScheduler
addCreature
public void addCreature(Creature c)
removeCreature
public void removeCreature(Creature c)
removeCreatureFromSceneGraph
protected void removeCreatureFromSceneGraph(Creature c)
getLocationTransformGroup
public javax.media.j3d.TransformGroup getLocationTransformGroup(Creature c)
getPathFinder
public PathFinder getPathFinder()
getViewTransformGroup
public javax.media.j3d.TransformGroup getViewTransformGroup()
getCanvas3D
public javax.media.j3d.Canvas3D getCanvas3D()
tileSelected
protected void tileSelected(java.awt.Point p)
tileConfirmed
protected void tileConfirmed(java.awt.Point p)
getDistanceToCreature
public double getDistanceToCreature(Creature from,
Creature to)
endCurrentTurn
public void endCurrentTurn()
- called by CreatureActionScheduler when the queue is empty and Creature.getTurnFinished returns true
getNavigationBehavior
public NavigationBehavior getNavigationBehavior()
getHeroCount
public int getHeroCount()
getHero
public Hero getHero(int index)
getMonsterCount
public int getMonsterCount()
getMonster
public Monster getMonster(int index)
getHeroAtLocation
public Hero getHeroAtLocation(java.awt.Point where)
getMonsterAtLocation
public Monster getMonsterAtLocation(java.awt.Point where)
addPotion
public void addPotion(Potion p)
getPotionAtLocation
public Potion getPotionAtLocation(java.awt.Point where)
getPotion
public Potion getPotion(int index)
getPotionCount
public int getPotionCount()
removePotion
public void removePotion(Potion p)
getNumber
public int getNumber()
updateMiniMap
public void updateMiniMap()
getCreatureAtLocation
public Creature getCreatureAtLocation(java.awt.Point where)
heroesWon
public void heroesWon()
start
public void start()
destroy
public void destroy()
- Shut down java3D for this level. Call this method with great care. If you are calling this method from within a java3D thread (which is almost always the case in Jaqel) , execution in the current thread is not guaranteed after calling this method. Before calling this method. The canvas3D should be removed from it's container.