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


C# Game1.SetSystemCallOrder方法代码示例

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


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

示例1: MapScreen

        public MapScreen(Game1 game)
        {
            this._game = game;
            this._screen = ScreenType.Map;
            this.clientBounds = game.Window.ClientBounds;
            this._game.IsMouseVisible = true;

            arrowInputSystemID = game.RegisterSystem(new ArrowInputSystem(game, 1));
            controllerInputSystemID = game.RegisterSystem(new ControllerInputSystem(game, 1));
            mapRendererID = game.RegisterSystem(new MapRenderer(game));
            mapInitSystemID = game.RegisterSystem(new ScreenInitializationSystem(game));
            //modeRendererID = game.RegisterSystem(new ModeTextRenderer(game));
            modeInputSystemID = game.RegisterSystem(new ModeInputSystem(game));
            mapInputSystemID = game.RegisterSystem(new MouseInputsystem(game));

            game.SetSystemCallOrder(new List<int>
             {
                mapInitSystemID,
                arrowInputSystemID,
                controllerInputSystemID,
                modeInputSystemID,
                mapRendererID,
                mapInputSystemID
                //modeRendererID
             });

            game.AddObject(new TextObject1(game));
        }
开发者ID:patpaquette,项目名称:SSB-clone,代码行数:28,代码来源:MapScreen.cs

示例2: HumanAIScreen

        public HumanAIScreen(Game1 game)
        {
            this._game = game;
            this._screen = ScreenType.Character;
            this.clientBounds = game.Window.ClientBounds;
            this._game.IsMouseVisible = false;

            arrowInputSystemID = game.RegisterSystem(new ArrowInputSystem(game, 1));
            handInitSystemID = game.RegisterSystem(new HandInitSystem(game));
            controllerInputSystemID = game.RegisterSystem(new ControllerInputSystem(game, 2));
            selectsInputID1 = game.RegisterSystem(new SelectInputSystem(game, 1));
            selectsInputID2 = game.RegisterSystem(new SelectInputSystem(game, 2));
            mapRendererID = game.RegisterSystem(new MapRenderer(game));
            handRenderID = game.RegisterSystem(new HandRenderer1(game));
            screenInitSystemID = game.RegisterSystem(new ScreenInitializationSystem(game));

            game.SetSystemCallOrder(new List<int>
             {
                screenInitSystemID,
                handInitSystemID,
                arrowInputSystemID,
                controllerInputSystemID,
                selectsInputID1,
                selectsInputID2,
                mapRendererID,
                handRenderID
             });

            game.AddObject(new HandObject1(game, 1));
            game.AddObject(new HandObject1(game, 2));
        }
开发者ID:patpaquette,项目名称:SSB-clone,代码行数:31,代码来源:HumanAIScreen.cs

示例3: StartScreen

        public StartScreen(Game1 game)
        {
            this._game = game;
            this._screen = ScreenType.Start;
            this.clientBounds = game.Window.ClientBounds;

            startScreenSystemID = game.RegisterSystem(new ScreenInputSystem(game, this._screen));
            screenInitSystemID = game.RegisterSystem(new ScreenInitializationSystem(game));
            screenRendererID = game.RegisterSystem(new MapRenderer(game));

            game.SetSystemCallOrder(new List<int>
             {
                 screenInitSystemID,
                 startScreenSystemID,
                 screenRendererID

             });

            game.AddObject(new SceneObject(game, this._screen));
        }
开发者ID:patpaquette,项目名称:SSB-clone,代码行数:20,代码来源:StartScreen.cs

示例4: CreditsScreen

        public CreditsScreen(Game1 game)
        {
            this._game = game;
            this._screen = ScreenType.Character;
            this.clientBounds = game.Window.ClientBounds;
            this._game.IsMouseVisible = false;

            handInitSystemID = game.RegisterSystem(new HandInitSystem(game));

            if (game.winner == 1)
            {
                arrowInputSystemID = game.RegisterSystem(new ArrowInputSystem(game, 1));
                selectsInputID1 = game.RegisterSystem(new SelectInputSystem(game, 1));
            }
            else if (game.winner == 2)
            {
                controllerInputSystemID = game.RegisterSystem(new ControllerInputSystem(game, 2));
                selectsInputID2 = game.RegisterSystem(new SelectInputSystem(game, 2));
            }
            else
            {
                selectsInputID1 = game.RegisterSystem(new SelectInputSystem(game, 1));
                selectsInputID2 = game.RegisterSystem(new SelectInputSystem(game, 2));
            }
            mapRendererID = game.RegisterSystem(new MapRenderer(game));
            handRenderID = game.RegisterSystem(new HandRenderer1(game));
            screenInitSystemID = game.RegisterSystem(new ScreenInitializationSystem(game));
            switchSystemID = game.RegisterSystem(new SwitchScreenSystem(game));

            if (game.winner == 1)
            {
                game.SetSystemCallOrder(new List<int>
                 {
                    screenInitSystemID,
                    handInitSystemID,
                    arrowInputSystemID,
                    selectsInputID1,
                    mapRendererID,
                    handRenderID,
                    switchSystemID
                 });
            }
            else if (game.winner == 2)
            {
                game.SetSystemCallOrder(new List<int>
                 {
                    screenInitSystemID,
                    handInitSystemID,
                    controllerInputSystemID,
                    selectsInputID2,
                    mapRendererID,
                    handRenderID,
                    switchSystemID
                 });
            }
            else
            {
                game.SetSystemCallOrder(new List<int>
                 {
                    screenInitSystemID,
                    handInitSystemID,
                    arrowInputSystemID,
                    controllerInputSystemID,
                    selectsInputID1,
                    selectsInputID2,
                    mapRendererID,
                    handRenderID,
                    switchSystemID
                 });
            }

            game.AddObject(new HandObject2(game, 1));
            game.AddObject(new HandObject2(game, 2));
        }
开发者ID:patpaquette,项目名称:SSB-clone,代码行数:74,代码来源:CreditsScreen.cs

示例5: GameScreen

        public GameScreen(Game1 game, SpriteType player1, SpriteType player2)
        {
            game.IsMouseVisible = true;

            this.envFactory = new EnvironmentFactory(game);
            this.clientBounds = game.Window.ClientBounds;
            mapInitSystemID = game.RegisterSystem(new ScreenInitializationSystem(game));
            spriteInitSystemID1 = game.RegisterSystem(new SpriteInitializationSystem(game, 1));
            spriteInitSystemID2 = game.RegisterSystem(new SpriteInitializationSystem(game, 2));
            songInitSystemID = game.RegisterSystem(new SongInitializer(game));
            if (game.playe2 == PlayerType.Human)
            {
                controllerInputSystemID = game.RegisterSystem(new ControllerInputSystem(game, 2));
                //arrowInputSystemID = game.RegisterSystem(new ArrowInputSystem(game, 2));
                inputSystemID2 = game.RegisterSystem(new InputSystem(game, 2));
            }
            if (game.playe1 == PlayerType.Human)
            {
                arrowInputSystemID = game.RegisterSystem(new ArrowInputSystem(game, 1));
                //controllerInputSystemID = game.RegisterSystem(new ControllerInputSystem(game, 1));
                inputSystemID1 = game.RegisterSystem(new InputSystem(game, 1));
            }
            animationSystemID1 = game.RegisterSystem(new AnimationSystem(game, 1));
            animationSystemID2 = game.RegisterSystem(new AnimationSystem(game, 2));
            movementSystemID1 = game.RegisterSystem(new MovementSystem(game, 1));
            movementSystemID2 = game.RegisterSystem(new MovementSystem(game, 2));
            actionSystemID = game.RegisterSystem(new ActionSystem(game));
            physicsSystemID = game.RegisterSystem(new PhysicsSystem(game));
            boundsSystemID = game.RegisterSystem(new BoundsSystem(game));
            meshRendererID = game.RegisterSystem(new LinebatchMeshRenderSystem(game));
            collisionRendererID = game.RegisterSystem(new CollisionRenderSystem(game));
            mapRendererID = game.RegisterSystem(new MapRenderer(game));
            spriteRendererID = game.RegisterSystem(new SpriteRenderer(game));
            uiRendererID = game.RegisterSystem(new UIRenderer(game));
            transformResolverID = game.RegisterSystem(new PhysicsTransformResolverSystem(game));
            lifetimeSystemID = game.RegisterSystem(new LifetimeSystem(game));
            int aStarPathRendererID = game.RegisterSystem(new AStarPathRenderer(game));
            int aStarRendererID = game.RegisterSystem(new AStarPathfindingRenderer(game));
            int aiSystemID = game.RegisterSystem(new AISystem(game));
            int timerRendererID = game.RegisterSystem(new TimerRenderSystem(game));
            int timerSystemID = game.RegisterSystem(new TimerSystem(game));
            songSystemID = game.RegisterSystem(new MusicSystem(game));

            //services
            int collisionSystemID = game.RegisterSystem(new SATCollisionSystem(game, "Collision"));
            int aStarServiceID = game.RegisterSystem(new AStarPathfindingSystem(game, "Pathfinding", 50));

            if (game.playe1 == PlayerType.Human && game.playe2 == PlayerType.Human)
            {
                game.SetSystemCallOrder(new List<int>
                    {
                        this.mapInitSystemID,
                        this.spriteInitSystemID1,
                        this.spriteInitSystemID2,
                        this.songInitSystemID,
                        this.arrowInputSystemID,
                        this.controllerInputSystemID,
                        aiSystemID,
                        this.inputSystemID1,
                        this.inputSystemID2,
                        this.animationSystemID1,
                        this.animationSystemID2,
                        this.movementSystemID1,
                        this.movementSystemID2,
                        this.actionSystemID,
                        this.physicsSystemID,
                        this.transformResolverID,
                        this.boundsSystemID,
                        this.lifetimeSystemID,
                        //this.physicsSystemID,
                        this.meshRendererID,
                        this.mapRendererID,
                        this.collisionRendererID,
                        this.spriteRendererID,
                        this.uiRendererID,
                        aStarRendererID,
                        aStarPathRendererID,
                        songSystemID
                    });
            }
            else if (game.playe1 == PlayerType.Human)
            {
                game.SetSystemCallOrder(new List<int>
                    {
                        this.mapInitSystemID,
                        this.spriteInitSystemID1,
                        this.spriteInitSystemID2,
                        this.songInitSystemID,
                        this.arrowInputSystemID,
                        aiSystemID,
                        this.inputSystemID1,
                        this.animationSystemID1,
                        this.animationSystemID2,
                        this.movementSystemID1,
                        this.movementSystemID2,
                        this.actionSystemID,
                        this.physicsSystemID,
                        this.transformResolverID,
                        this.boundsSystemID,
                        this.lifetimeSystemID,
//.........这里部分代码省略.........
开发者ID:patpaquette,项目名称:SSB-clone,代码行数:101,代码来源:GameScreen.cs


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