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


C# BattleMap.injectTeams方法代码示例

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


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

示例1: onInit

        // --- Inherited Methods ---
        // Called when the game state is being initiated
        protected override void onInit()
        {
            game.clearColor=	game.getColor("#101820");
            holds=	new bool[6];
            ticks=	new int[1];
            map=	new BattleMap(ref game, this, 24, 24);
            cursorArrow=	new CursorArrow(game, Vector3.Zero);
            currAttackInfo=	new AttackInfo();
            camSpline=	new Spline();
            camTween=	new Tween(0f, 1f, 500f);

            for(int i= 0; i< holds.Length; i++)
                holds[i]=	false;
            for(int i= 0; i< ticks.Length; i++)
                ticks[i]=	0;
            playerTeamID=	0;
            stage=	0;
            prevStage=	0;
            selUnit=	new int[]	{-1, -1};
            map.tiles.forEach(delegate(GridNode<Tile> node, int x, int y)
            {
                node.item=	new Tile(game, new Vector3(-x*Tile.size, 0f, y*Tile.size), ref map);
            });
            //map.createFromBitmap("maps/map_test.bmp");
            map.tiles.items[0, 2].item.startZoneID=	0;
            map.tiles.items[2, 5].item.startZoneID=	0;
            map.tiles.items[1, 5].item.startZoneID=	0;
            map.tiles.items[0, 1].item.startZoneID=	1;

            // Ally team
            map.addTeam(new Team(game, false,
                Unit.create("Paul", game, new Cardinal(game), 30, "undying_morale"),
                Unit.create("George", game, new Berserker(game), 30),
                Unit.create("Lillianna", game, new Cardinal(game), 30, "evil\'s_bane")
            ));

            // Enemy Team
            map.addTeam(new Team(game, true,
                Unit.create("Terrence", game, new Berserker(game), 30),
                Unit.create("Gjoran", game, new Samurai(game), 30),
                Unit.create("Lorance", game, new Cardinal(game), 30),
                Unit.create("Monte", game, new Cardinal(game), 30)
            ), true);

            map.injectTeams();

            forward=	new Vector3(0f, -256f/((float)(Math.Tan(GSGameplay.deg30)+Math.Tan(3.14159f/12f))), 0f);
            forward.Z=	-1f*(float)(forward.Y*Math.Tan(GSGameplay.deg30));

            game.cameras.current.target=	new Vector3(0f, 0f, 512f);
            game.cameras.current.pos=	new Vector3(0f, 512f, 0f);
            camSel=	new int[]	{ map.width/2, map.height/2 };
            moveCameraTo(5, 5);

            isPlayer=	false;
            isUsingGamepad=	false;
            bCenterOverride=	false;

            setupGui();
        }
开发者ID:pgonzbecer,项目名称:Conquest,代码行数:62,代码来源:GSGameplay.cs


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