コード例 #1
0
 public void Initialize()
 {
     menuSession                    = new MenuLayout(this, 550, 34);
     menuInSessionHosting           = new MenuLayout(this, 450, 34);
     menuInSessionClient            = new MenuLayout(this, 450, 34);
     Matching.OnCreatedSession     += OnMatchingCreatedSession;
     Matching.OnFoundSessions      += OnMatchingFoundSessions;
     Matching.OnJoinedSession      += OnMatchingJoinedSession;
     Matching.OnJoinInvalidSession += OnMatchingJoinInvalidSession;
     Matching.OnUpdatedSession     += OnMatchingUpdatedSession;
     Matching.OnLeftSession        += OnMatchingLeftSession;
     Matching.OnSessionDestroyed   += OnMatchingSessionDestroyed;
     Matching.OnKickedOut          += OnMatchingKickedOut;
     Matching.OnSessionError       += OnSessionError;
     Matching.ClearAttributeDefinitions();
     Matching.AddAttributeDefinitionInt("LEVEL", Matching.EnumAttributeType.SESSION_SEARCH_ATTRIBUTE);
     Matching.AddAttributeDefinitionBin("RACE_TRACK", Matching.EnumAttributeType.SESSION_EXTERNAL_ATTRIBUTE, Matching.EnumAttributeMaxSize.SESSION_ATTRIBUTE_MAX_SIZE_12);
     Matching.AddAttributeDefinitionBin("CAR_TYPE", Matching.EnumAttributeType.SESSION_MEMBER_ATTRIBUTE, Matching.EnumAttributeMaxSize.SESSION_ATTRIBUTE_MAX_SIZE_28);
     Matching.AddAttributeDefinitionInt("GAME_DETAILS", Matching.EnumAttributeType.SESSION_INTERNAL_ATTRIBUTE);
     Matching.AddAttributeDefinitionInt("APP_VERSION", Matching.EnumAttributeType.SESSION_SEARCH_ATTRIBUTE);
     Matching.AddAttributeDefinitionBin("TEST_BIN_SEARCH", Matching.EnumAttributeType.SESSION_SEARCH_ATTRIBUTE, Matching.EnumAttributeMaxSize.SESSION_ATTRIBUTE_MAX_SIZE_60);
     Matching.AddAttributeDefinitionBin("PASSWORD", Matching.EnumAttributeType.SESSION_INTERNAL_ATTRIBUTE, Matching.EnumAttributeMaxSize.SESSION_ATTRIBUTE_MAX_SIZE_12);
     ErrorHandler(Matching.RegisterAttributeDefinitions());
 }
コード例 #2
0
 public void Initialize()
 {
     this.menuSession          = new MenuLayout(this, 550, 34);
     this.menuInSessionHosting = new MenuLayout(this, 450, 34);
     this.menuInSessionClient  = new MenuLayout(this, 450, 34);
     Matching.add_OnCreatedSession(new Messages.EventHandler(this.OnMatchingCreatedSession));
     Matching.add_OnFoundSessions(new Messages.EventHandler(this.OnMatchingFoundSessions));
     Matching.add_OnJoinedSession(new Messages.EventHandler(this.OnMatchingJoinedSession));
     Matching.add_OnJoinInvalidSession(new Messages.EventHandler(this.OnMatchingJoinInvalidSession));
     Matching.add_OnUpdatedSession(new Messages.EventHandler(this.OnMatchingUpdatedSession));
     Matching.add_OnLeftSession(new Messages.EventHandler(this.OnMatchingLeftSession));
     Matching.add_OnSessionDestroyed(new Messages.EventHandler(this.OnMatchingSessionDestroyed));
     Matching.add_OnKickedOut(new Messages.EventHandler(this.OnMatchingKickedOut));
     Matching.add_OnSessionError(new Messages.EventHandler(this.OnSessionError));
     Matching.ClearAttributeDefinitions();
     Matching.AddAttributeDefinitionInt("LEVEL", 2);
     Matching.AddAttributeDefinitionBin("RACE_TRACK", 4, 2);
     Matching.AddAttributeDefinitionBin("CAR_TYPE", 16, 4);
     Matching.AddAttributeDefinitionInt("GAME_DETAILS", 8);
     Matching.AddAttributeDefinitionInt("APP_VERSION", 2);
     Matching.AddAttributeDefinitionBin("TEST_BIN_SEARCH", 2, 8);
     Matching.AddAttributeDefinitionBin("PASSWORD", 8, 2);
     this.ErrorHandler(Matching.RegisterAttributeDefinitions());
 }