Photon Server API
Public Member Functions | Public Attributes | Static Public Attributes | Properties | Events | List of all members
Photon.MmoDemo.Client.Item Class Reference
Inheritance diagram for Photon.MmoDemo.Client.Item:
Photon.MmoDemo.Client.MyItem

Public Member Functions

 Item (Game game, string id, ItemType type, bool isMine=false)
 
bool AddSubscribedInterestArea (byte cameraId)
 
void GetInitialProperties ()
 
void GetProperties ()
 
bool RemoveSubscribedInterestArea (byte cameraId)
 
void ResetPreviousPosition ()
 
virtual void SetColor (int color)
 
virtual void SetInterestAreaAttached (bool attached)
 
virtual void SetInterestAreaViewDistance (Vector viewDistanceEnter, Vector viewDistanceExit)
 
void SetPositions (Vector position, Vector previousPosition, Vector rotation, Vector previousRotation)
 
virtual void SetText (string text)
 

Public Attributes

readonly List< byte > subscribedInterestAreas
 Keeps all interest areas which cover the item. More...
 

Static Public Attributes

static readonly string PropertyKeyColor = "color"
 
static readonly string PropertyKeyInterestAreaAttached = "attached"
 
static readonly string PropertyKeyText = "text"
 
static readonly string PropertyKeyViewDistanceEnter = "enter"
 
static readonly string PropertyKeyViewDistanceExit = "exit"
 

Properties

virtual bool IsMine [get]
 
int Color [get]
 
Game Game [get]
 
string Id [get]
 
bool InterestAreaAttached [get]
 
bool IsDestroyed [get, set]
 
bool IsUpToDate [get]
 
Vector Position [get]
 
Vector Rotation [get]
 
Vector PreviousPosition [get]
 
Vector PreviousRotation [get]
 
int PropertyRevisionLocal [get, set]
 
int PropertyRevisionRemote [get, set]
 
string Text [get]
 
ItemType Type [get]
 
Vector ViewDistanceEnter [get]
 Subscribe to area-updates of all areas as far from item.Position as this value. More...
 
Vector ViewDistanceExit [get]
 Unsubscribe area-updates of all areas further away from item.Position than this value. More...
 

Events

Action< ItemMoved
 

Constructor & Destructor Documentation

Photon.MmoDemo.Client.Item.Item ( Game  game,
string  id,
ItemType  type,
bool  isMine = false 
)
inline

Member Function Documentation

bool Photon.MmoDemo.Client.Item.AddSubscribedInterestArea ( byte  cameraId)
inline
void Photon.MmoDemo.Client.Item.GetInitialProperties ( )
inline
void Photon.MmoDemo.Client.Item.GetProperties ( )
inline
bool Photon.MmoDemo.Client.Item.RemoveSubscribedInterestArea ( byte  cameraId)
inline
void Photon.MmoDemo.Client.Item.ResetPreviousPosition ( )
inline
virtual void Photon.MmoDemo.Client.Item.SetColor ( int  color)
inlinevirtual

Reimplemented in Photon.MmoDemo.Client.MyItem.

virtual void Photon.MmoDemo.Client.Item.SetInterestAreaAttached ( bool  attached)
inlinevirtual

Reimplemented in Photon.MmoDemo.Client.MyItem.

virtual void Photon.MmoDemo.Client.Item.SetInterestAreaViewDistance ( Vector  viewDistanceEnter,
Vector  viewDistanceExit 
)
inlinevirtual

Reimplemented in Photon.MmoDemo.Client.MyItem.

void Photon.MmoDemo.Client.Item.SetPositions ( Vector  position,
Vector  previousPosition,
Vector  rotation,
Vector  previousRotation 
)
inline
virtual void Photon.MmoDemo.Client.Item.SetText ( string  text)
inlinevirtual

Reimplemented in Photon.MmoDemo.Client.MyItem.

Member Data Documentation

readonly string Photon.MmoDemo.Client.Item.PropertyKeyColor = "color"
static
readonly string Photon.MmoDemo.Client.Item.PropertyKeyInterestAreaAttached = "attached"
static
readonly string Photon.MmoDemo.Client.Item.PropertyKeyText = "text"
static
readonly string Photon.MmoDemo.Client.Item.PropertyKeyViewDistanceEnter = "enter"
static
readonly string Photon.MmoDemo.Client.Item.PropertyKeyViewDistanceExit = "exit"
static
readonly List<byte> Photon.MmoDemo.Client.Item.subscribedInterestAreas

Keeps all interest areas which cover the item.

Property Documentation

int Photon.MmoDemo.Client.Item.Color
get
Game Photon.MmoDemo.Client.Item.Game
get
string Photon.MmoDemo.Client.Item.Id
get
bool Photon.MmoDemo.Client.Item.InterestAreaAttached
get
bool Photon.MmoDemo.Client.Item.IsDestroyed
getset
virtual bool Photon.MmoDemo.Client.Item.IsMine
get
bool Photon.MmoDemo.Client.Item.IsUpToDate
get
Vector Photon.MmoDemo.Client.Item.Position
get
Vector Photon.MmoDemo.Client.Item.PreviousPosition
get
Vector Photon.MmoDemo.Client.Item.PreviousRotation
get
int Photon.MmoDemo.Client.Item.PropertyRevisionLocal
getset
int Photon.MmoDemo.Client.Item.PropertyRevisionRemote
getset
Vector Photon.MmoDemo.Client.Item.Rotation
get
string Photon.MmoDemo.Client.Item.Text
get
ItemType Photon.MmoDemo.Client.Item.Type
get
Vector Photon.MmoDemo.Client.Item.ViewDistanceEnter
get

Subscribe to area-updates of all areas as far from item.Position as this value.

If you set 1000, the server sends updates from areas +1000 units away and -1000 units away.

Vector Photon.MmoDemo.Client.Item.ViewDistanceExit
get

Unsubscribe area-updates of all areas further away from item.Position than this value.

Event Documentation

Action<Item> Photon.MmoDemo.Client.Item.Moved