fCraft.BoundingBox.Contains C# (CSharp) Method

Contains() public method

Checks if a given point is inside this bounding box.
public Contains ( int x, int y, int h ) : bool
x int
y int
h int
return bool
        public bool Contains( int x, int y, int h ) {
            return x >= XMin && x <= XMax &&
                   y >= YMin && y <= YMax &&
                   h >= HMin && h <= HMax;
        }

Same methods

BoundingBox::Contains ( BoundingBox other ) : bool

Usage Example

コード例 #1
0
ファイル: CtfGame.cs プロジェクト: Magi1053/ProCraft
		static void KillExplosion(Player player, Vector3I coords) {
			foreach (Player p in world.Players) {
				if (p == player)
					continue;
				Vector3I cpPos = p.Position.ToBlockCoords();
				Vector3I cpPosMax = new Vector3I(cpPos.X + 2, cpPos.Y + 2, cpPos.Z + 2);
				Vector3I cpPosMin = new Vector3I(cpPos.X - 2, cpPos.Y - 2, cpPos.Z - 2);
				BoundingBox bounds = new BoundingBox(cpPosMin, cpPosMax);
				
				if (bounds.Contains(coords) && p.Team != player.Team)
					Kill(player, p, " &cexploded ");
			}
		}
All Usage Examples Of fCraft.BoundingBox::Contains