|
|
@@ -1,21 +1,21 @@
|
|
|
(function(window) {
|
|
|
function PhysicistView(modelObject){
|
|
|
// this.graphics.beginFill("red").drawCircle(0, 0, window.cell_size * 0.9 / 2);
|
|
|
+ // TODO: read those values from json/whatever
|
|
|
var width = 131;
|
|
|
var height = 135;
|
|
|
var spriteSheet = new createjs.SpriteSheet({
|
|
|
framerate: 15,
|
|
|
images: ["img/physicist/physicist-spritesheet.png"],
|
|
|
frames: {regX: height/2, height: height, count: 8, regY: width/2, width: width},
|
|
|
- animations: {
|
|
|
- run: [0, 7]
|
|
|
- }
|
|
|
+ animations: {run: [0, 7]}
|
|
|
});
|
|
|
var scale = width > height ? cell_size / width : cell_size / height;
|
|
|
this.scaleX = scale;
|
|
|
this.scaleY = scale;
|
|
|
this.spriteSheet = spriteSheet;
|
|
|
this.gotoAndPlay("run");
|
|
|
+ this.currentAnimationFrame = Math.floor(Math.random() * 7);
|
|
|
this.model = modelObject;
|
|
|
}
|
|
|
|