-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHelp.js
85 lines (60 loc) · 2.48 KB
/
Help.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
weed.Help = function(game)
{
};
weed.Help.prototype =
{
preload: function()
{
this.BG= this.add.sprite(0 ,0 ,'background');
this.BG.alpha = 1;
this.add.tween(this.BG).delay(0).to({alpha: 0}, 1000, Phaser.Easing.Linear.None, false, 0).start();
},
create: function()
{
this.page1_load();
},
page1_load: function()
{
this.page1= this.add.sprite(0 ,0 ,'page1');
this.page1.scale.x= 1.161;
this.page1.scale.y= 1.22;
this.page1.alpha = 0;
this.add.tween(this.page1).delay(0).to({alpha: 1}, 1000, Phaser.Easing.Linear.None, false, 0).start();
this.back_arrow1 =this.add.sprite(this.world.centerX-50, 1100, 'back_arrow');
this.back_arrow1.anchor.setTo(0.5, 0.5);
this.back_arrow1.scale.x = 0.7;
this.back_arrow1.scale.y = 0.7;
this.back_arrow1.inputEnabled = true;
this.back_arrow1.events.onInputDown.add(this.back_menu, this);
this.back_arrow1 =this.add.sprite(this.world.centerX+50, 1100, 'next_arrow');
this.back_arrow1.anchor.setTo(0.5, 0.5);
this.back_arrow1.scale.x = 0.7;
this.back_arrow1.scale.y = 0.7;
this.back_arrow1.inputEnabled = true;
this.back_arrow1.events.onInputDown.add(this.page2_load, this);
},
page2_load: function()
{
this.page2= this.add.sprite(-3 ,-2 ,'page2');
this.page2.scale.x= 1.17;
this.page2.scale.y= 1.22;
this.page2.alpha = 0;
this.add.tween(this.page2).delay(0).to({alpha: 1}, 1000, Phaser.Easing.Linear.None, false).start();
this.back_arrow2 =this.add.sprite(this.world.centerX-50, 1100, 'back_arrow');
this.back_arrow2.anchor.setTo(0.5, 0.5);
this.back_arrow2.scale.x = 0.7;
this.back_arrow2.scale.y = 0.7;
this.back_arrow2.inputEnabled = true;
this.back_arrow2.events.onInputDown.add(this.page1_load, this);
this.back_arrow2 =this.add.sprite(this.world.centerX+50, 1100, 'next_arrow');
this.back_arrow2.anchor.setTo(0.5, 0.5);
this.back_arrow2.scale.x = 0.7;
this.back_arrow2.scale.y = 0.7;
this.back_arrow2.inputEnabled = true;
this.back_arrow2.events.onInputDown.add(this.back_menu, this);
},
back_menu: function()
{
this.state.start('MainMenu');
}
};