mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-26 10:37:44 +01:00
Better way of handling inheriting in javascript.
This commit is contained in:
parent
dfe33efdc3
commit
dfc051743d
@ -27,8 +27,7 @@ KzedProjection.prototype = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function KzedMapType() {}
|
function KzedMapType() {}
|
||||||
KzedMapType.prototype = {
|
KzedMapType.prototype = $.extend(new DynMapType(), {
|
||||||
__proto__: new DynMapType(),
|
|
||||||
constructor: KzedMapType,
|
constructor: KzedMapType,
|
||||||
projection: new KzedProjection(),
|
projection: new KzedProjection(),
|
||||||
tileSize: new google.maps.Size(128, 128),
|
tileSize: new google.maps.Size(128, 128),
|
||||||
@ -114,18 +113,18 @@ KzedMapType.prototype = {
|
|||||||
}
|
}
|
||||||
return tile.get(0);
|
return tile.get(0);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
|
|
||||||
DefaultMapType.prototype = new KzedMapType();
|
|
||||||
DefaultMapType.prototype.constructor = DefaultMapType;
|
|
||||||
function DefaultMapType(){}
|
function DefaultMapType(){}
|
||||||
DefaultMapType.prototype.prefix = 't';
|
DefaultMapType.prototype = $.extend(new KzedMapType(), {
|
||||||
|
prefix: 't'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CaveMapType.prototype = new KzedMapType();
|
|
||||||
CaveMapType.prototype.constructor = CaveMapType;
|
|
||||||
function CaveMapType(){}
|
function CaveMapType(){}
|
||||||
CaveMapType.prototype.prefix = 'ct';
|
CaveMapType.prototype = $.extend(new KzedMapType(), {
|
||||||
|
prefix: 'ct'
|
||||||
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user