update worklist
This commit is contained in:
62
WORK.md
62
WORK.md
@@ -1,46 +1,62 @@
|
|||||||
* build
|
* build
|
||||||
* gulp 100%
|
* gulp 100%
|
||||||
|
* linux 100%
|
||||||
|
* deb-package 100%
|
||||||
|
* windows 0%
|
||||||
|
* exe-package 0% (inno setup)
|
||||||
|
|
||||||
* deploy
|
* deploy
|
||||||
* capistrano 100%
|
* capistrano 100%
|
||||||
|
|
||||||
* ui
|
* ui
|
||||||
* login frame
|
* auth frame 0%
|
||||||
* select person frame (autoselect)
|
* select game frame 30% (classic 1/2 player, dota singe/coop/vs)
|
||||||
* game mode frame (single, start server, find server)
|
* select level frame 10%
|
||||||
* game frame
|
* game frame 50%
|
||||||
|
|
||||||
* engine
|
* engine
|
||||||
* config 90%
|
* config 100%
|
||||||
* map 80%
|
* map 100%
|
||||||
* tanks 30%
|
* tanks 100%
|
||||||
* bullets 30%
|
* bullets 100%
|
||||||
* boxes 0%
|
* boxes 100%
|
||||||
* map changes 50%
|
* map changes 100%
|
||||||
* bonuses 0%
|
* bonuses 0%
|
||||||
* eagle 0%
|
* eagle 100%
|
||||||
|
|
||||||
* game
|
* game
|
||||||
* classic
|
* classic
|
||||||
* state 0%
|
* state 50%
|
||||||
* bot 5%
|
* bot 50%
|
||||||
* player: 50%
|
* player: 50%
|
||||||
|
* dota
|
||||||
|
* state 50%
|
||||||
|
* bot 10%
|
||||||
|
* player 0%
|
||||||
|
|
||||||
|
* state
|
||||||
|
* score 0%
|
||||||
|
* save/load 0%
|
||||||
|
* export/import 0%
|
||||||
|
|
||||||
* render
|
* render
|
||||||
* map 100%
|
* map 100%
|
||||||
* tanks 100%
|
* tanks 100%
|
||||||
* bullet 100%
|
* bullet 100%
|
||||||
* calc redraw 20%
|
* calc redraw 50%
|
||||||
* animations
|
* animations
|
||||||
* tank spawn
|
* tank spawn 0%
|
||||||
* bullet boom
|
* tank move 100%
|
||||||
* tank boom
|
* map water 0%
|
||||||
* bonuses
|
* bullet boom 90%
|
||||||
* html5
|
* tank boom 90%
|
||||||
|
* bonuses 0%
|
||||||
|
* html5 50%
|
||||||
|
|
||||||
* proto
|
* proto
|
||||||
|
...
|
||||||
|
|
||||||
|
* editor
|
||||||
* webapp
|
* open 0%
|
||||||
* angular app 0%
|
* edit 0%
|
||||||
* google analytics 0%
|
* save 0%
|
||||||
@@ -101,6 +101,7 @@ class Render extends SpriteView implements EngineListener {
|
|||||||
items.set(tank.key, item);
|
items.set(tank.key, item);
|
||||||
entryLayer.addChild(item.view);
|
entryLayer.addChild(item.view);
|
||||||
item.update();
|
item.update();
|
||||||
|
playTankSpawn(tank.rect.center);
|
||||||
case EntityType.BULLET(bullet):
|
case EntityType.BULLET(bullet):
|
||||||
var item = new BulletItem(bullet);
|
var item = new BulletItem(bullet);
|
||||||
items.set(bullet.key, item);
|
items.set(bullet.key, item);
|
||||||
@@ -143,6 +144,21 @@ class Render extends SpriteView implements EngineListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function playTankSpawn(point:Point):Void {
|
||||||
|
var arr = [
|
||||||
|
0, 1, 2, 3, 3, 4, 5, 5, 6
|
||||||
|
];
|
||||||
|
var frames = [for (i in arr) Assets.getBitmapData('resources/images/tank/appear/appear-${i}.png')];
|
||||||
|
var animate = new OnceAnimate(frames);
|
||||||
|
animate.x = point.x - animate.width / 2;
|
||||||
|
animate.y = point.y - animate.height / 2;
|
||||||
|
upperLayer.addChild(animate);
|
||||||
|
animate.play().then(function(animate) {
|
||||||
|
upperLayer.removeChild(animate);
|
||||||
|
animate.dispose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private function playBulletBoom(point:Point):Void {
|
private function playBulletBoom(point:Point):Void {
|
||||||
var arr = [
|
var arr = [
|
||||||
0, 1, 1, 0, 0, 1
|
0, 1, 1, 0, 0, 1
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ class BotControl extends Control {
|
|||||||
public static var TYPE(default, never):ControlType = 'bot';
|
public static var TYPE(default, never):ControlType = 'bot';
|
||||||
|
|
||||||
private var shotTimer:Timer;
|
private var shotTimer:Timer;
|
||||||
|
private var turnRandomTimer:Timer;
|
||||||
private var turnTimer:Timer;
|
private var turnTimer:Timer;
|
||||||
private var turnDelayTimer:Timer;
|
|
||||||
|
|
||||||
public function new(index:Int) {
|
public function new(index:Int) {
|
||||||
super({type:TYPE, index:index});
|
super({type:TYPE, index:index});
|
||||||
@@ -33,9 +33,9 @@ class BotControl extends Control {
|
|||||||
shotTimer = new Timer(1000);
|
shotTimer = new Timer(1000);
|
||||||
shotTimer.run = shot;
|
shotTimer.run = shot;
|
||||||
}
|
}
|
||||||
if (turnTimer == null) {
|
if (turnRandomTimer == null) {
|
||||||
turnTimer = new Timer(2000);
|
turnRandomTimer = new Timer(2000);
|
||||||
turnTimer.run = turn;
|
turnRandomTimer.run = turn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,9 +44,9 @@ class BotControl extends Control {
|
|||||||
shotTimer.stop();
|
shotTimer.stop();
|
||||||
shotTimer = null;
|
shotTimer = null;
|
||||||
}
|
}
|
||||||
if (turnTimer != null) {
|
if (turnRandomTimer != null) {
|
||||||
turnTimer.stop();
|
turnRandomTimer.stop();
|
||||||
turnTimer = null;
|
turnRandomTimer = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,17 +55,16 @@ class BotControl extends Control {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function turnAfter(delay:Int):Void {
|
public function turnAfter(delay:Int):Void {
|
||||||
if (turnDelayTimer == null) {
|
if (turnTimer == null) {
|
||||||
turnDelayTimer = new Timer(delay);
|
turnTimer = Timer.delay(turn, delay);
|
||||||
turnDelayTimer.run = function() {
|
|
||||||
turnDelayTimer.stop();
|
|
||||||
turnDelayTimer = null;
|
|
||||||
turn();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function turn():Void {
|
public function turn():Void {
|
||||||
|
if (turnTimer != null) {
|
||||||
|
turnTimer.stop();
|
||||||
|
turnTimer = null;
|
||||||
|
}
|
||||||
action(TankAction.MOVE(randomDirection()));
|
action(TankAction.MOVE(randomDirection()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,8 +119,8 @@ class Game implements EngineListener {
|
|||||||
if (trySpawn(task.playerId, true)) {
|
if (trySpawn(task.playerId, true)) {
|
||||||
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);
|
||||||
engine.spawn(tank);
|
|
||||||
player.tankId = tank.id;
|
player.tankId = tank.id;
|
||||||
|
Timer.delay(function() engine.spawn(tank), 500);
|
||||||
} 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();
|
||||||
@@ -135,12 +135,10 @@ class Game implements EngineListener {
|
|||||||
player.control.dispose();
|
player.control.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var timer = new Timer(5000);
|
Timer.delay(function() {
|
||||||
timer.run = function() {
|
|
||||||
timer.stop();
|
|
||||||
deferred.resolve(state);
|
deferred.resolve(state);
|
||||||
stream.end();
|
stream.end();
|
||||||
}
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setControl(playerId:PlayerId, control:Control):Void {
|
public function setControl(playerId:PlayerId, control:Control):Void {
|
||||||
@@ -159,7 +157,11 @@ class Game implements EngineListener {
|
|||||||
|
|
||||||
|
|
||||||
public function onSpawn(entity:EntityType):Void {
|
public function onSpawn(entity:EntityType):Void {
|
||||||
|
switch (entity) {
|
||||||
|
case EntityType.TANK(tank):
|
||||||
|
getPlayer(tank.playerId).control.start();
|
||||||
|
case x:
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onCollision(entity:EntityType, with:EntityType):Void {
|
public function onCollision(entity:EntityType, with:EntityType):Void {
|
||||||
@@ -210,7 +212,8 @@ class Game implements EngineListener {
|
|||||||
public function onDestroy(entity:EntityType):Void {
|
public function onDestroy(entity:EntityType):Void {
|
||||||
switch (entity) {
|
switch (entity) {
|
||||||
case EntityType.TANK(tank):
|
case EntityType.TANK(tank):
|
||||||
getPlayer(tank.playerId).tankId = 0;
|
getPlayer(tank.playerId).control.stop();
|
||||||
|
getPlayer(tank.playerId).tankId = 0; //ToDo: ?
|
||||||
var respawn:Bool = trySpawn(tank.playerId);
|
var respawn:Bool = trySpawn(tank.playerId);
|
||||||
if (respawn) {
|
if (respawn) {
|
||||||
spawners.get(tank.playerId.team).push(tank.playerId);
|
spawners.get(tank.playerId.team).push(tank.playerId);
|
||||||
|
|||||||
@@ -19,11 +19,6 @@ class Player {
|
|||||||
tankId = value;
|
tankId = value;
|
||||||
if (control != null) {
|
if (control != null) {
|
||||||
control.tankId = tankId;
|
control.tankId = tankId;
|
||||||
if (tankId != 0) {
|
|
||||||
control.start();
|
|
||||||
} else {
|
|
||||||
control.stop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return tankId;
|
return tankId;
|
||||||
}
|
}
|
||||||
@@ -33,9 +28,6 @@ class Player {
|
|||||||
control = value;
|
control = value;
|
||||||
if (control != null) {
|
if (control != null) {
|
||||||
control.tankId = tankId;
|
control.tankId = tankId;
|
||||||
if (tankId != 0) {
|
|
||||||
control.start();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return control;
|
return control;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user