[C#] 纯文本查看 复制代码
public ILineStyle SilentChestLineStyle { get; } = Render.GetLineStyle(200, 255, 255, 0);
public ITexture SilentChestIcon { get ; } = Render.GetTexture(SupportedTextureId.UIStash_4029005773, 128);
//* *******//
public float SilentChestSize { get; set; } = 4.0f; / / Silent Chest - Icon size on map
public float SilentChestWorldCircleSize { get; set; } = 1f; // Silent Chest - World Overlay Circle Size
public float SilentChestMapCircleSize { get; set; } = 30f; // silent chest - Minimap circle radius size
public bool SilentChestOnMap { get; set; } = true; // Silent Chest - Check box to turn on/off the Map icone and circle
public bool SilentChestOnGround { get; set; } = true; // Silent chest - Check box to turn on/off the Ground Circle
//** ******//
_resplendentChestOnMap = AddFeature(nameof(_resplendentChestOnMap), "Resplendent chest on map")
.AddBooleanResource(nameof(ResplendentChestOnMap), "Icon on map on/off" ,
() => ResplendentChestOnMap, v => ResplendentChestOnMap = v)
.AddFloatResource(nameof(ResplendentChestSize), "Icon size on map ",
1.0f, 11.0f, () => ResplendentChestSize, v => ResplendentChestSize = v)
.AddFloatResource (nameof(ResplendentChestMapCircleSize), "Map circle radius size",
1.0f, 100f, () => ResplendentChestMapCircleSize, v => ResplendentChestMapCircleSize = v)
.AddFloatResource(nameof(ResplendentChestMapCircleStrokeSize), "Map circle stroke size",
1.0f, 1 00f , () => ResplendentChestMapCircleStrokeSize, v => ResplendentChestMapCircleStrokeSize = v)
.AddBooleanResource(nameof(ResplendentChestOnGround), "Circle on ground on /off",
() => ResplendentChestOnGround, v => ResplendentChestOnGround = v)
.AddFloatResource(nameof(Resplen dentChestWorldCircleSize ), "Icon size on ground",
1.0f, 11.0f, () => ResplendentChestWorldCircleSize, v => ResplendentChestWorldCircleSize = v );
//********//
if (_resplendentChestOnMap.Enabled && layer == GameWorldLayer.Map)
{
var chests = Game .GizmoActors.Where(x => x.World.WorldSno == Map.MapWorldSno && x.GizmoType == GizmoType.Chest && x.ActorSno.NameEnglish is "Resplendent Chest");
var size = Game.WindowHeight / 100f * ResplendentChestSize;
foreach (var chest in chests)
{
switch (layer)
{
case GameWorldLayer.Ground when ResplendentChestOnGround:
if (!chest.Coordinate.IsOnScreen)
continue;
ResplendentChestLineStyle.DrawWorldEllipse(ResplendentChestWorldCircleSize, -1, chest.Coordinate, strokeWidthCorrection : ResplendentChestWorldCircleSize);
ResplendentChestIcon.Draw(chest.Coordinate.MapX - ( size / 2), chest.Coordinate.MapY - (size / 2), size, size, sharpen: false); break;
case
GameWorldLayer.Map:
if ( !chest.Coordinate.IsOnMap)
continue;
ResplendentChestLineStyle.DrawEllipse(chest.Coordinate. MapX, chest.Coordinate.MapY, ResplendentChestMapCircleSize, ResplendentChestMapCircleSize, strokeWidthCorrection: ResplendentChestMapCircleStrokeSize);
ResplendentChestIcon.Draw(chest.Coordinate. MapX - (size / 2), chest.Coordinate.MapY - (size / 2), size, size, sharpen : false);
break;
}
}
}