nl_tokens: Create between {
pl_tokens: function ( game , config ) { var particleCount = Math . floor ( random . inRange ( config . qtyMin , config . qtyMax ) ) ; for ( var i = 0 ; i < particleCount ; i ++ ) { var particle = game . prefabs . instantiate ( game . entities , config . prefab ) ; // check if origin is an entity var origin = config . origin ; if ( typeof config . origin === "number" ) { origin = choosePointInEntity ( game , origin ) ; } var randomSize = <mask> . inRange ( config . sizeMin , config . sizeMax ) ; scaleEntityRect ( game , particle , randomSize ) ; centerEntityOnPoint ( game , particle , origin ) ; var velocity = random . inRange ( config . velocityMin , config . velocityMax ) ; var angle = pickAngle ( config , i , particleCount ) ; var velocityComponent = game . entities . addComponent ( particle , "velocity" ) ; var direction = pointOnCircle ( angle , velocity ) ; velocityComponent . x = direction . x ; velocityComponent . y = direction . y ; if ( config . accelerationX || config . accelerationY ) { var accel = game . entities . addComponent ( particle , "acceleration" ) ; accel . x = config . accelerationX ; accel . y = config . accelerationY ; } var lifeSpan = game . entities . addComponent ( particle , "lifeSpan" ) ; lifeSpan . max = random . inRange ( config . lifeSpanMin , config . lifeSpanMax ) ; } }