public class BehaviourMaker
extends java.lang.Object
Constructor and Description |
---|
BehaviourMaker(IStage stage)
Instantiates a new behaviour maker.
|
Modifier and Type | Method and Description |
---|---|
<Behaviour extends IBehaviour> |
addBehaviour(IItem item,
java.lang.Class<Behaviour> behaviourClass)
Adds the behaviour.
|
java.util.ArrayList<IBehaviour> |
getBehavior(IItem item,
java.lang.Class<? extends IBehaviour> behaviourClass)
Gets the behavior.
|
void |
removeBehavior(IItem item,
java.lang.Class<? extends IBehaviour> behaviourClass)
Removes the behavior.
|
public BehaviourMaker(IStage stage)
stage
- the stagepublic <Behaviour extends IBehaviour> Behaviour addBehaviour(IItem item, java.lang.Class<Behaviour> behaviourClass)
Behaviour
- the generic typeitem
- the itembehaviourClass
- the behaviour classpublic java.util.ArrayList<IBehaviour> getBehavior(IItem item, java.lang.Class<? extends IBehaviour> behaviourClass)
item
- the itembehaviourClass
- the behaviour classpublic void removeBehavior(IItem item, java.lang.Class<? extends IBehaviour> behaviourClass)
item
- the itembehaviourClass
- the behaviour class