RoboticTea
Terrarian
I'm trying to create a custom dust but for some reason it's not affected by gravity anyone knows why ?
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace Nope.Dusts
{
public class DustCustom : ModDust
{
public override void OnSpawn(Dust dust)
{
dust.color = new Color(255, 50, 255);
dust.alpha = 1;
dust.scale = 1.13f;
dust.velocity *= 0.1f;
dust.noGravity = false;
dust.noLight = false;
}
public override bool Update(Dust dust)
{
dust.position += dust.velocity;
dust.rotation += dust.velocity.X * 0.0f;
dust.scale *= 0.99f;
float light = 0.1f * dust.scale;
Lighting.AddLight(dust.position, light, light, light);
if (dust.scale < 0.1f)
{
dust.active = false;
}
return false;
}
}
}
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace Nope.Dusts
{
public class DustCustom : ModDust
{
public override void OnSpawn(Dust dust)
{
dust.color = new Color(255, 50, 255);
dust.alpha = 1;
dust.scale = 1.13f;
dust.velocity *= 0.1f;
dust.noGravity = false;
dust.noLight = false;
}
public override bool Update(Dust dust)
{
dust.position += dust.velocity;
dust.rotation += dust.velocity.X * 0.0f;
dust.scale *= 0.99f;
float light = 0.1f * dust.scale;
Lighting.AddLight(dust.position, light, light, light);
if (dust.scale < 0.1f)
{
dust.active = false;
}
return false;
}
}
}