1
0
Fork 0

Added ship frame in arena to know which side they are on

This commit is contained in:
Michaël Lemaire 2017-01-10 01:22:59 +01:00
parent 166557c0d6
commit 026af8bdd2
13 changed files with 187 additions and 144 deletions

View file

@ -9,11 +9,11 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
width="256"
height="256"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
inkscape:version="0.91 r13725"
sodipodi:docname="actions.svg"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/temp.png"
inkscape:export-xdpi="90"
@ -24,7 +24,7 @@
clipPathUnits="userSpaceOnUse"
id="clipPath3925">
<path
style="fill:#40686f;fill-opacity:0.37542665;stroke:#68a3ad;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
style="fill:#40686f;fill-opacity:0.37542665;stroke:#68a3ad;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 343.37404,232.575 0,280 280,0 0,-280 -280,0 z m 240.65625,13.34375 10.625,10.59375 -106.09375,106.0625 105.5,105.5 -10.59375,10.59375 -105.5,-105.46875 -98.40625,98.40625 -10.625,-10.59375 98.4375,-98.4375 -99,-99 10.59375,-10.59375 99,99 106.0625,-106.0625 z"
id="path3927"
inkscape:connector-curvature="0" />
@ -37,12 +37,12 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="444.96825"
inkscape:cy="400.52375"
inkscape:zoom="1.979899"
inkscape:cx="122.81513"
inkscape:cy="168.49069"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1030"
inkscape:window-x="0"
@ -51,7 +51,8 @@
inkscape:snap-global="true"
inkscape:snap-bbox="false"
inkscape:snap-nodes="true"
inkscape:snap-bbox-midpoints="false">
inkscape:snap-bbox-midpoints="false"
units="px">
<inkscape:grid
type="xygrid"
id="grid3004" />
@ -69,52 +70,60 @@
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:label="endturn"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#4b818a;fill-opacity:1;stroke:none"
d="m 160,362.36218 210,0 -95,-120 10,85 -125,0 z"
id="path3006"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<path
style="fill:#40686f;fill-opacity:1;stroke:none"
d="m 160,362.36218 210,0 -95,120 10,-85 -125,0 z"
id="path3006-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<path
sodipodi:type="arc"
style="fill:none;stroke:#68a3ad;stroke-width:31.39999962;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3794"
sodipodi:cx="480"
sodipodi:cy="362.36218"
sodipodi:rx="110"
sodipodi:ry="110"
d="m 590,362.36218 a 110,110 0 1 1 -220,0 110,110 0 1 1 220,0 z"
transform="translate(16.625964,-0.19999977)"
clip-path="url(#clipPath3925)"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/temp.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
id="layer1"
transform="translate(0,-796.36216)">
<g
id="g3939"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/temp.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
inkscape:export-ydpi="90"
transform="matrix(0.61036973,0,0,0.61036973,-76.47386,495.66155)">
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3935"
d="m 160,632.36218 120,210 0,-130 z"
style="fill:#43903f;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" />
style="fill:#43903f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3937"
d="m 280,842.36218 0,-130 230,-150 z"
style="fill:#4a6c48;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" />
style="fill:#4a6c48;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="move">
<g
id="g5815"
transform="matrix(0.49994317,0,0,0.49994317,-67.559263,-53.06051)">
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="path3006"
d="m 160,362.36218 210,0 -95,-120 10,85 -125,0 z"
style="fill:#4b818a;fill-opacity:1;stroke:none" />
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="path3006-7"
d="m 160,362.36218 210,0 -95,120 10,-85 -125,0 z"
style="fill:#40686f;fill-opacity:1;stroke:none" />
</g>
<circle
style="fill:none;stroke:#68a3ad;stroke-width:31.39999962;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path3794"
transform="matrix(0.49994317,0,0,0.49994317,-59.247222,-53.160498)"
clip-path="url(#clipPath3925)"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/temp.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
cx="480"
cy="362.36218"
r="110" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

@ -77,6 +77,24 @@
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</mask>
<mask
maskUnits="userSpaceOnUse"
id="mask5918">
<path
inkscape:connector-curvature="0"
id="path5920"
d="m 1088.6255,724.87588 0,112.25 112.75,0 0,-112.25 -112.75,0 z m 8.7324,4.94727 47.6426,47.64062 47.6406,-47.64062 3.5352,3.53515 -47.6406,47.64258 47.6406,47.64063 -3.5352,3.53515 -47.6406,-47.64062 -47.6426,47.64062 -3.5351,-3.53515 47.6426,-47.64063 -47.6426,-47.64258 3.5351,-3.53515 z"
style="opacity:0.747;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</mask>
<mask
maskUnits="userSpaceOnUse"
id="mask5923">
<path
inkscape:connector-curvature="0"
id="path5925"
d="m 675.19922,821.7207 0,112.25 112.75,0 0,-112.25 -112.75,0 z m 8.73242,4.94727 47.64258,47.64062 47.64062,-47.64062 3.53516,3.53515 -47.64062,47.64258 47.64062,47.64063 -3.53516,3.53515 -47.64062,-47.64062 -47.64258,47.64062 -3.53516,-3.53515 47.64258,-47.64063 -47.64258,-47.64258 3.53516,-3.53515 z"
style="opacity:0.747;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</mask>
</defs>
<sodipodi:namedview
id="base"
@ -85,11 +103,11 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="4"
inkscape:cx="752.60811"
inkscape:cy="207.999"
inkscape:zoom="5.6568542"
inkscape:cx="56.831357"
inkscape:cy="908.08122"
inkscape:document-units="px"
inkscape:current-layer="layer17"
inkscape:current-layer="layer16"
showgrid="false"
units="px"
showguides="false"
@ -138,26 +156,15 @@
inkscape:groupmode="layer"
id="layer17"
inkscape:label="Arena">
<g
id="g4273">
<rect
y="821.71985"
x="675.19873"
height="112.25"
width="112.75"
id="rect4417"
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="rect4375"
d="m 680.39685,830.2035 47.64132,47.64132 -47.64132,47.64132 3.53553,3.53553 47.64132,-47.64132 47.64132,47.64132 3.53553,-3.53553 -47.64132,-47.64132 47.64132,-47.64132 -3.53553,-3.53553 -47.64132,47.64132 -47.64132,-47.64132 -3.53553,3.53553 z"
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<path
style="opacity:1;fill:#cbe6ed;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:#038700;fill-opacity:0.74901962;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 696.57273,842.84286 0,70.00391 70.00195,0 0,-70.00391 -70.00195,0 z m 3.35741,3.35937 63.28711,0 0,63.28516 -63.28711,0 0,-63.28516 z"
id="path4438"
inkscape:connector-curvature="0" />
inkscape:connector-curvature="0"
mask="url(#mask5923)"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/ship-playing-enemy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<use
x="0"
y="0"
@ -174,6 +181,11 @@
transform="matrix(-0.96592583,0.25881905,-0.25881905,-0.96592583,2076.4223,1439.5912)"
width="100%"
height="100%" />
<path
style="opacity:1;fill:#038700;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
mask="url(#mask5918)"
d="M 1109.998 812.71289 L 1109.998 816.00195 L 1180 816.00195 L 1180 812.71289 L 1109.998 812.71289 z "
id="path4438-7" />
</g>
<g
inkscape:groupmode="layer"
@ -295,71 +307,78 @@
id="layer16"
inkscape:label="Ship list hover"
style="display:inline">
<rect
y="148.93114"
x="15.297348"
height="77.905304"
width="77.905304"
id="rect4248-3"
style="display:inline;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#a833b0;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-filename="/tmp/export.png"
<g
id="g4299"
style=""
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/arena/ship-hover.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
sodipodi:type="star"
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#a833b0;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4312"
sodipodi:sides="3"
sodipodi:cx="54.25"
sodipodi:cy="156.75"
sodipodi:r1="5.131094"
sodipodi:r2="2.565547"
sodipodi:arg1="1.5707963"
sodipodi:arg2="2.6179939"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 54.25,161.88109 -4.443658,-7.69664 8.887316,0 z"
inkscape:transform-center-y="1.2827735"
inkscape:export-filename="/tmp/export.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<use
x="0"
y="0"
xlink:href="#path4312"
inkscape:transform-center-y="-1.2827702"
id="use4314"
transform="matrix(1,0,0,-1,0,375.61555)"
width="100%"
height="100%"
inkscape:export-filename="/tmp/export.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<use
x="0"
y="0"
xlink:href="#path4312"
id="use4316"
transform="matrix(0,-1,1,0,-133.125,242.13379)"
width="100%"
height="100%"
inkscape:transform-center-x="-1.2827735"
inkscape:export-filename="/tmp/export.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<use
x="0"
y="0"
xlink:href="#path4312"
id="use4318"
transform="matrix(0,1,-1,0,241.5,133.63379)"
width="100%"
height="100%"
inkscape:transform-center-x="1.2827734"
inkscape:export-filename="/tmp/export.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
inkscape:export-ydpi="90">
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/tmp/export.png"
style="display:inline;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#efd9f4;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4248-3"
width="77.905304"
height="77.905304"
x="15.297348"
y="148.93114" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/tmp/export.png"
inkscape:transform-center-y="1.2827735"
d="m 54.25,161.88109 -4.443658,-7.69664 8.887316,0 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="true"
sodipodi:arg2="2.6179939"
sodipodi:arg1="1.5707963"
sodipodi:r2="2.565547"
sodipodi:r1="5.131094"
sodipodi:cy="156.75"
sodipodi:cx="54.25"
sodipodi:sides="3"
id="path4312"
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#efd9f4;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:type="star" />
<use
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/tmp/export.png"
height="100%"
width="100%"
transform="matrix(1,0,0,-1,0,375.61555)"
id="use4314"
inkscape:transform-center-y="-1.2827702"
xlink:href="#path4312"
y="0"
x="0" />
<use
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/tmp/export.png"
inkscape:transform-center-x="-1.2827735"
height="100%"
width="100%"
transform="matrix(0,-1,1,0,-133.125,242.13379)"
id="use4316"
xlink:href="#path4312"
y="0"
x="0" />
<use
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/tmp/export.png"
inkscape:transform-center-x="1.2827734"
height="100%"
width="100%"
transform="matrix(0,1,-1,0,241.5,133.63379)"
id="use4318"
xlink:href="#path4312"
y="0"
x="0" />
</g>
</g>
</g>
<g
@ -472,7 +491,10 @@
width="493.87869"
height="636.92389"
x="141"
y="139" />
y="139"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/ship-tooltip.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
@ -490,14 +512,20 @@
width="465"
height="165.00002"
x="157"
y="192" />
y="192"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/ship-tooltip.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4586"
width="464"
height="391.3381"
x="156"
y="370" />
y="370"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/ship-tooltip.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="opacity:1;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4594"

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 B

View file

@ -2,7 +2,7 @@ module SpaceTac.View {
export class Boot extends Phaser.State {
preload() {
this.game.stage.backgroundColor = 0x202020;
this.add.text(640, 340, "... Loading ...", {align: "center", font: "bold 20px Arial", fill: "#c0c0c0"})
this.add.text(this.world.width / 2, this.world.height / 2 - 40, "... Loading ...", { align: "center", font: "bold 20px Arial", fill: "#c0c0c0" })
.anchor.set(0.5, 0.5);
this.load.image("preload-bar", "assets/images/preloader.gif");

View file

@ -6,7 +6,7 @@ module SpaceTac.View {
preload() {
// Add preload sprite
this.add.text(640, 340, "... Loading ...", { align: "center", font: "bold 20px Arial", fill: "#c0c0c0" })
this.add.text(this.getMidWidth(), this.getMidHeight() - 40, "... Loading ...", { align: "center", font: "bold 20px Arial", fill: "#c0c0c0" })
.anchor.set(0.5, 0.5);
this.preloadBar = this.add.sprite(0, 0, "preload-bar");
this.preloadBar.anchor.set(0.5, 0.5);
@ -38,8 +38,11 @@ module SpaceTac.View {
this.loadImage("battle/actionpointsfull.png");
this.loadImage("battle/actionpointspart.png");
this.loadImage("battle/ship-tooltip.png");
this.loadImage("battle/arena/shipspritehover.png");
this.loadImage("battle/arena/shipspriteplaying.png");
this.loadImage("battle/arena/ship-hover.png");
this.loadImage("battle/arena/ship-normal-enemy.png");
this.loadImage("battle/arena/ship-normal-own.png");
this.loadImage("battle/arena/ship-playing-enemy.png");
this.loadImage("battle/arena/ship-playing-own.png");
this.loadImage("battle/actions/move.png");
this.loadImage("battle/actions/endturn.png");
this.loadImage("battle/actions/fire-gatlinggun.png");

View file

@ -4,20 +4,24 @@ module SpaceTac.View {
// Link to displayed ship
ship: Game.Ship;
// Boolean to indicate if it is an enemy ship
enemy: boolean;
// Ship sprite
sprite: Phaser.Button;
// Hover effect
hover: Phaser.Image;
// Playing effect
playing: Phaser.Image;
// Frame to indicate the owner of the ship, and if it is playing
frame: Phaser.Image;
// Create a ship sprite usable in the Arena
constructor(battleview: BattleView, ship: Game.Ship) {
super(battleview.game);
this.ship = ship;
this.enemy = this.ship.getPlayer() != battleview.player;
// Add ship sprite
this.sprite = new Phaser.Button(battleview.game, 0, 0, "ship-" + ship.model + "-sprite");
@ -25,18 +29,17 @@ module SpaceTac.View {
this.sprite.anchor.set(0.5, 0.5);
this.addChild(this.sprite);
// Add playing effect
this.frame = new Phaser.Image(battleview.game, 0, 0, `battle-arena-ship-normal-${this.enemy ? "enemy" : "own"}`, 0);
this.frame.anchor.set(0.5, 0.5);
this.addChild(this.frame);
// Add hover effect
this.hover = new Phaser.Image(battleview.game, 0, 0, "battle-arena-shipspritehover", 0);
this.hover = new Phaser.Image(battleview.game, 0, 0, "battle-arena-ship-hover", 0);
this.hover.anchor.set(0.5, 0.5);
this.hover.visible = false;
this.addChild(this.hover);
// Add playing effect
this.playing = new Phaser.Image(battleview.game, 0, 0, "battle-arena-shipspriteplaying", 0);
this.playing.anchor.set(0.5, 0.5);
this.playing.visible = false;
this.addChild(this.playing);
// Handle input on ship sprite
this.sprite.input.useHandCursor = true;
this.sprite.onInputOver.add(() => {
@ -62,7 +65,7 @@ module SpaceTac.View {
// Set the playing state on this ship
// This will toggle the "playing" indicator
setPlaying(playing: boolean) {
Animation.setVisibility(this.game, this.playing, playing, 500);
this.frame.loadTexture(`battle-arena-ship-${playing ? "playing" : "normal"}-${this.enemy ? "enemy" : "own"}`);
}
// Move the sprite to a location

View file

@ -41,7 +41,7 @@ module SpaceTac.View {
this.layer_portrait.scale.set(0.3, 0.3);
this.addChild(this.layer_portrait);
this.layer_hover = new Phaser.Image(this.game, 30, 30, "battle-arena-shipspritehover", 0);
this.layer_hover = new Phaser.Image(this.game, 30, 30, "battle-arena-ship-hover", 0);
this.layer_hover.position.set(5, 5);
this.layer_hover.visible = false;
this.addChild(this.layer_hover);