Exemplo n.º 1
0
 public void AddBuff(string name, ModBuff buff, string texture)
 {
     int id = BuffLoader.ReserveBuffID();
     buff.Name = name;
     buff.Type = id;
     buffs[name] = buff;
     BuffLoader.buffs[id] = buff;
     buff.texture = texture;
     buff.mod = this;
 }
Exemplo n.º 2
0
        public int BuffType(string name)
        {
            ModBuff buff = GetBuff(name);

            if (buff == null)
            {
                return(0);
            }
            return(buff.Type);
        }
Exemplo n.º 3
0
        public void AddBuff(string name, ModBuff buff, string texture)
        {
            int id = BuffLoader.ReserveBuffID();

            buff.Name            = name;
            buff.Type            = id;
            buffs[name]          = buff;
            BuffLoader.buffs[id] = buff;
            buff.texture         = texture;
            buff.mod             = this;
        }
Exemplo n.º 4
0
        private void AutoloadBuff(Type type)
        {
            ModBuff buff = (ModBuff)Activator.CreateInstance(type);

            buff.mod = this;
            string name    = type.Name;
            string texture = (type.Namespace + "." + type.Name).Replace('.', '/');

            if (buff.Autoload(ref name, ref texture))
            {
                AddBuff(name, buff, texture);
            }
        }