GetLocalActorProperties









How do I use Get Local Actor Properties
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: NetworkingPeer.cs Copy
893     private Hashtable GetLocalActorProperties()
894     {
895         if (PhotonNetwork.player != null)
896         {
897             return PhotonNetwork.player.allProperties;
898         }
899
900         Hashtable actorProperties = new Hashtable();
901         actorProperties[ActorProperties.PlayerName] = this.PlayerName;
902         return actorProperties;
903     }
File name: NetworkingPeer.cs Copy
932     public bool OpCreateGame(string roomName, RoomOptions roomOptions, TypedLobby typedLobby)
933     {
934         bool onGameServer = this.server == ServerConnection.GameServer;
935         if (!onGameServer)
936         {
937             this.mRoomOptionsForCreate = roomOptions;
938             this.mRoomToGetInto = new Room(roomName, roomOptions);
939             this.mRoomToEnterLobby = typedLobby ?? ((this.insideLobby) ? this.lobby : null); // use given lobby, or active lobby (if any active) or none
940         }
941
942         this.mLastJoinType = JoinType.CreateGame;
943         return base.OpCreateRoom(roomName, roomOptions, this.mRoomToEnterLobby, this.GetLocalActorProperties(), onGameServer);
944     }
File name: NetworkingPeer.cs Copy
947     public bool OpJoinRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby, bool createIfNotExists)
948     {
949         bool onGameServer = this.server == ServerConnection.GameServer;
950         if (!onGameServer)
951         {
952             // roomOptions and typedLobby will be null, unless createIfNotExists is true
953             this.mRoomOptionsForCreate = roomOptions;
954             this.mRoomToGetInto = new Room(roomName, roomOptions);
955             this.mRoomToEnterLobby = null;
956             if (createIfNotExists)
957             {
958                 this.mRoomToEnterLobby = typedLobby ?? ((this.insideLobby) ? this.lobby : null); // use given lobby, or active lobby (if any active) or none
959             }
960         }
961
962         this.mLastJoinType = (createIfNotExists) ? JoinType.JoinOrCreateOnDemand : JoinType.JoinGame;
963         return base.OpJoinRoom(roomName, roomOptions, this.mRoomToEnterLobby, createIfNotExists, this.GetLocalActorProperties(), onGameServer);
964     }

GetLocalActorProperties 108 lượt xem

Gõ tìm kiếm nhanh...