You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that some media sources like browsers don't update the time properly, however a possible solution for this could be to manually add the DeltaTime if the program detects a playing state, but no increase in time.
Note, that the following is only an example. I'm not versed in c# and it's obviously not tested, MediaVariable.Time might not be an integer and deltaTime would need to be calculated somehow.
privateintpreviousTime=0;privateintgetMediaTime(){privateintmediaTime= MediaVariable.Time;if(mediaTime==previousTime){mediaTime=mediaTime+deltaTime;//Time since last update}previousTime=mediaTime;returnmediaTime;}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I know that some media sources like browsers don't update the time properly, however a possible solution for this could be to manually add the DeltaTime if the program detects a playing state, but no increase in time.
Note, that the following is only an example. I'm not versed in c# and it's obviously not tested,
MediaVariable.Time
might not be an integer anddeltaTime
would need to be calculated somehow.Beta Was this translation helpful? Give feedback.
All reactions