OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/h58pcdgame/GameScriptCore...
author西田 耀 <hikarupsp@users.sourceforge.jp>
Fri, 16 Aug 2013 05:20:41 +0000 (14:20 +0900)
committer西田 耀 <hikarupsp@users.sourceforge.jp>
Fri, 16 Aug 2013 05:20:41 +0000 (14:20 +0900)
www/corelib/classes/BlockClass.js
www/corelib/classes/FreeItemClass.js
www/corelib/classes/ItemClass.js
www/corelib/classes/MovableStageObjectClass.js
www/corelib/classes/SlopeBlockClass.js

index 5859e0f..6d1199d 100644 (file)
@@ -20,7 +20,7 @@ var BlockClass = function(ownerStage, args)
        //\83u\83\8d\83b\83N\82Ì\93\96\82½\82è\94»\92è\97Ì\88æ\82ð\95Ï\8dX\82·\82é\82½\82ß\82É\82Í\82±\82Ì\8aÖ\90\94\82ð\83I\81[\83o\81[\83\89\83C\83h\82·\82é
        //\88ø\90\94\82É\82Í\81A\93\96\82½\82è\82ð\8am\82©\82ß\82é\97v\91f\82Ì\93\96\82½\82è\94»\92è\97Ì\88æ\82Ì 1:\8d\8fã\8b÷ 2: \89E\89º\8b÷\82Ì\8dÀ\95W\82ð\8ew\92è
        //MovableStageObject.isCollided\82©\82ç\8cÄ\82Î\82ê\82é
-       isCollided: function(x1, y1, x2, y2){
+       judgeCollideRange: function(x1, y1, x2, y2){
                return x2 >= this.origin.x && x1 < this.origin.x + this.size.x && y2 >= this.origin.y && y1 < this.origin.y + this.size.y;
        }
 });
\ No newline at end of file
index cf680ed..1bba545 100644 (file)
@@ -15,7 +15,7 @@ var FreeItemClass = function(stage, args){
        
        //\90G\82ê\91±\82¯\82½\82Æ\82«\82É\89½tick\82¨\82«\82É
        //\82 \81A\88ê\89\9e\81BPCDSL\82©\82ç\8ae\83v\83\8d\83p\83e\83B\82ð\8ew\92è\82·\82é\95û\96@\82ª\82 \82é\82Ì\82Å\88ø\90\94\82É\97p\88Ó\82·\82é\95K\97v\82Í\82 \82è\82Ü\82¹\82ñ\81B
-       this.touchInterval = 100;
+       this.touchInterval = 0;
        this.lastTouchedTickCount = -9999;
        
 }.extend(ItemClass, {
@@ -24,6 +24,10 @@ var FreeItemClass = function(stage, args){
                this.ownerStage.mainContext.drawImage(this.image, x, y, 32, 32);
                this.ownerStage.mainContext.globalAlpha = 1.0;
        },
+       tick: function(){
+       
+       
+       },
        itemAttacked : function(obj, obj_x, obj_y)
        {
                if(this.ownerStage.manager.tickCount - this.lastTouchedTickCount > this.touchInterval)
index 18aee94..9f3f16f 100644 (file)
@@ -11,10 +11,14 @@ var ItemClass = function(ownerStage, args)
 
        },
        
+       tick: function(){
+       
+       },
+       
        //\83u\83\8d\83b\83N\82Ì\93\96\82½\82è\94»\92è\97Ì\88æ\82ð\95Ï\8dX\82·\82é\82½\82ß\82É\82Í\82±\82Ì\8aÖ\90\94\82ð\83I\81[\83o\81[\83\89\83C\83h\82·\82é
        //\88ø\90\94\82É\82Í\81A\93\96\82½\82è\82ð\8am\82©\82ß\82é\97v\91f\82Ì\93\96\82½\82è\94»\92è\97Ì\88æ\82Ì 1:\8d\8fã\8b÷ 2: \89E\89º\8b÷\82Ì\8dÀ\95W\82ð\8ew\92è
        //MovableStageObject.isCollided\82©\82ç\8cÄ\82Î\82ê\82é
-       isCollided: function(x1, y1, x2, y2){
+       judgeCollideRange: function(x1, y1, x2, y2){
                return x2 >= this.origin.x && x1 < this.origin.x + this.size.x && y2 >= this.origin.y && y1 < this.origin.y + this.size.y;
        },
        
index 5e51f0e..fb711e2 100644 (file)
@@ -54,7 +54,7 @@ var MovableStageObjectClass = function(stage, args)
                //MovableStageObject\82ª(x, y)\82Ì\82Æ\82«\91\8a\8eè\82Ìobj\82Æ\8fÕ\93Ë\82·\82é\82©\94»\92è
                if(obj instanceof BlockClass || obj instanceof ItemClass)
                {
-                       return obj.isCollided(x + this.collisionMarginLeft, y + this.collisionMarginTop, x + this.size.x - this.collisionMarginRight, y + this.size.y - this.collisionMarginBottom);
+                       return obj.judgeCollideRange(x + this.collisionMarginLeft, y + this.collisionMarginTop, x + this.size.x - this.collisionMarginRight, y + this.size.y - this.collisionMarginBottom);
                }
                return false;
        }
index 8b52713..a513272 100644 (file)
@@ -16,7 +16,7 @@ var SlopeBlockClass = function(ownerStage, args)
        this.y2 = 0;
        
 }.extend(BlockClass, {
-       isCollided: function(x1, y1, x2, y2){
+       judgeCollideRange: function(x1, y1, x2, y2){
        
                //\83f\83o\83b\83O\8fî\95ñ
                this.x1 = x1;