diff --git a/package.json b/package.json index d7474ea..ded06a0 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tankz", - "version": "0.16.8", + "version": "0.16.9", "private": true, "devDependencies": { "dateformat": "^3.0.3", diff --git a/sql/init.sql b/sql/init.sql deleted file mode 100755 index 75b7676..0000000 --- a/sql/init.sql +++ /dev/null @@ -1,31 +0,0 @@ --- mysql -u shmyga -pxkbp8jh9z2 armageddon --protocol TCP -CREATE USER 'shmyga'@'localhost' IDENTIFIED BY 'xkbp8jh9z2'; - -DROP DATABASE IF EXISTS armageddon; -CREATE DATABASE IF NOT EXISTS armageddon; -GRANT ALL ON armageddon.* TO 'shmyga'@'localhost' IDENTIFIED BY 'xkbp8jh9z2'; - - -DROP TABLE IF EXISTS armageddon.account; -CREATE TABLE IF NOT EXISTS armageddon.account ( - id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, - login VARCHAR(255) UNIQUE, - password VARCHAR(32) -); - -DROP TABLE IF EXISTS armageddon.person; -CREATE TABLE IF NOT EXISTS armageddon.person ( - id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, - account_id INT UNSIGNED NOT NULL, - name VARCHAR(255), - - CONSTRAINT person_2_account FOREIGN KEY (account_id) REFERENCES armageddon.account(id) - MATCH SIMPLE ON DELETE CASCADE ON UPDATE NO ACTION -); - -INSERT INTO armageddon.account (id,login,password) VALUES(1,'shmyga', 'd48cc4eb42c058869ae90daef9606e43'); -INSERT INTO armageddon.person (id,account_id,name) VALUES(1,1,'-=Shmyga=-'); - -INSERT INTO armageddon.account (id,login,password) VALUES(2,'a', md5('a')); -INSERT INTO armageddon.person (id,account_id,name) VALUES(2,2,'a'); - diff --git a/src/client/haxe/ru/m/tankz/storage/SettingsStorage.hx b/src/client/haxe/ru/m/tankz/storage/SettingsStorage.hx index e636c73..83becd7 100644 --- a/src/client/haxe/ru/m/tankz/storage/SettingsStorage.hx +++ b/src/client/haxe/ru/m/tankz/storage/SettingsStorage.hx @@ -50,6 +50,7 @@ class SettingsStorage extends SharedObjectStorage { MOVE(Direction.RIGHT) => null, SHOT(0) => null, SHOT(1) => null, + SHOT(2) => null, ]; } diff --git a/src/client/haxe/ru/m/tankz/view/GameFrame.yaml b/src/client/haxe/ru/m/tankz/view/GameFrame.yaml index 515aeb3..9e7b3d4 100644 --- a/src/client/haxe/ru/m/tankz/view/GameFrame.yaml +++ b/src/client/haxe/ru/m/tankz/view/GameFrame.yaml @@ -13,7 +13,7 @@ views: - $type: haxework.view.form.ButtonView style: button.close geometry.position: absolute - geometry.hAlign: right - geometry.vAlign: bottom + geometry.hAlign: left + geometry.vAlign: top geometry.margin: 10 +onPress: ~close() diff --git a/src/client/haxe/ru/m/tankz/view/gamepad/SmartActionAreaBuilder.hx b/src/client/haxe/ru/m/tankz/view/gamepad/SmartActionAreaBuilder.hx index 02574d9..e016377 100644 --- a/src/client/haxe/ru/m/tankz/view/gamepad/SmartActionAreaBuilder.hx +++ b/src/client/haxe/ru/m/tankz/view/gamepad/SmartActionAreaBuilder.hx @@ -1,5 +1,6 @@ package ru.m.tankz.view.gamepad; +import haxework.view.geometry.Box; import ru.m.control.DeviceAction; import ru.m.geom.Circle; import ru.m.geom.Direction; @@ -12,36 +13,36 @@ class SmartActionAreaBuilder implements IActionAreaBuilder { public function build(width:Float, height:Float):Array { var areas:Array = []; var size = Math.min(width, height) / 5; - var padding = size / 3; + var padding = Box.fromArray([size / 4, size / 3]); // top areas.push(new RhombusActionArea( DIRECTION(Direction.TOP), - new Rectangle(padding + size * 0.5, height - size * 2 - padding, size, size ) + new Rectangle(padding.left + size * 0.5, height - size * 2 - padding.bottom, size, size ) )); // left areas.push(new RhombusActionArea( DIRECTION(Direction.LEFT), - new Rectangle(padding, height - size * 1.5 - padding, size, size) + new Rectangle(padding.left, height - size * 1.5 - padding.bottom, size, size) )); // bottom areas.push(new RhombusActionArea( DIRECTION(Direction.BOTTOM), - new Rectangle(padding + size * 0.5, height - size - padding, size, size) + new Rectangle(padding.left + size * 0.5, height - size - padding.bottom, size, size) )); // right areas.push(new RhombusActionArea( DIRECTION(Direction.RIGHT), - new Rectangle(padding + size, height - size * 1.5 - padding, size, size) + new Rectangle(padding.left + size, height - size * 1.5 - padding.bottom, size, size) )); // key 0 areas.push(new CircleActionArea( KEY(0), - new Circle(width - size * 1 - padding, height - size * 0.5 - padding, size / 2) + new Circle(width - size * 0.5 - padding.right, height - size * 0.5 - padding.bottom, size / 2) )); // key 1 areas.push(new CircleActionArea( KEY(1), - new Circle(width - size * 1 - padding, height - size * 1.5 - padding, size / 2) + new Circle(width - size * 0.5 - padding.right, height - size * 1.5 - padding.bottom, size / 2) )); return areas; }