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

This InterestArea subclass automatically subscribes to the region.ItemEventChannel of every region in focus and forwards item events to the PeerBase. More...

Inheritance diagram for Photon.MmoDemo.Server.ClientInterestArea:
Photon.MmoDemo.Server.InterestArea

Public Member Functions

 ClientInterestArea (PeerBase peer, byte id, World world)
 
override void OnItemEnter (ItemSnapshot snapshot)
 Notifies peer about Item entered area. More...
 
override void OnItemExit (Item item)
 Notifies peer about item exited area. More...
 
- Public Member Functions inherited from Photon.MmoDemo.Server.InterestArea
void AttachToItem (Item item)
 Attaching an Item to the InterestArea automatically updates the InterestArea's Position when the Item moves. More...
 
void Detach ()
 Detaches the InterestArea from an Item that was attached with AttachToItem. More...
 
void UpdateInterestManagement ()
 Updates the Region subscriptions that are used to detect Items in the nearby World. This method should be called after changing the InterestArea's Position. More...
 
void Dispose ()
 

Protected Member Functions

override void OnRegionEnter (Region region)
 Subscrives entered region. More...
 
override void OnRegionExit (Region region)
 Unsubscribe exited region. More...
 
- Protected Member Functions inherited from Photon.MmoDemo.Server.InterestArea
 InterestArea (byte id, World world)
 
virtual void Dispose (bool disposing)
 Disposes the fiber used to manage the subscriptions, detaches any attached item and resolves all existing channel subscriptions. More...
 

Additional Inherited Members

- Public Attributes inherited from Photon.MmoDemo.Server.InterestArea
readonly object SyncRoot = new object()
 
- Properties inherited from Photon.MmoDemo.Server.InterestArea
Item AttachedItem [get]
 
byte Id [get]
 
Vector Position [get, set]
 
Vector ViewDistanceEnter [get, set]
 Gets or sets the inner view distance (the item subscribe threshold). More...
 
Vector ViewDistanceExit [get, set]
 Gets or sets the outer view distance (the item unsubscribe threshold). More...
 

Detailed Description

This InterestArea subclass automatically subscribes to the region.ItemEventChannel of every region in focus and forwards item events to the PeerBase.

Constructor & Destructor Documentation

Photon.MmoDemo.Server.ClientInterestArea.ClientInterestArea ( PeerBase  peer,
byte  id,
World  world 
)
inline

Member Function Documentation

override void Photon.MmoDemo.Server.ClientInterestArea.OnItemEnter ( ItemSnapshot  snapshot)
inlinevirtual

Notifies peer about Item entered area.

Reimplemented from Photon.MmoDemo.Server.InterestArea.

override void Photon.MmoDemo.Server.ClientInterestArea.OnItemExit ( Item  item)
inlinevirtual

Notifies peer about item exited area.

Reimplemented from Photon.MmoDemo.Server.InterestArea.

override void Photon.MmoDemo.Server.ClientInterestArea.OnRegionEnter ( Region  region)
inlineprotectedvirtual

Subscrives entered region.

Reimplemented from Photon.MmoDemo.Server.InterestArea.

override void Photon.MmoDemo.Server.ClientInterestArea.OnRegionExit ( Region  region)
inlineprotectedvirtual

Unsubscribe exited region.

Reimplemented from Photon.MmoDemo.Server.InterestArea.