How to create a delay of "1" second in jmonkey

I am creating a small cube game in jmonkey. After every one second the cubes must move. Can anyone help me with a code of how to create a one second delay?

time += tpf;
if( time > 1 ) {
// do something
}

???

1 Like

i am new to jmonkey…what is tpf???

@rakesh8015 said: i am new to jmonkey...what is tpf???

Do all of the tutorials. They will answer your next 500 questions in advance.

4 Likes