Ejemplo n.º 1
0
        public bool SetAccent(string name)
        {
            if (!Accents.ContainsKey(name))
            {
                return(false);
            }

            Uri accent = Accents[name];

            InvokeWindow(() => MainWindow.GetInstance().UpdateThemeManager(accent, ActiveTheme));

            foreach (ITheme theme in Themes)
            {
                theme.SetAccent(accent);
            }

            return(SetTheme(ActiveTheme.Name));
        }
Ejemplo n.º 2
0
        public SwordAccent(string texture, string suffix, int originX, int originY, int mana = 0, Action <Player, NPC, ProceduralSword, int, bool> onHit = null,
                           float dpsModifier = 1f, int critBonus = 0, Action <Rectangle, Player> effect = null)
        {
            Type = Accents.Count;
            if (Main.netMode != NetmodeID.Server)
            {
                if (texture != null)
                {
                    Texture = ModLoader.GetMod(Constants.ModName).GetTexture("Content/GFX/Items/Accents/" + texture);
                }
            }
            Suffix      = suffix;
            Origin      = new Vector2(originX, originY);
            OnHit       = onHit;
            DpsModifier = dpsModifier;
            CritBonus   = critBonus;
            Effect      = effect;
            Mana        = mana;

            if (!Accents.ContainsKey(Type))
            {
                Accents.Add(Type, this);
            }
        }