示例#1
0
        public void Draw(List <ClassifiedObject> doodads, List <ClassifiedObject> creatures)
        {
            //hide everything
            foreach (UIElement ele in RadarCanvas.Children)
            {
                if (!(ele is IHousing) || !radarWindow.CurrentSettings.HouseScanSettings.ShowRealEstate)
                {
                    ele.Visibility = Visibility.Hidden;
                }
            }

            if (doodads != null)
            {
                foreach (ClassifiedObject co in doodads)
                {
                    DrawObjectSymbol(co);

                    if (radarWindow.CurrentSettings.DisplaySettings.BeepThunder && co.category == ObjectCategory.ThunderstruckTree && !ThunderBeeped.ContainsKey(co.obj.objId))
                    {
                        radarWindow.Beep(null, null);
                        ThunderBeeped[co.obj.objId] = true;
                    }

                    //draw text
                    if (radarWindow.CurrentSettings.ActiveTab.DisplayNames)
                    {
                        DrawText(co.obj.objId, ((DoodadObject)co.obj).name, co.obj.X, co.obj.Y, co.category.Color());
                    }
                }
            }

            if (creatures != null)
            {
                foreach (ClassifiedObject co in creatures)
                {
                    DrawObjectSymbol(co);

                    //draw text
                    if (radarWindow.CurrentSettings.ActiveTab.DisplayNames && !(co.obj is Housing) && !(co.obj is Slave))
                    {
                        DrawText(co.obj.objId, ((Creature)co.obj).name, co.obj.X, co.obj.Y, co.category.Color());
                    }
                }
            }
            houseScanner.Tick();

            UpdatePlayer();
        }