コード例 #1
0
 internal static void InstallEvents()
 {
     FriendStateChange_t.Install(x => OnPersonaStateChange?.Invoke(new Friend(x.SteamID)));
     GameRichPresenceJoinRequested_t.Install(x => OnGameRichPresenceJoinRequested?.Invoke(new Friend(x.SteamIDFriend), x.Connect));
     GameConnectedFriendChatMsg_t.Install(OnFriendChatMessage);
     GameOverlayActivated_t.Install(x => OnGameOverlayActivated?.Invoke());
     GameServerChangeRequested_t.Install(x => OnGameServerChangeRequested?.Invoke(x.Server, x.Password));
     GameLobbyJoinRequested_t.Install(x => OnGameLobbyJoinRequested?.Invoke(x.SteamIDLobby, x.SteamIDFriend));
     FriendRichPresenceUpdate_t.Install(x => OnFriendRichPresenceUpdate?.Invoke(new Friend(x.SteamIDFriend)));
 }
コード例 #2
0
 internal void InstallEvents()
 {
     Dispatch.Install <PersonaStateChange_t>(x => OnPersonaStateChange?.Invoke(new Friend(x.SteamID)));
     Dispatch.Install <GameRichPresenceJoinRequested_t>(x => OnGameRichPresenceJoinRequested?.Invoke(new Friend(x.SteamIDFriend), x.ConnectUTF8()));
     Dispatch.Install <GameConnectedFriendChatMsg_t>(OnFriendChatMessage);
     Dispatch.Install <GameOverlayActivated_t>(x => OnGameOverlayActivated?.Invoke(x.Active != 0));
     Dispatch.Install <GameServerChangeRequested_t>(x => OnGameServerChangeRequested?.Invoke(x.ServerUTF8(), x.PasswordUTF8()));
     Dispatch.Install <GameLobbyJoinRequested_t>(x => OnGameLobbyJoinRequested?.Invoke(new Lobby(x.SteamIDLobby), x.SteamIDFriend));
     Dispatch.Install <FriendRichPresenceUpdate_t>(x => OnFriendRichPresenceUpdate?.Invoke(new Friend(x.SteamIDFriend)));
 }
コード例 #3
0
 public void InstallEvents()
 {
     Dispatch.Install <PersonaStateChange_t>(x => OnPersonaStateChange?.Invoke(new Friend(x.SteamID)));
     Dispatch.Install <GameRichPresenceJoinRequested_t>(x => OnGameRichPresenceJoinRequested?.Invoke(new Friend(x.SteamIDFriend), x.ConnectUTF8()));
     Dispatch.Install <GameConnectedFriendChatMsg_t>(OnFriendChatMessage);
     Dispatch.Install <GameConnectedClanChatMsg_t>(OnGameConnectedClanChatMessage);
     Dispatch.Install <GameOverlayActivated_t>(x => OnGameOverlayActivated?.Invoke(x.Active != 0));
     Dispatch.Install <GameServerChangeRequested_t>(x => OnGameServerChangeRequested?.Invoke(x.ServerUTF8(), x.PasswordUTF8()));
     Dispatch.Install <GameLobbyJoinRequested_t>(x => OnGameLobbyJoinRequested?.Invoke(new Lobby(x.SteamIDLobby), x.SteamIDFriend));
     Dispatch.Install <FriendRichPresenceUpdate_t>(x => OnFriendRichPresenceUpdate?.Invoke(new Friend(x.SteamIDFriend)));
     Dispatch.Install <OverlayBrowserProtocolNavigation_t>(x => OnOverlayBrowserProtocol?.Invoke(x.RgchURIUTF8()));
 }