File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 'ninja ' => false ,
2323 'box2d ' => false ,
2424 'creature ' => false ,
25+ 'video ' => true ,
2526 );
2627 }
2728
240241 <script src=" $ path/src/gameobjects/RetroFont.js"></script>
241242
242243
244+ EOL ;
245+ }
246+
247+ if ($ modules ['video ' ])
248+ {
249+ echo <<<EOL
250+ <script src=" $ path/src/gameobjects/Video.js"></script>
251+
252+
243253EOL ;
244254 }
245255
Original file line number Diff line number Diff line change @@ -415,6 +415,23 @@ Phaser.GameObjectFactory.prototype = {
415415
416416 } ,
417417
418+ /**
419+ * Create a Video object.
420+ *
421+ * The video file must have already been loaded into the Phaser.Cache.
422+ * The key given is the key you used when the video was preloaded.
423+ * This will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.
424+ *
425+ * @method Phaser.GameObjectFactory#video
426+ * @param {string } key - The key of the file in the Phaser.Cache that this video will use.
427+ * @return {Phaser.Video } The newly created Video object.
428+ */
429+ video : function ( key ) {
430+
431+ return new Phaser . Video ( this . game , key ) ;
432+
433+ } ,
434+
418435 /**
419436 * Create a BitmapData object.
420437 *
You can’t perform that action at this time.
0 commit comments