}
},
drawAsPoint: function(x, y){
+
+ // \95\\8e¦\82Ì\8fd\82Ë\8d\87\82í\82¹\8f\87 : \91¼\82Ì\8d\80\96Ú < \83L\83\83\83\89 < forceTopMost==true\82Ì\8d\80\96Ú
+
+ var characterList = [];
+ var topList = [];
+ var drawItem = function(stgobj)
+ {
+ var px = stgobj.origin.x - x, py = stgobj.origin.y - y;
+
+ if(px > -stgobj.size.x && py > -stgobj.size.y && px < 640 && py < 480)
+ {
+ stgobj.draw(px, py);
+ if(this.debugMode){
+ stgobj.debugDraw(px, py);
+ }
+ }
+ };
+
//\82·\82×\82Ä\82Ì\83I\83u\83W\83F\83N\83g\82ð\8dÄ\95`\89æ
//x, y\82Í\95`\89æ\88Ê\92u\82Ì\83I\83t\83Z\83b\83g
for(var sp in this.stageObjectList)
//\8ae\8eíStageObject\82Ìdraw\82ð\8eÀ\8ds
for(var i = 0, li = this.stageObjectList[sp].length; i < li; i++){
var stgobj = this.stageObjectList[sp][i];
- var px = stgobj.origin.x - x, py = stgobj.origin.y - y;
-
- if(px > -stgobj.size.x && py > -stgobj.size.y && px < 640 && py < 480)
+ if(stgobj.forceTopMost)
{
- stgobj.draw(px, py);
- if(this.debugMode){
- stgobj.debugDraw(px, py);
- }
+ topList.push(stgobj);
+ }else if(stgobj instanceof CharacterClass)
+ {
+ characterList.push(stgobj);
+ }else
+ {
+ drawItem(stgobj);
}
}
}
+
+ for(var i in characterList)
+ {
+ var stgobj = characterList[i];
+ drawItem(stgobj);
+ }
+
+ for(var i in topList)
+ {
+ var stgobj = topList[i];
+ drawItem(stgobj);
+ }
},
drawBackground: function(){
if(this.background)
//\82»\82ê\88È\8aO\82Ì\8fê\8d\87\82Í\94C\88Ó\82Ì\83^\83C\83~\83\93\83O\82ÅchecktouchingDirection\82ð\8cÄ\82Ñ\8fo\82·\82×\82µ\81B
this.touchingDirection = 0;
this.collidedObjects = new Array();
+
+ this.forceTopMost = false;
}
StageObject.prototype = {
className:"StageObject",