コード例 #1
0
        public override bool contains(CHitShape otherShape)
        {
            switch (otherShape.shape)
            {
            case shapeType.circle:

                if ((Math.Sqrt(Math.Pow(position.X - otherShape.position.X, 2) + Math.Pow(position.Y - otherShape.position.Y, 2))) <
                    radius + ((CHitSphere)otherShape).radius)
                {
                    return(true);
                }
                break;

            case shapeType.box:
                break;
            }

            return(false);
        }
コード例 #2
0
ファイル: CHitSphere.cs プロジェクト: StevenEBarbaro/gearsvge
        public override bool contains(CHitShape otherShape)
        {
            switch (otherShape.shape)
            {
                case shapeType.circle:

                    if ( (Math.Sqrt(Math.Pow(position.X - otherShape.position.X,2) + Math.Pow(position.Y - otherShape.position.Y,2))) <
                        radius + ((CHitSphere)otherShape).radius)
                    {
                        return true;
                    }
                    break;

                case shapeType.box:
                    break;
            }

            return false;
        }
コード例 #3
0
ファイル: CHitShape.cs プロジェクト: mzaman07/kot-mono
 public abstract bool contains(CHitShape otherShape);
コード例 #4
0
ファイル: CHitShape.cs プロジェクト: spectrumbranch/gearsvge
 public abstract bool contains(CHitShape otherShape);