hi im new to c# and converting some old code from .js and ive got this issue i cant seam to figure out. its showing the error that i cant convert double to float for the “.25 * Time.deltaTime”. if i cant use “.25” is there another way i should be writing this?
void Knockback()
{
aa = transform.position;
bb = transform.position;
while (bb.y <= (aa.y + 4))
{
transform.Translate(0, (.25 * Time.deltaTime), (-.25 * Time.deltaTime));
bb = transform.position;
}
if (bb.y >= (aa.y + 4))
{
KNOCKBACK = false;
}
}
void Knockbackdamage()
{
aa = transform.position;
bb = transform.position;
while (bb.y <= (aa.y + 4))
{
transform.Translate(0, (.25 * Time.deltaTime), (-.25 * Time.deltaTime));
bb = transform.position;
}
if (bb.y >= (aa.y + 4))
{
KNOCKBACKdamage = false;
// HealthControl.DAMAGE = true;
}
}