OSDN Git Service

大久保の変更
authorkoenma <pengin.king.kid@gmail.com>
Fri, 6 Sep 2013 23:17:00 +0000 (08:17 +0900)
committerkoenma <pengin.king.kid@gmail.com>
Fri, 6 Sep 2013 23:17:00 +0000 (08:17 +0900)
www/corelib/classes/EnemyCharacters/EnemyCharacterClass_Bear.js
www/corelib/classes/EnemyCharacters/EnemyCharacterClass_Farmer.js
www/images/bullets2.png [new file with mode: 0644]

index 64ad7da..37fe0d8 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.movingVelocity= 10;
+                       f.antigravity=-200;
+                       this.fireTickInterval= 100;
 
+                       this.lastFireTick = this.ownerStage.manager.tickCount;
+               }
+       },
 });
index 1c000c0..6098b32 100644 (file)
@@ -1,17 +1,31 @@
 var EnemyCharacterClass_Farmer = function(stage, args){
-       EnemyCharacterClass_Farmer.base.apply(this, [stage, [["farmer1.png","farmer2.png","farmer3.png","farmer4.png","farmeraim.png","farmerfire.png","farmercooldown.png","farmerrelord.png","farmerfire.png","farmercooldown.png","farmerrelord.png","farmerfire.png","farmercooldown.png","farmerrelord.png","farmerfire.png","farmercooldown.png","farmerfire.png","farmer3.png","farmer2.png",]]]);
+       EnemyCharacterClass_Farmer.base.apply(this, [stage, [["farmer1.png","farmer2.png","farmer3.png","farmer4.png","farmeraim.png","farmerfire.png","farmercooldown.png","farmerrelord.png","farmerfire.png","farmercooldown.png","farmerrelord.png","farmer3.png","farmer2.png",]]]);
 
        this.size.x = 50;
        this.size.y=   100;
        
        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,50);
+                       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