forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCache.js
More file actions
36 lines (28 loc) · 797 Bytes
/
Copy pathCache.js
File metadata and controls
36 lines (28 loc) · 797 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
var BaseCache = require('./BaseCache');
var Cache = function ()
{
this.sound = new BaseCache();
this.video = new BaseCache();
this.text = new BaseCache();
this.json = new BaseCache();
this.xml = new BaseCache();
this.physics = new BaseCache();
this.tilemap = new BaseCache();
this.binary = new BaseCache();
this.bitmapFont = new BaseCache();
this.shader = new BaseCache();
this.custom = {};
};
Cache.prototype.constructor = Cache;
Cache.prototype = {
// Add your own custom Cache entry, available under Cache.custom.key
addCustom: function (key)
{
if (!this.custom.hasOwnProperty(key))
{
this.custom[key] = new BaseCache();
return this.custom[key];
}
}
};
module.exports = Cache;