-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjectBackground.class.js
More file actions
40 lines (30 loc) · 890 Bytes
/
ObjectBackground.class.js
File metadata and controls
40 lines (30 loc) · 890 Bytes
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
import { ObjectStatic } from './ObjectStatic.class.js'
var ObjectBackground = function() {
var that = new ObjectStatic();
that.name = 'background';
that.collide = function( b ) {
return false;
};
that.in_air = false;
that.rolling = false;
that.repeat = 'repeat'; // or 'repeat-x', 'repeat-y', 'no-repeat'
that.fixed = false;
that.scroll = 0; // amount of parallax scrolling
that.get_state = function() {
that.sm.changeState( new that.Chill(), that );
};
// that.tmpGetWidth = that.getWidth;
// that.getWidth = function() {
// if(that.repeat === 'repeat') {
// return window.cfg.level_width;
// } else if(that.repeat === 'repeat-x') {
// return window.cfg.level_width;
// } else if(that.repeat === 'repeat-y') {
// return that.tmpGetWidth();
// } else {
// return that.tmpGetWidth();
// }
// };
return that;
};
export { ObjectBackground }