Ejemplo n.º 1
0
 public override void _Ready()
 {
     instance       = this;
     nameLabel      = GetNode <Label>(NameLabelPath);
     hpLabel        = GetNode <Label>(HpLabelPath);
     hpBar          = GetNode <ColorRect>(HpFillPath);
     hpBar.RectSize = new Vector2((float)hpSizeMax, 10f);
 }
Ejemplo n.º 2
0
    public static void ShowMobHUD(Mob mob)
    {
        if (instance.currentMobHud != null)
        {
            HideMobHUD();
        }

        PackedScene mhps   = ResourceLoader.Load(instance.MobHudResourcePath) as PackedScene;
        MobHUD      mobHud = mhps.Instance() as MobHUD;

        instance.currentMobHud = mobHud;
        instance.AddChild(mobHud);
        mobHud.SetHudData(mob);
        GUIQueue.Add(GUIS.MobHud);
    }