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


C# Team.Equals方法代码示例

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


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

示例1: CanEnterOnTeam

 public bool CanEnterOnTeam(Team t)
 {
     if (t.Equals(Team.Blue)) return BlueTeam.Count < 5;
     if (t.Equals(Team.Red)) return RedTeam.Count < 5;
     if (t.Equals(Team.Yellow)) return YellowTeam.Count < 5;
     return t.Equals(Team.Green) && GreenTeam.Count < 5;
 }
开发者ID:sgf,项目名称:Yupi,代码行数:7,代码来源:TeamManager.cs

示例2: CanEnterOnTeam

		public bool CanEnterOnTeam(Team t)
		{
			if (t.Equals(Team.blue))
			{
				return this.BlueTeam.Count < 5;
			}
			if (t.Equals(Team.red))
			{
				return this.RedTeam.Count < 5;
			}
			if (t.Equals(Team.yellow))
			{
				return this.YellowTeam.Count < 5;
			}
			return t.Equals(Team.green) && this.GreenTeam.Count < 5;
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:16,代码来源:TeamManager.cs

示例3: CanEnterOnTeam

 public bool CanEnterOnTeam(Team t)
 {
     if (t.Equals(Team.Blue))
     {
         return (this.BlueTeam.Count < 5);
     }
     if (t.Equals(Team.Red))
     {
         return (this.RedTeam.Count < 5);
     }
     if (t.Equals(Team.Yellow))
     {
         return (this.YellowTeam.Count < 5);
     }
     return (t.Equals(Team.Green) && (this.GreenTeam.Count < 5));
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:16,代码来源:TeamManager.cs

示例4: IsValidMove

 public bool IsValidMove (Team t, OneDBox b) {
     b.FixedUpdate();
     float width = background.GetComponent<SpriteRenderer>().sprite.rect.width;
     float center = background.GetComponent<Transform>().position.x;
     if ( b.x > center + width / 2 || b.x < -1 * (center + width / 2) )
     {
         return false;
     }
     else if (t.Equals(right))
     {
         return !left.fort.box.overlap(b);
     }
     else
     {
         return !right.fort.box.overlap(b);
     }
 }
开发者ID:joeygoode,项目名称:cauldron-command,代码行数:17,代码来源:Game.cs

示例5: Planet

        public Planet(Game game, Team team, Vector3 position)
            : base(game, team, position)
        {
            if (team.Equals(Team.Blue))
            {
                model = game.Content.Load<Model>("Models/Planets/Venus");
                moon = game.Content.Load<Model>("Models/Planets/mars2");
            }
            else
            {
                model = game.Content.Load<Model>("Models/Planets/CallistoModel");
                moon = game.Content.Load<Model>("Models/Planets/Saturn");
            }

            Bsphere = createShpere();
            radiusOfPlanet = Bsphere.Radius;

            BoundingSphere sphere = new BoundingSphere();

            sphere = new BoundingSphere();
            foreach (ModelMesh m in moon.Meshes)
            {
                if (sphere.Radius == 0)
                    sphere = m.BoundingSphere;
                else
                    sphere = BoundingSphere.CreateMerged(sphere, m.BoundingSphere);
            }
            sphere.Radius *= moonScale;
            moonSphere = sphere;
            radiusOfMoon = sphere.Radius;

            roll = 0;
            yaw = 0;

            moonPos = this.Position + Vector3.Transform(new Vector3(radiusOfMoon + radiusOfPlanet + distanceAway, 0, 0), Matrix.CreateFromQuaternion(Quaternion.CreateFromYawPitchRoll(startingYaw, 0, roll)));
            moonWorld = Matrix.CreateScale(moonScale) * Matrix.CreateFromQuaternion(Quaternion.CreateFromYawPitchRoll(yaw, pitchSpeed, roll)) * Matrix.CreateTranslation(moonPos);
        }
开发者ID:nthfloor,项目名称:Nebulon12,代码行数:37,代码来源:Planet.cs

示例6: CanEnterOnTeam

 public bool CanEnterOnTeam(Team t)
 {
     if (t.Equals(Team.blue))
         return (BlueTeam.Count < 5);
     else if (t.Equals(Team.red))
         return (RedTeam.Count < 5);
     else if (t.Equals(Team.yellow))
         return (YellowTeam.Count < 5);
     else if (t.Equals(Team.green))
         return (GreenTeam.Count < 5);
     return false;
 }
开发者ID:TheNaked,项目名称:Firewind,代码行数:12,代码来源:Teams.cs

示例7: GetEnemyTeam

 /* Returns the other team */
 public Team GetEnemyTeam(Team team)
 {
     return (team.Equals(FirstTeam)) ? SecondTeam : FirstTeam;
 }
开发者ID:Jecral,项目名称:Football,代码行数:5,代码来源:AI.cs


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