当前位置: 首页>>代码示例>>C#>>正文


C# IAppBuilder.SceneTemplate方法代码示例

本文整理汇总了C#中IAppBuilder.SceneTemplate方法的典型用法代码示例。如果您正苦于以下问题:C# IAppBuilder.SceneTemplate方法的具体用法?C# IAppBuilder.SceneTemplate怎么用?C# IAppBuilder.SceneTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAppBuilder的用法示例。


在下文中一共展示了IAppBuilder.SceneTemplate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

        public void Run(IAppBuilder builder)
        {
            builder.SceneTemplate("empty", scene => { });

            var userConfig = new Users.UserManagementConfig() { SceneIdRedirect = "main" /*Constants.MATCHMAKER_NAME*/ };
            userConfig.AuthenticationProviders.Add(new LoginPasswordAuthenticationProvider());
            userConfig.AuthenticationProviders.Add(new SteamAuthenticationProvider());

            builder.AddPlugin(new UsersManagementPlugin(userConfig));
        }
开发者ID:Falanwe,项目名称:Stormancer-AuthenticationPlugin,代码行数:10,代码来源:App.cs

示例2: Run

 //The runtime calls this method on startup to initialize the server.
 public void Run(IAppBuilder builder)
 {
     //Declares a scene template called "hello"
     builder.SceneTemplate("hello", scene =>
     {
         //Adds an handler executed whenever a peer connects to the scene.
         scene.Connected.Add(async peer =>
         {
             //Sends the string "hello world!" to the peer that just connected.
             peer.Send("msg", "hello world!");
         });
     });
 }
开发者ID:Stormancer,项目名称:Stormancer-tutorial-helloworld,代码行数:14,代码来源:HelloWorld.cs

示例3: Run

        public void Run(IAppBuilder builder)
        {
            builder.AddPlugin(new MatchmakingPlugin(MatchmakingFactory.Create(
                new DefaultMatchmakingDataExtractor(),
                new DefaultMatchmaker(),
                new DefaultMatchmakingResolver()
                )));

            builder.SceneTemplate("test-template", scene =>
            {
                scene.AddRoute("echo.in", p =>
                {
                    scene.Broadcast("echo.out", s => p.Stream.CopyTo(s, (int)p.Stream.Length), PacketPriority.MEDIUM_PRIORITY, PacketReliability.RELIABLE);
                });
            },
            new Dictionary<string, string> { { "description", "Broadcasts data sent to the route 'echo.in' to all connected users on the route 'echo.out'." } });
        }
开发者ID:Falanwe,项目名称:stormancer-matchmaking,代码行数:17,代码来源:App.cs

示例4: Run

 public void Run(IAppBuilder builder)
 {
     builder.SceneTemplate("ChatRoom", scene => scene.AddChat());
 }
开发者ID:LaurentQUERSIN,项目名称:The-Interpolator---server,代码行数:4,代码来源:ChatServer.cs

示例5: Run

 public void Run(IAppBuilder builder)
 {
     builder.SceneTemplate("tester", scene => TesterBehavior.AddTesterBehaviorToScene(scene));
 }
开发者ID:antlafarge,项目名称:stormancer-tester,代码行数:4,代码来源:Tester.cs

示例6: Run

 public void Run(IAppBuilder builder)
 {
     builder.SceneTemplate("interpolator_scene", (scene) => new InterpolatorScene(scene));
 }
开发者ID:LaurentQUERSIN,项目名称:The-Interpolator---server,代码行数:4,代码来源:Run.cs

示例7: Run

 public void Run(IAppBuilder builder)
 {
     builder.SceneTemplate("main", scene => new Main(scene));
 }
开发者ID:LaurentQUERSIN,项目名称:Pop-The-Balls,代码行数:4,代码来源:app.cs

示例8: Run

 public void Run(IAppBuilder builder)
 {
     builder.SceneTemplate("Lobby", scene => scene.addServerLogic());
     builder.SceneTemplate("Game", scene => scene.addGameLogic());
 }
开发者ID:songotony,项目名称:RTypeStormancer,代码行数:5,代码来源:Starter.cs


注:本文中的IAppBuilder.SceneTemplate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。