1
0
Fork 0

Quick integration of two temporary ship models

This commit is contained in:
Michaël Lemaire 2015-04-26 11:21:55 +02:00
parent e48eedf0a6
commit a0125d1a04
10 changed files with 10 additions and 3 deletions

Binary file not shown.

Binary file not shown.

BIN
graphics/ships/ship02.blend Normal file

Binary file not shown.

View file

@ -41,8 +41,6 @@ module SpaceTac.View {
this.loadImage("battle/actions/endturn.png");
this.loadImage("battle/actions/fire-gatlinggun.png");
this.loadImage("battle/weapon/bullet.png");
this.loadImage("ship/scout/sprite.png");
this.loadImage("ship/scout/portrait.png");
this.loadImage("common/standard-bar-background.png");
this.loadImage("common/standard-bar-foreground.png");
this.loadImage("map/star-icon.png");
@ -52,6 +50,10 @@ module SpaceTac.View {
this.loadImage("map/button-back.png");
this.loadImage("map/button-jump.png");
// Load ships
this.loadShip("scout");
this.loadShip("whirlwind");
// Load sounds
this.loadSound("battle/ship-change.wav");
this.loadSound("battle/weapon-bullets.wav");
@ -65,6 +67,11 @@ module SpaceTac.View {
this.game.state.start("mainmenu");
}
private loadShip(name: string) {
this.loadImage("ship/" + name + "/sprite.png");
this.loadImage("ship/" + name + "/portrait.png");
}
private loadImage(path: string) {
this.load.image(path.replace(/\//g, "-").replace(".png", "").replace(".jpg", ""), "assets/images/" + path);
}

View file

@ -23,7 +23,6 @@ module SpaceTac.View {
// Add ship sprite
this.sprite = new Phaser.Button(battleview.game, 0, 0, "ship-scout-sprite");
this.sprite.scale.set(0.1, 0.1);
this.sprite.rotation = ship.arena_angle;
this.sprite.anchor.set(0.5, 0.5);
this.addChild(this.sprite);

View file

@ -43,6 +43,7 @@ module SpaceTac.View {
this.layer_portrait = new Phaser.Image(this.game, 30, 30, "ship-scout-portrait", 0);
this.layer_portrait.anchor.set(0.5, 0.5);
this.layer_portrait.scale.set(0.19, 0.19);
this.addChild(this.layer_portrait);
this.layer_hover = new Phaser.Image(this.game, 30, 30, "battle-arena-shipspritehover", 0);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB