1 var FireObjectClass = function(stage, args){
2 FireObjectClass.base.apply(this, arguments);
4 this.fireVelocity = new Point2D(600, 100);
8 this.movingSpeed.y = -this.fireVelocity.y;
10 this.isItemCollector = true;
11 this.boundPower = 400;
13 this.maxBoundCount = 3;
14 }.extend(EnemyCharacterClass, {
15 className: "FireObjectClass",
16 fire: function(ownerObj){
17 this.origin.x = ownerObj.origin.x + 32;
18 this.origin.y = ownerObj.origin.y;
19 var fvx = this.fireVelocity.x;
20 if(ownerObj.direction == 0){
23 this.origin.x = ownerObj.origin.x - 32;
25 this.movingSpeed.x = fvx;
26 ownerObj.ownerStage.addStageObject(this);
29 objectAttacked : function(obj, obj_x, obj_y)
31 if(obj instanceof MainCharacterClass)
35 if(this.collidingDirection & CollideTop){
39 this.hurtPerTickCount = this.hurtPerTickBase;
42 if(this.collidingDirection & (CollideLeft | CollideRight)){
46 this.damagePerTickCount = this.damagePerTickBase;
51 if(obj instanceof EnemyCharacterClass)
54 obj.damage(this.touchDamage);
55 this.ownerStage.removeStageObject(this);
57 if((obj instanceof BlockClass || obj instanceof SlopeBlockClass) && this.lastCollidedTick + 10 < this.ownerStage.manager.tickCount){
58 this.movingSpeed.y -= this.boundPower;
60 if(this.maxBoundCount <= this.boundCount){
61 this.ownerStage.removeStageObject(this);
65 this.lastCollidedTick = this.ownerStage.manager.tickCount;