Example #1
0
 public void AddDust(string name, ModDust dust, string texture = "")
 {
     dust.Name = name;
     if(texture.Length > 0)
     {
     dust.Texture = ModLoader.GetTexture(texture);
     }
     else
     {
     dust.Texture = Main.dustTexture;
     }
     dust.mod = this;
     dusts[name] = dust;
 }
Example #2
0
 public void AddDust(string name, ModDust dust, string texture = "")
 {
     int id = ModDust.ReserveDustID();
     ModDust.dusts[id] = dust;
     dust.Type = id;
     dust.Name = name;
     if (texture.Length > 0)
     {
         dust.Texture = ModLoader.GetTexture(texture);
     }
     else
     {
         dust.Texture = Main.dustTexture;
     }
     dust.mod = this;
     dusts[name] = dust;
 }
Example #3
0
		public void AddDust(string name, ModDust dust, string texture = "")
		{
			int id = ModDust.ReserveDustID();
			ModDust.dusts.Add(dust);
			dust.Type = id;
			dust.Name = name;
			dust.Texture = texture.Length > 0 ? ModLoader.GetTexture(texture) : Main.dustTexture;
			dust.mod = this;
			dusts[name] = dust;
		}