bubolo
 All Classes Namespaces Functions Variables Enumerator
Public Member Functions | List of all members
bubolo.net.NetworkCommand Interface Reference
Inheritance diagram for bubolo.net.NetworkCommand:

Public Member Functions

void execute (World world)
 

Detailed Description

A command that will be sent across the network to other users. The execute method will be called exactly once when it reaches the other player, so any processing (such as the creation of new Entities) should be performed in this method. NetworkCommand</clone>s must be immutable.

Author
BU CS673 - Clone Productions

Definition at line 15 of file NetworkCommand.java.

Member Function Documentation

void bubolo.net.NetworkCommand.execute ( World  world)

Called when this NetworkCommand reaches another player. Perform any processing, such as the creation of new Entities, into this method. Note that references on one machine will not be valid on another, so instead of using references directly, you should get a reference to an entity by using its UUID:

Entity entity = World.getEntity(id)

Because of this, most execute implementations will require at least the UUID of an object.

Parameters
worldreference to the world object. You can safely use this directly.