|
@@ -38,6 +38,7 @@ export default class ArtilleryFireView extends BasicView {
|
|
|
|
|
|
private killEnemyCount: _IProperty;
|
|
|
private currentEnemys: Array<number>;
|
|
|
+ private life:number = 3;
|
|
|
|
|
|
protected _initView(): void {
|
|
|
this.gameConfig = JsonResources.getResources(_EJsonRes.Game);
|
|
@@ -76,7 +77,7 @@ export default class ArtilleryFireView extends BasicView {
|
|
|
}
|
|
|
|
|
|
protected _refreshView(): void {
|
|
|
- SDK.onGameStart();
|
|
|
+ // SDK.onGameStart();
|
|
|
ConstObject.Pass = 0;
|
|
|
|
|
|
this.mapLoopIndex = 1;
|
|
@@ -131,7 +132,12 @@ export default class ArtilleryFireView extends BasicView {
|
|
|
if (Math.abs(enemy.enemy.x-this.player.player.x)+Math.abs(enemy.enemy.y-this.player.player.y) <= enemy.enemy.getChild("collide"+(enemy.level+1)).width+this.player.player.width/2) {
|
|
|
enemy.isMove = false;
|
|
|
|
|
|
- this.killRole();
|
|
|
+ // this.killRole();
|
|
|
+ if(--this.life < 1){
|
|
|
+ this.killRole();
|
|
|
+ }else{
|
|
|
+ enemy.injured(99, false);
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -278,7 +284,7 @@ export default class ArtilleryFireView extends BasicView {
|
|
|
|
|
|
this.createEnemyLevel();
|
|
|
this.killEnemyCount.max = this.currentEnemys.length*this.gameConfig.pass.attackCount;
|
|
|
-
|
|
|
+ this.life = 3;
|
|
|
this.createEnemy();
|
|
|
|
|
|
this.unschedule(this.launchMissileComplete);
|