コード例 #1
0
        public void MapPreloadOnLobbyCreated(NodeAddedEvent e, MatchMakingLobbyNode lobby, [JoinByMap] MapNode map)
        {
            lobby.Entity.RemoveComponentIfPresent <MapPreloadOnLobbyComponent>();
            AssetRequestEvent eventInstance = new AssetRequestEvent {
                AssetGuid = map.assetReference.Reference.AssetGuid
            };

            base.ScheduleEvent(eventInstance, map);
            MapPreloadOnLobbyComponent component = new MapPreloadOnLobbyComponent {
                LoaderEntity = eventInstance.LoaderEntity
            };

            lobby.Entity.AddComponent(component);
        }
コード例 #2
0
 public void UserReady(ButtonClickEvent e, SingleNode <ReadyButtonComponent> readyButton, [JoinAll] MatchMakingLobbyNode matchMakingLobby)
 {
     base.ScheduleEvent <MatchMakingUserReadyEvent>(matchMakingLobby);
 }