LameFunctions¶
A few functions that don't really fit anywhere else.
fn : "LameFunctions"
Functions¶
fn.Sleep¶
Wait the specified number of milliseconds before continuing.
fn.Sleep(milliseconds)
- milliseconds - The number of milliseconds to wait.
No return value.
Sometimes you need a time delay in your program, and calling repeat 20000 just isn’t good enough. fn.Sleep lets you pause for a specified time with millisecond accuracy.
fn.TestBoxCollision¶
Test if two rectangular regions of the screen overlap.
fn.TestBoxCollision(x1, y1, w1, h1, x2, y2, w2, h2)
-
x1, y1, w1, h1 - The dimensions of the first object.
-
x2, y2, w2, h2 - The dimensions of the second object.
No return value.
Test if two rectangles on the screen overlap. If you want two objects the screen to interact with each other, you might need this.
For a working example, try demos/collision/TestBoxCollision.spin in the LameStation SDK.