using the photon engine for Unity online game Development (ii)--photon Common class IntroductionPhotonPUNUnityOnline game developmentphoton Common class Introduction:Ipuncallback
- The Pungipuncallback interface defines a number of callback functions related to the Photon network connection.
- These callback functions are called by the game client when the network connection state changes.
Punbehaviour
- Punbehaviour in the Photon namespace
- Punbehavioud inherits Photon.monobehaviour, implements Puncallback interface
- Photon.monobehavioud Inheritance Unityengine.monobehaviour
photonnetwork
Photonnetwork is a static class in pun that contains the functions used to send requests to the photon server, as well as the properties that hold the player's information:
- Photonnetwork.connectusingsettings (): Connect photon Server
- Photonnetwork.joinlobby (): Join the game hall at Materserver
- Photonnetwork.createroom (): Create a game room in the lobby of the game
- Photonnetwork.leaveroom (): Return to Game hall from game room
- Photonnetwork.instantiate (): Create a client-controlled game object
- Photonnetwork.room: The client enters the game room
Photonplayer
The Photon player class represents players in Photon network traffic.
- photonpiayer.id : player ID, with Photon server assignment
- Photonplayer.name : Player's nickname, players can set their own nickname
- Photonplayer.islocal: Whether the player is a local client player
- Photonpiayer.customproperties: Player's Custom properties
other
Photonnetwork-documentation:
- Photonview: Managing communication between clients in a game room
- Roomlnfo: Property information for game rooms
- Serversettings: Server Settings
- Typedlobbylnfo: Property information for the game Hall
Using the photon engine for Unity online game Development (ii)--photon Common class Introduction