Package games.stendhal.client
Class GameObjects
java.lang.Object
games.stendhal.client.GameObjects
- All Implemented Interfaces:
RPObjectChangeListener
,Iterable<IEntity>
stores the objects that exists on the World right now.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface for objects that need to follow new top level entities being added to, or removed from the current zone. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new game GameObjectListener.boolean
static GameObjects
createInstance(StaticGameLayers collisionMap)
get(RPObject.ID id)
static GameObjects
iterator()
void
An object was added.void
onChangedAdded(RPObject object, RPObject changes)
The object added/changed attribute(s).void
onChangedRemoved(RPObject object, RPObject changes)
An object removed attribute(s).void
An object was removed.void
onSlotAdded(RPObject object, String slotName, RPObject sobject)
A slot object was added.void
onSlotChangedAdded(RPObject object, String slotName, RPObject sobject, RPObject schanges)
A slot object added/changed attribute(s).void
onSlotChangedRemoved(RPObject object, String slotName, RPObject sobject, RPObject schanges)
A slot object removed attribute(s).void
onSlotRemoved(RPObject object, String slotName, RPObject sobject)
A slot object was removed.void
Remove a GameObjectListener.void
update(int delta)
Update objects based on the lapsus of time ellapsed since the last call.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
createInstance
- Parameters:
collisionMap
- =layers that make floor and building- Returns:
- singleton instance of GameOjects
-
getInstance
- Returns:
- existing instance of GameObjects
-
addGameObjectListener
Add a new game GameObjectListener.- Parameters:
listener
-
-
removeGameObjectListener
Remove a GameObjectListener.- Parameters:
listener
-
-
iterator
-
get
-
get
-
collides
-
update
public void update(int delta)Update objects based on the lapsus of time ellapsed since the last call.- Parameters:
delta
- The time since last update (in ms).
-
onAdded
An object was added.- Specified by:
onAdded
in interfaceRPObjectChangeListener
- Parameters:
object
- The object.
-
onChangedAdded
The object added/changed attribute(s).- Specified by:
onChangedAdded
in interfaceRPObjectChangeListener
- Parameters:
object
- The base object.changes
- The changes.
-
onChangedRemoved
An object removed attribute(s).- Specified by:
onChangedRemoved
in interfaceRPObjectChangeListener
- Parameters:
object
- The base object.changes
- The changes.
-
onRemoved
An object was removed.- Specified by:
onRemoved
in interfaceRPObjectChangeListener
- Parameters:
object
- The object.
-
onSlotAdded
A slot object was added.- Specified by:
onSlotAdded
in interfaceRPObjectChangeListener
- Parameters:
object
- The container object.slotName
- The slot name.sobject
- The slot object.
-
onSlotChangedAdded
public void onSlotChangedAdded(RPObject object, String slotName, RPObject sobject, RPObject schanges)A slot object added/changed attribute(s).- Specified by:
onSlotChangedAdded
in interfaceRPObjectChangeListener
- Parameters:
object
- The base container object.slotName
- The container's slot name.sobject
- The slot object.schanges
- The slot object changes.
-
onSlotChangedRemoved
public void onSlotChangedRemoved(RPObject object, String slotName, RPObject sobject, RPObject schanges)A slot object removed attribute(s).- Specified by:
onSlotChangedRemoved
in interfaceRPObjectChangeListener
- Parameters:
object
- The base container object.slotName
- The container's slot name.sobject
- The slot object.schanges
- The slot object changes.
-
onSlotRemoved
A slot object was removed.- Specified by:
onSlotRemoved
in interfaceRPObjectChangeListener
- Parameters:
object
- The container object.slotName
- The slot name.sobject
- The slot object.
-