Beispiel #1
0
 public void ChangeHero(Hero hero)
 {
     this.hero = hero;
     classIcon?.Finish();
     elementIcon?.Finish();
     classIcon   = new ClassIcon("ClassIcon", this, CLASS_X, CLASS_Y, hero.heroClass);
     elementIcon = new ElementIcon("ElementIcon", this, CLASS_X, CLASS_Y + CLASS_ELEMENT_GAP, hero.heroElement);
     components.Add(classIcon);
     components.Add(elementIcon);
 }
Beispiel #2
0
        public HeroDetail(string name, GUIComponent parent, int rx, int ry, Hero hero) : base(name, parent, rx, ry)
        {
            this.hero  = hero;
            star       = Global.content.Load <Texture2D>("RarityStar");
            background = Global.content.Load <Texture2D>("HeroDetailBackground");
            font       = Global.content.Load <SpriteFont>("neodgm12");

            Texture2D buttonTexture = Global.content.Load <Texture2D>("HeroDetailButton");

            purifyButton = new Button("PurifyButton", this, BUTTON_X, BUTTON_Y, buttonTexture, BUTTON_WIDTH);
            components.Add(purifyButton);

            classIcon   = new ClassIcon("ClassIcon", this, CLASS_X, CLASS_Y, hero.heroClass);
            elementIcon = new ElementIcon("ElementIcon", this, CLASS_X, CLASS_Y + CLASS_ELEMENT_GAP, hero.heroElement);
            components.Add(classIcon);
            components.Add(elementIcon);
        }