public override bool respondToDeleteClickAndReturnIfShouldBeDeleted(Ray ray)
        {
            Stockpile stockPileAlongRay = (Stockpile)Intersection.getNearestIntersectableAlongRay(ray, stockpiles);

            stockpiles.Remove(stockPileAlongRay);
            return(false);
        }
        public override float?intersects(Ray ray)
        {
            //return Intersection.intersects(ray, resourceBlocks.Keys);
            Intersectable intersected = Intersection.getNearestIntersectableAlongRay(ray, stockpiles);

            if (intersected != null)
            {
                return(intersected.intersects(ray));
            }
            return(null);
        }
示例#3
0
 internal JobSite getJobSiteAlongRay(Microsoft.Xna.Framework.Ray ray)
 {
     return((JobSite)Intersection.getNearestIntersectableAlongRay(ray, jobSites));
 }
 Stockpile getStockpileAlongRay(Ray ray)
 {
     return((Stockpile)Intersection.getNearestIntersectableAlongRay(ray, stockpiles));
 }