canvas-prime icon indicating copy to clipboard operation
canvas-prime copied to clipboard

Time Passed Delta

Open ashblue opened this issue 13 years ago • 0 comments

A delta should be included in the master loop so time sensitive data can be multiplied by it. For example, updating a square's x position should look like so.

Square = {
    update: function () {
        // Makes 2 a ratio relative to the time passed
        this.x += 2 * cp.core.delta;
    }
};

ashblue avatar Sep 26 '12 04:09 ashblue