{
var tickAllObjects = true;
//\82Ü\82¸\81A\83N\83\89\83X\92è\8b`.tick() (\97á\82¦\82ÎBlockStageObjectClass.tick = function(){};) \82ª\92è\8b`\82³\82ê\82Ä\82½\82ç\8eÀ\8ds
- //if(sp.tick){
- // tickAllObjects = sp.tick(this.stageObjectList[sp]);
- //}
+ if(sp.tick){
+ tickAllObjects = sp.tick(this.stageObjectList[sp]);
+ }
+
//\8e\9f\82É\8ae\8eíStageObject\82Ìtick\82ð\8eÀ\8ds
if(tickAllObjects)
{
//\83A\83C\83e\83\80\82ð\8eæ\93¾\82·\82é\82©\94Û\82©
var gainItem = items instanceof Array;
var retv = false;
- this.eachStageObject(function(f){
- if(f !== obj){
- if(obj.isCollided(f, x, y)){
- //\8fÕ\93Ë\90æf\82Ì\8fÕ\93Ë\94Í\88Í\93à\82É\82¢\82é
- if(f.isPhantom){
- //\8fÕ\93Ë\90æf\82ª\8fÕ\93Ë\94»\92è\96³\8e\8b\82¾\82Á\82½\82ç\81A\8fÕ\93Ë\82Í\82µ\82È\82¢
- if(gainItem){
- //\8fÕ\93Ë\90æf\82ð\8eæ\93¾\82µ\82½\83A\83C\83e\83\80\82É\89Á\82¦\82é\81B
- for(var titem in items){
- //\95¡\90\94\92Ç\89Á\82Ì\96h\8e~
- if(titem == f){
- return true;
+ for(var sp in this.stageObjectList)
+ {
+ for(var i = 0; i < this.stageObjectList[sp].length; i++){
+ var f = this.stageObjectList[sp][i];
+ if(f !== obj){
+ if(obj.isCollided(f, x, y)){
+ //\8fÕ\93Ë\90æf\82Ì\8fÕ\93Ë\94Í\88Í\93à\82É\82¢\82é
+ if(f.isPhantom){
+ //\8fÕ\93Ë\90æf\82ª\8fÕ\93Ë\94»\92è\96³\8e\8b\82¾\82Á\82½\82ç\81A\8fÕ\93Ë\82Í\82µ\82È\82¢
+ if(gainItem){
+ //\8fÕ\93Ë\90æf\82ð\8eæ\93¾\82µ\82½\83A\83C\83e\83\80\82É\89Á\82¦\82é\81B
+ for(var titem in items){
+ //\95¡\90\94\92Ç\89Á\82Ì\96h\8e~
+ if(titem == f){
+ continue;
+ }
}
+ items.push(f);
}
- items.push(f);
+ } else{
+ //\8fÕ\93Ë\82µ\82½
+ retv = true;
}
- } else{
- //\8fÕ\93Ë\82µ\82½
- retv = true;
- return true;
}
}
}
- return true;
- });
+ }
return retv;
},
for(var i = 0; i < ct; i++){
if(!fx && this.collideJudge(obj, ex + dx, ey, gotItems)){
//caterpillar\82Ì\8d\82\82³\82ð\91«\82µ\82Ä\88Ú\93®\82Å\82«\82é\82©\8e\8e\82µ\82Ä\82Ý\82é
- if(this.collideJudge(obj, ex + dx, ey - caterpillar, gotItems)){
+ if(caterpillar != 0 && this.collideJudge(obj, ex + dx, ey - caterpillar, gotItems)){
//\82»\82ê\82Å\82àx\8e²\82ª\8fÕ\93Ë\82µ\82½\82Ì\82Å\88Ú\93®\82ð\92â\8e~\82µ\83t\83\89\83O\82ð\83Z\83b\83g\82·\82é
fx = true;
collideDirection |= (dx > 0 ? 1 : 2);
}
if(!fy){
ey += dy;
+ }else if(fx)
+ {
+ // fx && fy \82Å\82 \82ê\82Î\82±\82ê\88È\8fã\83\8b\81[\83v\82µ\82Ä\82à\88Ó\96¡\82È\82¢\82Ì\82Å\94²\82¯\82é
+ break;
}
}
}