protected void CheckMouseClick(object sender, ClickEventArgs args)
        {
            var sphere = model.Meshes[0].BoundingSphere;
            sphere.Center = GameData.GlobalData.Ground + initialData.Location;

            Nullable<float> result = args.pickingRay.Intersects (sphere);

            if (result.HasValue && result.Value < float.MaxValue) {
                OnMouseClick ();
            }
        }
Exemple #2
0
        protected void CheckMouseClick(object sender, ClickEventArgs args)
        {
            var sphere = model.Meshes[0].BoundingSphere;

            sphere.Center = GameData.GlobalData.Ground + initialData.Location;

            Nullable <float> result = args.pickingRay.Intersects(sphere);

            if (result.HasValue && result.Value < float.MaxValue)
            {
                OnMouseClick();
            }
        }