Wiki

Case Status
Log In

Wiki

 
Home ยป Add-ons»Photon Networking»Photon DemoWorker Sample»Photon DemoWork Chat users lis…
Index
Navigation
Community Wiki

Photon DemoWork Chat users list Fsm

Display the GUI interface to let the user select a player to send the chat.

It is only displayed when the player is not alone in the room.
 
 

Displaying the chat target gui

ROOM IS EMPTY and ROOM IS BUSY are global events fired by Game : room players watcher Fsm
We use them two events to show or not the chat content text area
 
You'll notice that we assume that the room is empty on START. 
 

managing player selection

A convenient action (Photon GuiLayout toolBar With Players) is available to list all the players in the room. So we simply store the selected player name in a string "selected player" and trigger a SEND event we created for this purpose. We transit to the "send chat" state and broadcast the CHAT RPC CALL global event just to that player. This is important, as it really helps organizing and making the system efficient. do not send to ALL a message or an event of any sort that is only suppose to reach one player, this would be counter effective and very cumbersome to implement.

 

 

Tags:

Last modified on 5/12/2012 2:35 AM by User.

  • RSS Feed