this.background = null;
//\83\86\81[\83U\81[\82ª\91\80\8dì\82µ\82Ä\82¢\82é\83L\83\83\83\89\83N\83^\81[\83I\83u\83W\83F\83N\83g
this.userControlledCharacter = null;
-
- this.jumping = false;
}
GameStage.prototype = {
//\88È\89º\82Ì\8aÖ\90\94\82ð\83I\81[\83o\81[\83\89\83C\83h\82µ\82Ä\83X\83e\81[\83W\82ð\8dì\90¬\82·\82é\81B
{
//\83W\83\83\83\93\83v
this.userControlledCharacter.jump();
- this.jumping = true;
} else{
- if(this.jumping){
- this.userControlledCharacter.jumpEnd();
- this.jumping = false;
- }
+ this.userControlledCharacter.jumpEnd();
}
if(!(this.manager.UIManager.keyState.goLeft && this.manager.UIManager.keyState.goRight))
{
//\82±\82ê\82ç\82Ì\92l\82ð\81i\8ae\83L\83\83\83\89\83N\83^\81[\82ð\8e¦\82·\81j\8eq\83N\83\89\83X\82©\82ç\8fã\8f\91\82«\82·\82é\82±\82Æ\82Å\8cÂ\90«\82ð\90¶\82Ý\8fo\82¹\82é
this.movingVelocity = 200;
this.jumpPower_tickCountBase = 10;
+ this.jumpPower_tickCountAtLeast = 5;
this.jumpPower_tickCount = this.jumpPower_tickCountBase;
this.jumpPower = 45;
this.jumpSound = createAudio("jump12.mp3");
this.jumpPower_tickCount--;
var p = (this.jumpPower_tickCountBase / this.jumpPower_tickCountBase);
this.movingSpeed.y += -this.jumpPower * p * p;
- console.log(this.movingSpeed.y);
}
},
jumpEnd: function(){
- this.jumpPower_tickCount = 0;
+ if(this.jumpPower_tickCount < this.jumpPower_tickCountBase - this.jumpPower_tickCountAtLeast){
+ this.jumpPower_tickCount = 0;
+ } else{
+ this.jump();
+ }
},
tick : function(){
OperatedCharacterClass.base.prototype.tick.apply(this);