OSDN Git Service

初めのステージで死亡してもパン屋に戻らないように
authorttwilb <ttwilb@users.sourceforge.jp>
Thu, 5 Sep 2013 20:40:37 +0000 (05:40 +0900)
committerttwilb <ttwilb@users.sourceforge.jp>
Thu, 5 Sep 2013 20:40:37 +0000 (05:40 +0900)
www/corelib/core.js
www/stage/panya.js

index 85cec06..347f47e 100644 (file)
@@ -101,6 +101,9 @@ function GameManager(parent, debugTextName){
        //タイマーカウントを初期化
        this.tickCount = 0;
        
+       //死んだときにもどってくるステージ
+       this.returningStage = 'onieasy';
+       
        // pauseStage()関連の配列。
        this.stagePaused = false;
        this.stagePausedFunctions = [];
@@ -168,7 +171,7 @@ GameManager.prototype = {
                                        w.manager.UIManager.clearInput();
                                        w.manager.runningStage.userControlledCharacter.HP = w.manager.runningStage.userControlledCharacter.max_HP;
                                        if(w.manager.runningStageName){
-                                               w.manager.loadStageFromNetwork("panya");
+                                               w.manager.loadStageFromNetwork(this.returningStage);
                                        } else{
                                                //ローカルモード時は動作を停止させるだけ
                                                w.manager.stopStage();
index e0012bb..3766482 100644 (file)
@@ -51,12 +51,12 @@ _:null,
 function callback_test(){
 }
 var stgInfo = {
-    width: 1600,                               //���T�C�Y
+    width: 1600,                               //???T?C?Y
     height: 480,
-     background: "DSC_0372.png",               //�w�i�摜�B������640px�ł����K�v�͂Ȃ��B
+     background: "DSC_0372.png",               //?w?i???B??????640px??????K?v?????B
     //BGM:   "yamamusic.mp3"
-                               //�c�T�C�Y
-       //�w�i�摜�B������640px�ł����K�v�͂Ȃ��B
+                               //?c?T?C?Y
+       //?w?i???B??????640px??????K?v?????B
 };
 
  
@@ -95,6 +95,10 @@ function callBack(obj, obj_x, obj_y)
 
 stage.runStage = function(){
        PCDSLStageClass.prototype.runStage.apply(this, []);
+       
+       //死亡時の戻り先再設定
+       
+       mainManager.returningStage = 'panya';
 
        var that = this;
        var stageNameList = [];