Example #1
0
    private static EntityDataRoot smethod_20(Map map_0, Ship ship_0)
    {
        EntityDataRoot entityDataRoot   = new EntityDataRoot((ship_0 is Hero) ? 0.8333333f : 0.166666672f, 0.8f);
        float          hpPercentage     = ship_0.HpPercentage;
        float          shieldPercentage = ship_0.ShieldPercentage;
        string         hpDisplay        = ship_0.HpDisplay;
        string         shieldDisplay    = ship_0.ShieldDisplay;
        int            num  = (int)(Math.Ceiling((double)(116f * hpPercentage / 200f)) * 2.0);
        int            num2 = (int)(Math.Ceiling((double)(116f * shieldPercentage / 200f)) * 2.0);

        entityDataRoot.Data = new List <EntityRenderFragment>
        {
            GClass840.smethod_7(Color.FromArgb(150, Color.LightSlateGray), 120, 20, null),
            GClass840.smethod_7(Color.FromArgb(150, Color.LawnGreen), num, 16, null),
            GClass840.smethod_11(Color.FromArgb(150, Color.White), "12px Arial", "center", hpDisplay, null),
            GClass840.smethod_7(Color.FromArgb(150, Color.LightSlateGray), 120, 20, null),
            GClass840.smethod_7(Color.FromArgb(150, Color.DodgerBlue), num2, 16, null),
            GClass840.smethod_11(Color.FromArgb(150, Color.White), "12px Arial", "center", shieldDisplay, null)
        };
        entityDataRoot.Data[1].OffsetX = (float)(num / 2 - 58);
        entityDataRoot.Data[2].OffsetY = 4f;
        entityDataRoot.Data[3].OffsetY = 24f;
        entityDataRoot.Data[4].OffsetX = (float)(num2 / 2 - 58);
        entityDataRoot.Data[4].OffsetY = 24f;
        entityDataRoot.Data[5].OffsetY = 24f + entityDataRoot.Data[2].OffsetY;
        string string_ = ship_0.Name;
        Hero   hero    = ship_0 as Hero;

        if (hero != null)
        {
            string_ = "";
            if (hero.Cloaked)
            {
                string_ = "Cloaked";
            }
        }
        entityDataRoot.Data.Add(GClass840.smethod_11(Color.DarkRed, "13px Arial", "center", string_, null));
        entityDataRoot.Data.Last <EntityRenderFragment>().OffsetY = entityDataRoot.Data[2].OffsetY - 24f;
        return(entityDataRoot);
    }
Example #2
0
 private static EntityRenderFragment smethod_6(Color color_0, int int_0, Color?nullable_0 = null)
 {
     return(GClass840.smethod_7(color_0, int_0, int_0, nullable_0));
 }