Fixed some little things.
This commit is contained in:
parent
fd077aa54a
commit
8694b5412b
|
@ -453,6 +453,13 @@ Oversimplified.Room = function (name, options) {
|
|||
self.foreground.src = options.foreground;
|
||||
self.foreground.onload = function () {this.loaded = true;}
|
||||
}
|
||||
|
||||
// Set any extra properties from Options.
|
||||
for (var property in options) {
|
||||
if (typeof this[property] === 'undefined') {
|
||||
this[property] = options[property];
|
||||
}
|
||||
}
|
||||
|
||||
this.drawOrder = [];
|
||||
|
||||
|
@ -634,9 +641,11 @@ Oversimplified.GameObject = function (name, options) {// x, y, imageSrc, maskIma
|
|||
} else {
|
||||
this.image = Oversimplified.emptyImage;
|
||||
}
|
||||
|
||||
this.image.xScale = typeof options.xScale !== 'undefined' ? options.xScale : 1;
|
||||
this.image.yScale = typeof options.yScale !== 'undefined' ? options.yScale : 1;
|
||||
this.image.rotation = typeof options.rotation !== 'undefined' ? options.rotation : 0;
|
||||
this.image.yScale = typeof options.yScale !== 'undefined' ? options.yScale : this.image.xScale;
|
||||
|
||||
this.image.rotation = typeof options.rotation !== 'undefined' ? Math.clampAngle(options.rotation) : 0;
|
||||
|
||||
this.image.animations = {};
|
||||
|
||||
|
@ -670,12 +679,12 @@ Oversimplified.GameObject = function (name, options) {// x, y, imageSrc, maskIma
|
|||
|
||||
if (this.mask.src != "") {
|
||||
this.mask.onload = function(){
|
||||
self.xBound = this.width / 2;
|
||||
self.yBound = this.height / 2;
|
||||
self.xBound = this.width / 2 * self.image.xScale;
|
||||
self.yBound = this.height / 2 * self.image.yScale;
|
||||
};
|
||||
} else {
|
||||
self.xBound = this.mask.width / 2;
|
||||
self.yBound = this.mask.height / 2;
|
||||
self.xBound = this.mask.width / 2 * self.image.xScale;
|
||||
self.yBound = this.mask.height / 2 * self.image.yScale;
|
||||
}
|
||||
|
||||
// Set any extra properties from Options.
|
||||
|
|
|
@ -20,7 +20,7 @@ var pr_ship = OS.P.Add("Ship", {
|
|||
moveStepSize: 3,
|
||||
moveStepAmount: 5 * Oversimplified.R[Oversimplified.R.currentRoom].stepSpeed,
|
||||
moveStepProgress: 0,
|
||||
doTakeStep: false,
|
||||
doTakeStep: false
|
||||
});
|
||||
|
||||
pr_ship.Do = function () {
|
||||
|
|
2
start.js
2
start.js
|
@ -30,7 +30,7 @@ function drawPixelText(text, x, y, wrapWidth, color, size) {
|
|||
var letterSizeX = ((size == 6) ? size - 1 : size) * OS.S.pixelScale;
|
||||
var letterSizeY = size * OS.S.pixelScale;
|
||||
var maxWrapWidth = Math.floor(OS.camera.width / (letterSizeX + OS.S.pixelScale));
|
||||
console.log(maxWrapWidth);
|
||||
|
||||
wrapWidth = (wrapWidth <= 0 || wrapWidth > maxWrapWidth) ? maxWrapWidth : wrapWidth;
|
||||
|
||||
var alphabet = new Image();
|
||||
|
|
Loading…
Reference in New Issue