OSDN Git Service

茎を試験的に追加
authornagoling <>
Mon, 28 Apr 2014 05:08:57 +0000 (14:08 +0900)
committernagomi <nagomi@192.168.1.23>
Mon, 28 Apr 2014 05:08:57 +0000 (14:08 +0900)
main.js

diff --git a/main.js b/main.js
index f59aff5..131e0f1 100644 (file)
--- a/main.js
+++ b/main.js
@@ -33,7 +33,7 @@ var CHARA_WIDTH = 64;
 var CHARA_HEIGHT = 64;
 var GAME_WIDTH = 800;
 var GAME_HEIGHT = 600;
-var FPS = 20;
+var FPS = 40;
 var BASE_FPS = 20;
 var HUNGRY_MAX = 100;
 var TIME_SPEED = 4;
@@ -348,7 +348,7 @@ window.onload = function(){
                var okazariReimuValue = 32;
                var bodyValue = 37;
                var tweetValue = 288;
-               var kukiValue = 43;
+               var kukiValue = 143;
 
                if(a.type == "shadow"){
                        ay += shadowValue * a.scaleValue;
@@ -2042,6 +2042,7 @@ window.onload = function(){
                                                // var _gety = this.kukis[0].miYukkuris[0].getY();
                                                // this.kukis[0].miYukkuris[0].setOldY();
                                                // this.kukis[0].miYukkuris[0].animY(-_y);
+                                               // this.kukis[0].direction = this.direction;
                                        }
                                        // console.log(this.getX() + ":" + this.getY());
                                        this.act();
@@ -2076,6 +2077,7 @@ window.onload = function(){
                                        this.formSprite.setFixBudgeLeft(5);
                                        this.formSprite.setFixKukiLeft();
                                }
+                               this.formSprite.setFixKukiLeft();
                                // this.formSprite.formScaleY(this.myScale);
                                // this.imgBody.scaleX = -1;
                        }
@@ -2495,7 +2497,8 @@ window.onload = function(){
                        for(var i=0;i<this.kukis.length;i++){
                                if(this.kukis[i].opacity == 0){
                                        this.kukis[i].opacity = 1.0;
-                                       var miMarisa = new MiMarisa(this.getX(), this.getY());
+                                       // var miMarisa = new MiMarisa(this.getX(), this.getY());
+                                       var miMarisa = new MiMarisa(100, 100);
                                        
                                        // console.log(this.imgBody);
                                        // this.imgBody.addChild(miMarisa);
@@ -2504,6 +2507,9 @@ window.onload = function(){
                                }
                        }
                },
+               addAAA: function(kuki){
+                       this.formSprite.addChild(this.kukis[0],7,{type:"kuki",scaleValue:this.myScaleY});
+               },
                destruct: function(){
 
                }
@@ -2530,7 +2536,7 @@ window.onload = function(){
        }); 
        var MiMarisa = enchant.Class.create(MiYukkuri,{
                initialize: function(x, y, grow){
-                       Yukkuri.call(this,x,y, grow);
+                       Yukkuri.call(this,x,y, EGrow.FRUIT_BABY);
                        this.classname = "Marisa";
                        this.myCode = "MARISA";
                        this.myName = "実まりさ";
@@ -2914,17 +2920,20 @@ window.onload = function(){
                // var food = new def.Food("apple", 200, 250);
                backgroundMap.addChild(foodGroup);
                // backgroundMap.addChild(placeGroup);
+               // var mimarisa = new MiMarisa(PALYER_INIT_X + 100, PALYER_INIT_Y + 100, EGrow.FRUIT_BABY);
                var player = new Player(PALYER_INIT_X + 200, PALYER_INIT_Y + 200, EGrow.ADULT);
                // var player = new Player(0, 0);
                // console.log(player.getX());
-               player.addKuki();
+               // player.addKuki();
+               // player.addMiYukkuri(mimarisa)
                // player.createKuki();
-               // new Marisa(PALYER_INIT_X + 50, PALYER_INIT_Y + 200, EGrow.ADULT);
+               new Marisa(PALYER_INIT_X + 50, PALYER_INIT_Y + 200, EGrow.ADULT);
+               // new Marisa(PALYER_INIT_X + 150, PALYER_INIT_Y + 200, EGrow.ADULT);
+               // new Marisa(PALYER_INIT_X + 250, PALYER_INIT_Y + 200, EGrow.ADULT);
                // new Marisa(PALYER_INIT_X + 100, PALYER_INIT_Y + 200, EGrow.SUBADULT);
                // new Marisa(PALYER_INIT_X + 150, PALYER_INIT_Y + 200, EGrow.CHILD);
                // new Marisa(PALYER_INIT_X + 200, PALYER_INIT_Y + 200, EGrow.BABY);
                // new Reimu(PALYER_INIT_X + 100, PALYER_INIT_Y + 100, EGrow.ADULT);
-               new MiMarisa(PALYER_INIT_X + 100, PALYER_INIT_Y + 100, EGrow.FRUIT_BABY);
                // new Reimu(PALYER_INIT_X + 350, PALYER_INIT_Y + 400, EGrow.SUBADULT);
                // new Reimu(PALYER_INIT_X + 300, PALYER_INIT_Y + 400, EGrow.CHILD);
                // new Reimu(PALYER_INIT_X + 250, PALYER_INIT_Y + 400, EGrow.BABY);