Photon Server API
Public Member Functions | Protected Member Functions | Properties | List of all members
Photon.MmoDemo.Server.Item Class Reference

Represents an entity in a world. More...

Inheritance diagram for Photon.MmoDemo.Server.Item:

Public Member Functions

 Item (Vector position, Vector rotation, Hashtable properties, MmoActorOperationHandler owner, string id, byte type, World world)
 
void Destroy ()
 
void UpdateInterestManagement ()
 Publishes a ItemPositionMessage in the PositionUpdateChannel Subscribes and unsubscribes regions if changed. More...
 
void SetProperties (Hashtable propertiesSet, ArrayList propertiesUnset)
 Updates the Properties and increments the PropertiesRevision. More...
 
void Dispose ()
 
void Move (Vector position)
 Moves the item. More...
 
void Spawn (Vector position)
 Spawns the item. More...
 
bool GrantWriteAccess (MmoActorOperationHandler actor)
 Checks wheter the actor is allowed to change the item. More...
 

Protected Member Functions

ItemPositionMessage GetPositionUpdateMessage (Vector position)
 Creates an ItemPositionMessage with the current position. More...
 
virtual void Dispose (bool disposing)
 Publishes a ItemDisposedMessage through the DisposeChannel and disposes all channels. More...
 
void OnDestroy ()
 Publishes event ItemDestroyed in the Item.EventChannel. More...
 

Properties

IFiber Fiber [get]
 
Region CurrentWorldRegion [get]
 
MessageChannel< ItemDisposedMessageDisposeChannel [get]
 
bool Disposed [get]
 
MessageChannel< ItemEventMessageEventChannel [get]
 
string Id [get]
 
MmoActorOperationHandler Owner [get]
 
Vector Rotation [get, set]
 
Vector Position [get, set]
 
MessageChannel< ItemPositionMessagePositionUpdateChannel [get]
 
Hashtable Properties [get]
 
int PropertiesRevision [get, set]
 
byte Type [get]
 
World World [get]
 

Detailed Description

Represents an entity in a world.

Items are event publisher and the counterpart to InterestAreas.

Constructor & Destructor Documentation

Photon.MmoDemo.Server.Item.Item ( Vector  position,
Vector  rotation,
Hashtable  properties,
MmoActorOperationHandler  owner,
string  id,
byte  type,
World  world 
)
inline

Member Function Documentation

void Photon.MmoDemo.Server.Item.Destroy ( )
inline
void Photon.MmoDemo.Server.Item.Dispose ( )
inline
virtual void Photon.MmoDemo.Server.Item.Dispose ( bool  disposing)
inlineprotectedvirtual

Publishes a ItemDisposedMessage through the DisposeChannel and disposes all channels.

ItemPositionMessage Photon.MmoDemo.Server.Item.GetPositionUpdateMessage ( Vector  position)
inlineprotected

Creates an ItemPositionMessage with the current position.

bool Photon.MmoDemo.Server.Item.GrantWriteAccess ( MmoActorOperationHandler  actor)
inline

Checks wheter the actor is allowed to change the item.

void Photon.MmoDemo.Server.Item.Move ( Vector  position)
inline

Moves the item.

void Photon.MmoDemo.Server.Item.OnDestroy ( )
inlineprotected

Publishes event ItemDestroyed in the Item.EventChannel.

void Photon.MmoDemo.Server.Item.SetProperties ( Hashtable  propertiesSet,
ArrayList  propertiesUnset 
)
inline

Updates the Properties and increments the PropertiesRevision.

void Photon.MmoDemo.Server.Item.Spawn ( Vector  position)
inline

Spawns the item.

void Photon.MmoDemo.Server.Item.UpdateInterestManagement ( )
inline

Publishes a ItemPositionMessage in the PositionUpdateChannel Subscribes and unsubscribes regions if changed.

Property Documentation

Region Photon.MmoDemo.Server.Item.CurrentWorldRegion
get
MessageChannel<ItemDisposedMessage> Photon.MmoDemo.Server.Item.DisposeChannel
get
bool Photon.MmoDemo.Server.Item.Disposed
get
MessageChannel<ItemEventMessage> Photon.MmoDemo.Server.Item.EventChannel
get
IFiber Photon.MmoDemo.Server.Item.Fiber
get
string Photon.MmoDemo.Server.Item.Id
get
MmoActorOperationHandler Photon.MmoDemo.Server.Item.Owner
get
Vector Photon.MmoDemo.Server.Item.Position
getset
MessageChannel<ItemPositionMessage> Photon.MmoDemo.Server.Item.PositionUpdateChannel
get
Hashtable Photon.MmoDemo.Server.Item.Properties
get
int Photon.MmoDemo.Server.Item.PropertiesRevision
getset
Vector Photon.MmoDemo.Server.Item.Rotation
getset
byte Photon.MmoDemo.Server.Item.Type
get
World Photon.MmoDemo.Server.Item.World
get