OSDN Git Service

かえた
authorisuke <namahage.toshi@gmail.com>
Fri, 6 Sep 2013 10:56:33 +0000 (19:56 +0900)
committerisuke <namahage.toshi@gmail.com>
Fri, 6 Sep 2013 10:56:33 +0000 (19:56 +0900)
www/corelib/classes/EnemyCharacters/EnemyCharacterClass_Bear.js
www/corelib/classes/EnemyCharacters/EnemyCharacterClass_Farmer.js
www/corelib/classes/EnemyCharacters/EnemyCharacterClass_PanTank.js
www/images/bullets2.png [new file with mode: 0644]

index 64ad7da..71fcd60 100644 (file)
@@ -9,10 +9,25 @@ var EnemyCharacterClass_Bear = function(stage, args){
        this.movingVelocity = 130;
        this.max_HP = 40;
        this.HP = this.max_HP;
+       this.isWeaponed = true;
        
 
        stage.addStageObject(this);
 }.extend(EnemyCharacterClass, {
        className: "EnemyCharacterClass_Bear",
+fire: function()
+       {
+               if(this.lastFireTick < this.ownerStage.manager.tickCount - this.fireTickInterval){
+                       var f = new FireObjectClass(this.ownerStage, [["bullets2.png"]]);
+                       f.maxBoundCount = 1;
+                       f.size.x = 40;
+                       f.size.y = 40;
+                       f.fire(this);
+                       f.antigravity= -300
+                       f.movingVelocity= 50
+                       this.fireTickInterval= 150;
 
+                       this.lastFireTick = this.ownerStage.manager.tickCount;
+               }
+       },
 });
index 1c000c0..69d8f87 100644 (file)
@@ -6,12 +6,26 @@ var EnemyCharacterClass_Farmer = function(stage, args){
        
        this.chasingRange = 600;
        this.movingVelocity = 100;
-       this.max_HP = 150;
+       this.max_HP = 100;
        this.HP = this.max_HP;
        this.touchDamage = 30;
+       this.isWeaponed = true;
        stage.addStageObject(this);
 
 }.extend(EnemyCharacterClass, {
        className: "EnemyCharacterClass_Farmer",
+fire: function()
+       {
+               if(this.lastFireTick < this.ownerStage.manager.tickCount - this.fireTickInterval){
+                       var f = new FireObjectClass(this.ownerStage, [["bullet.png"]]);
+                       f.maxBoundCount = 1;
+                       f.size.x = 10;
+                       f.size.y = 10;
+                       fireTickInterval= 30
+                       //f.fire(this,192,96);
+                       f.fire(this,32);
+                       this.lastFireTick = this.ownerStage.manager.tickCount;
+               }
+       },
 
 });
index 13ad08d..092bfbb 100644 (file)
@@ -1,5 +1,5 @@
 var EnemyCharacterClass_PanTank = function(stage, args){
-       EnemyCharacterClass_PanTank.base.apply(this, [stage, [["pantank1.png","pantank2.png","pantank3.png","pantankaim.png","pantankfire.png","pantankcooldown.png",]]]);
+       EnemyCharacterClass_PanTank.base.apply(this, [stage, [["pantank1.png","pantankaim.png","pantankfire.png","pantankcooldown.png","pantank2.png","pantank3.png",]]]);
 
        this.size.x = 128;
        this.size.y = 128;
@@ -26,9 +26,10 @@ var EnemyCharacterClass_PanTank = function(stage, args){
                if(this.lastFireTick < this.ownerStage.manager.tickCount - this.fireTickInterval){
                        var f = new FireObjectClass(this.ownerStage, [["bullet.png"]]);
                        f.maxBoundCount = 1;
-                       f.size.x = 16;
-                       f.size.y = 16;
-                       f.fire(this);
+                       f.size.x = 20;
+                       f.size.y = 20;
+                       f.fire(this, 70,70);
+                       this.fireTickInterval=100;
                        this.lastFireTick = this.ownerStage.manager.tickCount;
                }
        },
diff --git a/www/images/bullets2.png b/www/images/bullets2.png
new file mode 100644 (file)
index 0000000..70fc5ae
Binary files /dev/null and b/www/images/bullets2.png differ