本文整理汇总了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;
}
示例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;
}
示例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));
}
示例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);
}
}
示例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);
}
示例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;
}
示例7: GetEnemyTeam
/* Returns the other team */
public Team GetEnemyTeam(Team team)
{
return (team.Equals(FirstTeam)) ? SecondTeam : FirstTeam;
}