OSDN Git Service

HPのバーなど
authorttwilb <ttwilb@users.sourceforge.jp>
Tue, 3 Sep 2013 08:23:58 +0000 (17:23 +0900)
committerttwilb <ttwilb@users.sourceforge.jp>
Tue, 3 Sep 2013 08:23:58 +0000 (17:23 +0900)
documents/TODO_isuke.txt [new file with mode: 0644]
documents/stages.txt [new file with mode: 0644]
www/corelib/classes/EnemyCharacterClass.js
www/corelib/classes/MainCharacterClass.js

diff --git a/documents/TODO_isuke.txt b/documents/TODO_isuke.txt
new file mode 100644 (file)
index 0000000..0c57603
--- /dev/null
@@ -0,0 +1 @@
+\8ae\82·\82Ä\81[\82\82Ì\83T\83\80\83l\83C\83\8b\89æ\91\9c\82ª\82 \82é\82Æ\82¢\82¢\81B\81i\8f­\82µ\91å\82«\82ß-64*64\82­\82ç\82¢)
\ No newline at end of file
diff --git a/documents/stages.txt b/documents/stages.txt
new file mode 100644 (file)
index 0000000..c01060b
--- /dev/null
@@ -0,0 +1,6 @@
+login
+cselect // \83L\83\83\83\89\91I\91ð
+first  //\8aÈ\92P\82È\83X\83e\81[\83W
+panya  //\83p\83\93\82â\82Ì\82 \82é\83X\83e\81[\83W
+sselect        //\83X\83e\81[\83W\91I\91ð
+... 
index 2b92463..57bec6d 100644 (file)
@@ -126,10 +126,22 @@ var EnemyCharacterClass = function(stage, args){
        draw: function(x, y){
                EnemyCharacterClass.base.prototype.draw.apply(this, arguments);
                this.ownerStage.mainContext.save();
-               this.ownerStage.mainContext.fillStyle = "rgba(255,255,255,0.5)";
-               this.ownerStage.mainContext.strokeStyle = "rgba(0, 0, 0, 1)";
-               this.ownerStage.mainContext.font = "normal 12px sans-serif";
-               drawText(this.ownerStage.mainContext, this.HP, x, y - 20);
+               //this.ownerStage.mainContext.fillStyle = "rgba(255,255,255,0.5)";
+               //this.ownerStage.mainContext.strokeStyle = "rgba(0, 0, 0, 1)";
+               //this.ownerStage.mainContext.font = "normal 12px sans-serif";
+               //drawText(this.ownerStage.mainContext, this.HP, x, y - 20);
+               var color = "green";
+               var backColor = "gray";
+               var thickness = 4;
+               var barWidth = this.max_HP / 2;
+               if(barWidth < 16) barWidth = 16;
+               var barPerHP = this.HP / this.max_HP;
+               
+               this.ownerStage.mainContext.fillStyle = backColor;
+               this.ownerStage.mainContext.fillRect(x + (this.size.x - barWidth) / 2, y - thickness, barWidth, thickness);
+               this.ownerStage.mainContext.fillStyle = color;
+               this.ownerStage.mainContext.fillRect(x + (this.size.x - barWidth) / 2, y - thickness, barWidth * barPerHP, thickness);
+               
                this.ownerStage.mainContext.restore();
        },
 });
index 6a136d7..ce82ddb 100644 (file)
@@ -62,7 +62,7 @@ MainCharacterClass.createCharacter = function(stage, args)
        }else if(id == 4)
        {
                return new MainCharacterClass_Witch(stage, args);
-       }else if(id == 5)
+       }else
        {
                return new MainCharacterClass_Woman(stage, args);
        }