How to subtract regular speed from float ?

Hi. :smile:

I want some float value minused or plused by other function.

Let’s say,

static var LPboost = 0.0; //change LP from other script

var curLP = 0.0; //current LP value.
var maxLP = 100.0; // maximus LP value.


function Update(){

...

Then, how to change that curLP diminishing or filling up by regular speed?

++ and – is just for int variable, right?

Then what is for float value?

Using Time.deltaTime?

you could use

curLP += Time.deltaTime;

if that’s what you’re looking for