X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=www%2Fcorelib%2Fclasses%2FOperatedCharacterClass.js;h=4d4caddd970d3f877f947e3ecd67c6b91dda1944;hb=6f602e726eba2c05b92c584cbead3b2c4c3cc9a0;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=ef0a8fa4d3cd4a83f42781a37d5a36ee39bd1428;p=h58pcdgame%2FGameScriptCoreLibrary.git diff --git a/www/corelib/classes/OperatedCharacterClass.js b/www/corelib/classes/OperatedCharacterClass.js index e69de29..4d4cadd 100644 --- a/www/corelib/classes/OperatedCharacterClass.js +++ b/www/corelib/classes/OperatedCharacterClass.js @@ -0,0 +1,41 @@ +var OperatedCharacterClass = function(ownerStage, args){ + OperatedCharacterClass.base.apply(this, arguments); + + //‚±‚ê‚ç‚Ì’l‚ðiŠeƒLƒƒƒ‰ƒNƒ^[‚ðŽ¦‚·jŽqƒNƒ‰ƒX‚©‚çã‘‚«‚·‚邱‚ƂŌ«‚𐶂ݏo‚¹‚é + this.movingVelocity = 200; + this.jumpPower = 400; +}.extend(CharacterClass, { + className: "OperatedCharacterClass", + //‚±‚±‚ɃLƒƒƒ‰‚Ì“®‚«‚ɑ΂·‚鐧Œä‚ð‚¨‚±‚È‚¤ˆ—ŒQ(ˆÚ“®AUŒ‚‚È‚Ç)‚ð‹LqB + //ƒLƒƒƒ‰‚²‚Ƃɐ«Ž¿‚ð•Ï‚¦‚½‚¢‚Ì‚Å‚ ‚ê‚΂»‚ê‚ðthis.xxxƒCƒ“ƒXƒ^ƒ“ƒX•Ï”‚É‹Lq‚µAŠg’£ƒNƒ‰ƒX‚Å‚»‚Ì’l‚ðã‘‚«‚·‚é‚ׂ«‚Å‚ ‚éB + //]‚Á‚Ä‚±‚ÌŽqƒNƒ‰ƒX‚©‚çthis.movingSpeed‚È‚Ç‚ð‚¢‚¶‚é‚Ì‚Í‚Ó‚³‚킵‚­‚È‚¢‚ƍl‚¦‚éBA + + // ’ʏ퍶‚ɐi‚Þ‚Æ‚«‚ɌĂ΂ê‚éB¶ƒL[‚ð‰Ÿ‚µ‚Ä‚¢‚éŠÔ’†tick–ˆ‚ɌĂ΂ê‚é + goLeft : function(){ + this.imageState = 0; + this.direction = 0; + this.movingSpeed.x += ((-this.movingVelocity) - this.movingSpeed.x) / 3; + }, + + //’ʏí‰E‚ɐi‚Þ‚Æ‚«‚ɌĂ΂ê‚éB + goRight : function(){ + this.imageState = 1; + this.direction = 1; + this.movingSpeed.x += (this.movingVelocity - this.movingSpeed.x) / 3; + }, + + //’ʏíƒWƒƒƒ“ƒv‚·‚é‚Æ‚«‚ɌĂ΂ê‚éB + jump : function(){ + if((this.collideFlag & 4) != 0) + { + this.movingSpeed.y = -this.jumpPower + } + }, + tick : function(){ + + OperatedCharacterClass.base.prototype.tick.apply(this); + }, + draw : function(x, y){ + OperatedCharacterClass.base.prototype.draw.apply(this, [x, y]); + } +});