[game] added dota maps

This commit is contained in:
2018-02-05 22:24:00 +03:00
parent feb5bafe72
commit 15d830a0d4
7 changed files with 19 additions and 39 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "tankz", "name": "tankz",
"version": "0.4.1", "version": "0.4.2",
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"ansi-colors": "^1.0.1", "ansi-colors": "^1.0.1",
@@ -23,6 +23,7 @@
"plugin-error": "^0.1.2", "plugin-error": "^0.1.2",
"progress": "^2.0.0", "progress": "^2.0.0",
"promise-streams": "^2.1.1", "promise-streams": "^2.1.1",
"rmdir": "^1.2.0",
"tar": "^4.2.0", "tar": "^4.2.0",
"tmp-file": "^2.0.1", "tmp-file": "^2.0.1",
"unzip-stream": "^0.2.1", "unzip-stream": "^0.2.1",
+1 -1
View File
@@ -1,5 +1,5 @@
game: game:
levels: 2 levels: 3
friendlyFire: true friendlyFire: true
map: map:
+1 -30
View File
@@ -1,30 +1 @@
0000000000000000000000000000000000004400 005500330033003300333300330033003300550000550033003300330033330033003300330055000000000000330033000000003300330000000000000000000033003300000000330033000000000000550033000000330000000033000000330055000055003300000033000000003300000033005500000000330000003300333300330000003300000000000033000000330033330033000000330000000055000000330033003333003300330000005500005500000033003300333300330033000000550000000033003300330033330033003300330000000000003300330033003333003300330033000000005500330000003300333300330000003300550000550033000000330033330033000000330055000000000000330033003333003300330000000000000000000033003300333300330033000000000000550033003300330033330033003300330055000055003300330033003333003300330033005500000000330033003300333300330033003300000000000033003300330033330033003300330000005555553300330033003333003300330033555555555555330033003300333300330033003355555555555533003300330033330033003300335555555555553300330033003333003300330033555555440000330033000000333300000033000000004444000033003300000033330000003300000000440000443300330000003333000000330033440000000044330033000000333300000033003344000000440033003300330033330033003300330044000044003300330033003333003300330033004400
0000000000000000000000000000000000004400
0000000000000000000000000000000000004444
0000000000000000000000000000000000004444
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
4444000000000000000000000000000000000000
4444000000000000000000000000000000000000
0044000000000000000000000000000000000000
0044000000000000000000000000000000000000
@@ -0,0 +1 @@
000000000000000000000000000000440000000000000000000000000000000000000044000000000044003300005500440000440055000000000000004400330000550044000044005500000000000000000000440000000000000000000055004400000000000044000000000000000000005500440000003300000000330044003300440000000000000000330000000033004400330044000000000000000000440055000000000000000000005500003300000044005500000000000000000000550000330000000000000055000044005500440000004400000000000000005500004400550044000000440000555500003300000000000000000000000000555555550000330000000000000000000000000055550055440000004400330000000000003300445500005544000000440033000000000000330044550055550000440000000044004400550000000055555555000044000000004400440055000000005555000000000000000000000000000044000044000000000000000000000000000000004400004400000044000044000044005500004400000000000000004400004400004400550000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003300000000550000330055003300005500440000330000000055000033005500330000550044000000440033000000440000000000440000000000000044003300000044000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+1 -1
View File
@@ -128,7 +128,7 @@ class Game implements EngineListener {
var tank = buildTank(task.playerId, task.point); var tank = buildTank(task.playerId, task.point);
var player:Player = getPlayer(task.playerId); var player:Player = getPlayer(task.playerId);
player.tankId = tank.id; player.tankId = tank.id;
Timer.delay(function() engine.spawn(tank), 500); Timer.delay(function() engine.spawn(tank), 1500);
} else if (!isTeamAlive(task.playerId.team)) { } else if (!isTeamAlive(task.playerId.team)) {
state.teams[task.playerId.team].lose = true; state.teams[task.playerId.team].lose = true;
complete(); complete();
@@ -84,6 +84,15 @@ class MapEditView extends SpriteView {
width = mapWidth; width = mapWidth;
height = mapHeight; height = mapHeight;
} }
g.lineStyle(1, 0x007700);
for (x in 0...map.gridWidth) {
g.moveTo(x * map.cellWidth, 0);
g.lineTo(x * map.cellWidth, mapHeight);
}
for (y in 0...map.gridHeight) {
g.moveTo(0, y * map.cellHeight);
g.lineTo(mapWidth, y * map.cellHeight);
}
} }
override public function update():Void { override public function update():Void {
+4 -6
View File
@@ -11,6 +11,7 @@ const PluginError = require('plugin-error');
const colors = require('ansi-colors'); const colors = require('ansi-colors');
const log = require('fancy-log'); const log = require('fancy-log');
const vfs = require('vinyl-fs'); const vfs = require('vinyl-fs');
const rmdir = require('rmdir');
class Haxe extends Sdk { class Haxe extends Sdk {
@@ -179,13 +180,10 @@ class Haxe extends Sdk {
args.push('-debug'); args.push('-debug');
} }
//console.log('haxelib', args.join(' ')); //console.log('haxelib', args.join(' '));
const target = `${buildDir}/${params.platform}/bin`;
rmdir(target);
this.haxelib(args).then(() => { this.haxelib(args).then(() => {
const result = { vfs.src(`${target}/**/*`).pipe(through.obj((file, enc, cb) => {
'flash': `${buildDir}/flash/bin/*.swf`,
'html5': `${buildDir}/html5/bin/**/*`,
'linux': `${buildDir}/linux/bin/**/*`,
}[params.platform];
vfs.src(result).pipe(through.obj((file, enc, cb) => {
file.debug = debug; file.debug = debug;
stream.push(file); stream.push(file);
cb(); cb();