Skip to content

Commit 0196870

Browse files
committed
2 parents bef93bc + 2686905 commit 0196870

File tree

9 files changed

+11716
-10311
lines changed

9 files changed

+11716
-10311
lines changed

public/assets/bugs/cloud.png

4.48 KB
Loading

public/assets/bugs/mask.png

3.71 KB
Loading

public/build/dev.js

Lines changed: 1563 additions & 520 deletions
Large diffs are not rendered by default.

public/build/phaser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/documentIndex.json

Lines changed: 5723 additions & 5484 deletions
Large diffs are not rendered by default.

public/examples.json

Lines changed: 4334 additions & 4306 deletions
Large diffs are not rendered by default.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
var config = {
2+
type: Phaser.AUTO,
3+
parent: 'phaser-example',
4+
width: 800,
5+
height: 600,
6+
scene: {
7+
preload: preload,
8+
create: create
9+
}
10+
};
11+
12+
var game = new Phaser.Game(config);
13+
14+
function preload ()
15+
{
16+
this.load.audio('synth1', [
17+
'assets/audio/tech/synth1.ogg',
18+
'assets/audio/tech/synth1.mp3'
19+
]);
20+
}
21+
22+
function create ()
23+
{
24+
var sound1 = this.sound.add('synth1', { loop: true });
25+
var sound2 = this.sound.add('synth1', { loop: true });
26+
27+
sound1.play();
28+
}

public/src/bugs/0000 mask.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
class Scene extends Phaser.Scene
2+
{
3+
constructor()
4+
{
5+
super();
6+
}
7+
8+
preload()
9+
{
10+
this.load.image("cloud", "assets/bugs/cloud.png");
11+
this.load.image("mask", "assets/bugs/mask.png");
12+
}
13+
14+
create()
15+
{
16+
this.cameras.main.setBackgroundColor(0xA9D4C9);
17+
18+
this.add.image(400, 280, "cloud");
19+
20+
const cloud2 = this.add.image(400, 300 + 100, "cloud");
21+
22+
const mask = this.make.image({
23+
x: 400,
24+
y: 500,
25+
key: 'mask',
26+
add: false
27+
});
28+
29+
cloud2.mask = new Phaser.Display.Masks.BitmapMask(this, mask);
30+
31+
cloud2.mask.invertAlpha = true;
32+
}
33+
}
34+
35+
const config = {
36+
type: Phaser.AUTO,
37+
parent: 'phaser-example',
38+
width: 800,
39+
height: 600,
40+
scene: Scene
41+
}
42+
43+
new Phaser.Game(config);

public/src/bugs/5572 ff audio.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var config = {
2+
type: Phaser.AUTO,
3+
parent: 'phaser-example',
4+
width: 800,
5+
height: 600,
6+
scene: {
7+
preload: preload,
8+
create: create
9+
}
10+
};
11+
12+
var game = new Phaser.Game(config);
13+
14+
function preload ()
15+
{
16+
this.load.audio('sfx', [ 'assets/audio/stage_sfx2.mp3' ]);
17+
}
18+
19+
function create ()
20+
{
21+
var sound1 = this.sound.add('sfx');
22+
23+
sound1.play();
24+
}

0 commit comments

Comments
 (0)