User Interaction
The Scene captures keyboard and mouse events by default.
- click
To have entities receive these events add the 'captureSceneEvents' component to any entity.
Scene Config
{ "map":"config/map/main.json" //initial map to load. Can be file name or map config. ,"cameras":[ //optional - define cameras (if you don't specify this key one will be generated automatically) { width:100 ,height:100 ,name:"main" } ] ,"entityPools":[ //optional - array of pools to create. each pool contains the entity config file name, //and amount of copies to initially spawn {"entityFile": "config/entities/powerShot.json", "amount":20} ] ,"sounds":[ //optional - list of sounds files to pre-load "assets/sounds/SciFiMediumExplosion.wav" ] ,"components":[ //optional - Array of scene component configs to load { "type":"pixelblit.bunnyblast.BunnyblastSceneComponent" } ] ,"worlds":{ //optional - world configs for each world type used. This example sets gravity on the box2d world. box2d:{ gravity:{ "x":0, "y":5} } } }