examples/example4/example4.js
function () {
        this.update = {
            gravity: function (entity, dt) {
                // Accelerate entity until it reaches terminal velocity.
                if (entity.c.velocity.yspeed < entity.c.gravity.terminal) {
                    entity.c.velocity.yspeed += hitagi.utils.delta(entity.c.gravity.magnitude, dt);
                }
            }
        };
    }
function () {
        this.update = {
            gravity: function (entity, dt) {
                // Accelerate entity until it reaches terminal velocity.
                if (entity.c.velocity.yspeed < entity.c.gravity.terminal) {
                    entity.c.velocity.yspeed += hitagi.utils.delta(entity.c.gravity.magnitude, dt);
                }
            }
        };
    }
function ( ) { this . update = { gravity : function ( entity , dt ) { // Accelerate entity until it reaches terminal velocity. if ( entity . c . velocity . yspeed < entity . c . gravity . terminal ) { entity . c . velocity . yspeed += hitagi . utils . delta ( entity . c . gravity . magnitude , dt ) ; } } } ; }
Define systems.
Define systems .