From 1760d02fa2f7180b8fa6808b80822c6a5bb69cad Mon Sep 17 00:00:00 2001 From: hikarupsp Date: Fri, 30 Aug 2013 03:17:47 +0900 Subject: [PATCH] =?utf8?q?=E3=83=8D=E3=83=83=E3=83=88=E3=83=AF=E3=83=BC?= =?utf8?q?=E3=82=AF=E9=96=A2=E9=80=A3=E4=BF=AE=E6=AD=A3=E3=80=82=E3=82=B9?= =?utf8?q?=E3=83=86=E3=83=BC=E3=82=B8=E3=81=AE=E5=A4=89=E6=9B=B4=E3=82=82?= =?utf8?q?=E5=90=AB=E3=81=BE=E3=82=8C=E3=82=8B=E3=81=AE=E3=81=A7=E3=80=81?= =?utf8?q?=E3=82=B9=E3=83=86=E3=83=BC=E3=82=B8=E4=BD=9C=E6=88=90=E8=80=85?= =?utf8?q?=E3=81=AE=E7=9A=86=E3=81=95=E3=82=93=E3=81=AF=E5=A4=89=E6=9B=B4?= =?utf8?q?=E7=AE=87=E6=89=80=E3=82=92=E4=B8=8A=E6=9B=B8=E3=81=8D=E3=81=97?= =?utf8?q?=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E6=B3=A8=E6=84=8F=E3=81=97?= =?utf8?q?=E3=81=A6=E3=81=8F=E3=81=A0=E3=81=95=E3=81=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- www/corelib/classes/BakingOvenObjectClass.js | 2 - www/corelib/classes/GameStageClass.js | 2 +- .../MainCharacters/MainCharacterClass_Hunter.js | 3 - .../MainCharacters/MainCharacterClass_Man.js | 4 +- .../MainCharacters/MainCharacterClass_NakedMan.js | 1 - .../MainCharacters/MainCharacterClass_Thief.js | 2 - .../MainCharacters/MainCharacterClass_Witch.js | 3 +- .../MainCharacters/MainCharacterClass_Woman.js | 2 - www/corelib/classes/PCDSLStageClass.js | 1 + www/corelib/classes/SelectWidgetClass.js | 8 +- www/corelib/core.js | 5 - www/corelib/coresubf.js | 8 ++ www/index.html | 8 -- www/stage/city.js | 11 +-- www/stage/fukushima.js | 2 - www/stage/koenma.js | 3 +- www/stage/login.js | 7 +- www/stage/main.js | 6 +- www/stage/okubo.js | 1 + www/stage/pcdsltest.js | 54 ---------- www/stage/pengin.js | 3 +- www/stage/sea.js | 3 +- www/stage/selectWindowTestStage.js | 109 --------------------- 23 files changed, 30 insertions(+), 218 deletions(-) delete mode 100644 www/stage/pcdsltest.js delete mode 100644 www/stage/selectWindowTestStage.js diff --git a/www/corelib/classes/BakingOvenObjectClass.js b/www/corelib/classes/BakingOvenObjectClass.js index a79a8af..287fe47 100644 --- a/www/corelib/classes/BakingOvenObjectClass.js +++ b/www/corelib/classes/BakingOvenObjectClass.js @@ -49,8 +49,6 @@ var BakingOvenObjectClass = function(ownerStage, args){ } else{ thatManager.addWidget(new MessageWidgetClass(thatManager, ["一つも材料が選択されていないので、パンを焼くことができません!\n"])); } - } else{ - thatManager.addWidget(new MessageWidgetClass(thatManager, ["キャンセルされました。\n"])); } that.isSelecting = false; },true, 0, true]) diff --git a/www/corelib/classes/GameStageClass.js b/www/corelib/classes/GameStageClass.js index b2cd31e..a888cec 100644 --- a/www/corelib/classes/GameStageClass.js +++ b/www/corelib/classes/GameStageClass.js @@ -172,7 +172,7 @@ GameStage.prototype = { drawBackground: function(){ if(this.background) { - this.mainContext.drawImage(this.background, 0, 0, 640, 480); + this.mainContext.drawImage(this.background, 0, 0); } else{ //ƒLƒƒƒ“ƒoƒX‚ð‘SÁ‹Ž diff --git a/www/corelib/classes/MainCharacters/MainCharacterClass_Hunter.js b/www/corelib/classes/MainCharacters/MainCharacterClass_Hunter.js index 1242af9..0987ccd 100644 --- a/www/corelib/classes/MainCharacters/MainCharacterClass_Hunter.js +++ b/www/corelib/classes/MainCharacters/MainCharacterClass_Hunter.js @@ -4,9 +4,6 @@ var MainCharacterClass_Hunter = function(stage, args){ this.size.x = 32; this.size.y = 64; this.movingVelocity = 200; - - this.ownerUID = stage.manager.userID; - stage.addStageObject(this, true); }.extend(MainCharacterClass, { diff --git a/www/corelib/classes/MainCharacters/MainCharacterClass_Man.js b/www/corelib/classes/MainCharacters/MainCharacterClass_Man.js index cd8a46c..827d251 100644 --- a/www/corelib/classes/MainCharacters/MainCharacterClass_Man.js +++ b/www/corelib/classes/MainCharacters/MainCharacterClass_Man.js @@ -4,9 +4,7 @@ var MainCharacterClass_Man = function(stage, args){ this.size.x = 32; this.size.y = 64; this.movingVelocity = 210; - this.jumpPower = 105; - this.ownerUID = stage.manager.userID; - + this.jumpPower = 105; stage.addStageObject(this, true); }.extend(MainCharacterClass, { diff --git a/www/corelib/classes/MainCharacters/MainCharacterClass_NakedMan.js b/www/corelib/classes/MainCharacters/MainCharacterClass_NakedMan.js index 1dbe69c..35f78f3 100644 --- a/www/corelib/classes/MainCharacters/MainCharacterClass_NakedMan.js +++ b/www/corelib/classes/MainCharacters/MainCharacterClass_NakedMan.js @@ -3,7 +3,6 @@ var MainCharacterClass_NakedMan = function(stage, args){ this.size.x = 32; this.size.y = 64; - this.ownerUID = stage.manager.userID; this.jumpPower = 120; this.movingVelocity = 250; this.max_HP = 50; diff --git a/www/corelib/classes/MainCharacters/MainCharacterClass_Thief.js b/www/corelib/classes/MainCharacters/MainCharacterClass_Thief.js index 6cca1ff..2d7ae2b 100644 --- a/www/corelib/classes/MainCharacters/MainCharacterClass_Thief.js +++ b/www/corelib/classes/MainCharacters/MainCharacterClass_Thief.js @@ -5,8 +5,6 @@ var MainCharacterClass_Thief = function(stage, args){ this.size.y = 64; this.movingVelocity = 205; - this.ownerUID = stage.manager.userID; - stage.addStageObject(this, true); }.extend(MainCharacterClass, { diff --git a/www/corelib/classes/MainCharacters/MainCharacterClass_Witch.js b/www/corelib/classes/MainCharacters/MainCharacterClass_Witch.js index 400f105..893c039 100644 --- a/www/corelib/classes/MainCharacters/MainCharacterClass_Witch.js +++ b/www/corelib/classes/MainCharacters/MainCharacterClass_Witch.js @@ -5,9 +5,8 @@ var MainCharacterClass_Witch = function(stage, args){ this.size.y = 64; this.antigravity = 600 / stage.manager.tickPerSecond; this.jumpPower = 42; - this.max_HP = 80; + this.max_HP = 80; this.HP = this.max_HP; - stage.userControlledCharacter = this; stage.addStageObject(this, true); }.extend(MainCharacterClass, { className: "MainCharacterClass_Witch", diff --git a/www/corelib/classes/MainCharacters/MainCharacterClass_Woman.js b/www/corelib/classes/MainCharacters/MainCharacterClass_Woman.js index 0c5c6f2..e3c6259 100644 --- a/www/corelib/classes/MainCharacters/MainCharacterClass_Woman.js +++ b/www/corelib/classes/MainCharacters/MainCharacterClass_Woman.js @@ -6,8 +6,6 @@ var MainCharacterClass_Woman = function(stage, args){ this.antigravity = 50 / stage.manager.tickPerSecond; this.movingVelocity = 200; - this.ownerUID = stage.manager.userID; - stage.addStageObject(this, true); }.extend(MainCharacterClass, { diff --git a/www/corelib/classes/PCDSLStageClass.js b/www/corelib/classes/PCDSLStageClass.js index 48e8312..1936aeb 100644 --- a/www/corelib/classes/PCDSLStageClass.js +++ b/www/corelib/classes/PCDSLStageClass.js @@ -85,6 +85,7 @@ var PCDSLStageClass = function(stgInfo, tbl) runStage: function(){ HorizonalScrollStageClass.prototype.runStage.apply(this, []); this.manager.setBackgroundMusic(this.BGM); + this.manager.addWidget(new UserStateWidgetClass(this.manager)); } }); diff --git a/www/corelib/classes/SelectWidgetClass.js b/www/corelib/classes/SelectWidgetClass.js index e72c0c4..f9ea4a9 100644 --- a/www/corelib/classes/SelectWidgetClass.js +++ b/www/corelib/classes/SelectWidgetClass.js @@ -28,8 +28,8 @@ var SelectWidgetClass = function(manager, args){ this.messageMergin = 32; //メッセージ周囲のマージン this.messageBorder = "3px orange solid"; //メッセージの外郭 this.buttonHeight = 16; //ボタン部分の高さ - this.buttonWidth = 64; //一つのボタンの幅 - this.backColor = "black"; //画面の背景色 + this.buttonWidth = 96; //一つのボタンの幅 + this.backColor = "rgba(0, 0, 0, 0.75)"; //画面の背景色 this.border = "1px white solid"; //画面の最外郭 //内部の変数 @@ -111,7 +111,7 @@ var SelectWidgetClass = function(manager, args){ if(this.enableCancel) { this.cancelButton = new SelectWidgetItemClass(true, "キャンセル", new Point2D(this.buttonWidth, this.buttonHeight), false, "キャンセルします。"); - bCancel = this.cancelButton.createHtmlElement(this.size.x - this.padding - (this.buttonWidth * 2) - this.itemPadding, this.size.y - this.padding - this.buttonHeight); + bCancel = this.cancelButton.createHtmlElement(this.size.x - this.padding - (this.buttonWidth * 2) - this.itemPadding * 2, this.size.y - this.padding - this.buttonHeight); wBox.appendChild(bCancel); this.items.push(this.cancelButton); } @@ -269,7 +269,7 @@ var SelectWidgetItemClass = function(showAsLabel, value, size, selected, message this.border = "none"; this.borderSelected = "1px orange solid"; this.back = ""; - this.backSelected = "#ffffc6"; + this.backSelected = "orange"; //内部変数 this.element = null; diff --git a/www/corelib/core.js b/www/corelib/core.js index e580e96..a69b801 100644 --- a/www/corelib/core.js +++ b/www/corelib/core.js @@ -30,10 +30,6 @@ var loc = document.location.href; var URL_PCD_Root = loc.slice(0, loc.lastIndexOf("/") + 1); -//var URL_PCD_Root = "http://localhost/pcd2013dev/www/"; -//var URL_PCD_Root = "http://192.168.6.242/pcd2013dev/www/"; -//var URL_PCD_Root = "http://192.168.0.3/PCD2013GSCL/www/"; -//var URL_PCD_Root = "http://192.168.6.242/pcd2013hikarupsp/pcd2013dev/www/"; var URL_PCD_Auth = URL_PCD_Root + "auth.php"; var URL_PCD_Audio = URL_PCD_Root + "audio/"; var URL_PCD_Stage = URL_PCD_Root + "stage/"; @@ -112,7 +108,6 @@ function GameManager(parent, debugTextName){ this.stagePausedFunction = null; this.backgroundMusic = null; - this.addWidget(new UserStateWidgetClass(this)); //**イベントリスナー設定** //コールバックを行うために、イベントリスナーのmanagerプロパティにGameManagerのインスタンスを代入する。 //timerTick diff --git a/www/corelib/coresubf.js b/www/corelib/coresubf.js index 91b60f1..afa17e2 100644 --- a/www/corelib/coresubf.js +++ b/www/corelib/coresubf.js @@ -5,6 +5,14 @@ function createAudio(name) return new Audio(URL_PCD_Audio + name); } +function createImage(name) +{ + //拡張子も含めて指定 + var img = document.createElement('img'); + img.src = "./images/" + name; + return img; +} + function createCanvas(id, width, height, x, y, z, parent) { //識別名idで diff --git a/www/index.html b/www/index.html index 6996428..28822a1 100755 --- a/www/index.html +++ b/www/index.html @@ -21,13 +21,5 @@ onload = function() {
-
- -
\ No newline at end of file diff --git a/www/stage/city.js b/www/stage/city.js index acc5e30..5b104cd 100644 --- a/www/stage/city.js +++ b/www/stage/city.js @@ -58,7 +58,7 @@ var stgObjects = { e : {base:BlockClass,args:['leavesedge2.png',18,0],prop:{isPhantom:true}}, //金属はしご - x: {base:LadderBlockClass,args:['metalradder.png']}, + x: {base:LadderBlockClass,args:['metalladder.png']}, y: {base:BakingOvenObjectClass,args:[]}, @@ -95,16 +95,13 @@ var stage = new PCDSLStageClass(stgInfo, tbl); stage.runStage = function(){ PCDSLStageClass.prototype.runStage.apply(this, []); var main = new MainCharacterClass_Witch(stage); - main.size.x = 32; - main.size.y = 64; main.origin.x = 100; main.ownerUID = stage.manager.userID; - main.movingVelocity = 200; stage.userControlledCharacter = main; - stage.addStageObject(main, true); + //はしご for(var i = 0; i < 12; i++){ - var o = new LadderBlockClass(stage, ['metalradder.png']); + var o = new LadderBlockClass(stage, ['metalladder.png']); o.origin.x = 384; o.origin.y = 416 - (i * 32); stage.addStageObject(o); @@ -118,7 +115,7 @@ stage.runStage = function(){ } //はしご for(var i = 0; i < 7; i++){ - var o = new LadderBlockClass(stage, ['metalradder.png']); + var o = new LadderBlockClass(stage, ['metalladder.png']); o.origin.x = 1728; o.origin.y = 224 + (i * 32); stage.addStageObject(o); diff --git a/www/stage/fukushima.js b/www/stage/fukushima.js index 3732d51..4255ab0 100644 --- a/www/stage/fukushima.js +++ b/www/stage/fukushima.js @@ -70,12 +70,10 @@ function callBack(obj, obj_x, obj_y) stage.runStage = function(){ PCDSLStageClass.prototype.runStage.apply(this, []); var main = new MainCharacterClass_Woman(stage); - main.origin.x = 50; main.origin.y =280; main.ownerUID = stage.manager.userID; stage.userControlledCharacter = main; - stage.addStageObject(main, true); var cow1 = new SlopeBlockClass(stage, ["cow.png", 14, 14]); cow1.size.x = 100; diff --git a/www/stage/koenma.js b/www/stage/koenma.js index 591a702..af35f80 100644 --- a/www/stage/koenma.js +++ b/www/stage/koenma.js @@ -1,4 +1,4 @@ -var stgObjects={ +var stgObjects={ a:{base:SlopeBlockClass,args:['1213.png',16,16],prop:{enableDebugMode:false}}, b:{base:BlockClass, args:"1190.png"}, @@ -98,7 +98,6 @@ stage.runStage = function(){ main.origin.y =0; main.ownerUID = stage.manager.userID; stage.userControlledCharacter = main; - stage.addStageObject(main, true); var torii1 = new SlopeBlockClass(stage, ["torii.png", 128, 128]); torii1.size.x = 128; diff --git a/www/stage/login.js b/www/stage/login.js index 4af566d..11000b7 100644 --- a/www/stage/login.js +++ b/www/stage/login.js @@ -11,13 +11,14 @@ stage.runStage = function(){ this.authform = createDOMObject("form", "authform", "MainArea"); this.authform.style.zIndex = 4; this.authform.style.position = "absolute"; - this.authform.style.top = "200px"; - this.authform.style.left = "70px"; + this.authform.style.top = "300px"; + this.authform.style.left = "80px"; this.authform.onsubmit = function () { this.submitAuth; return false;}; - this.authform.innerHTML = "ユーザー名:
"; + this.authform.innerHTML = "ユーザー名:"; this.authform.innerHTML += ""; this.authSubmitButton = document.getElementById("authSubmitButton"); this.authSubmitButton.onclick = this.submitAuth; + this.background = createImage("title.jpg"); }; stage.submitAuth = function(){ mainManager.userManager.loginAs(mainManager.runningStage.authform.userName.value); diff --git a/www/stage/main.js b/www/stage/main.js index 0a09bd3..84a350e 100644 --- a/www/stage/main.js +++ b/www/stage/main.js @@ -117,10 +117,8 @@ stage.runStage = function(){ main.origin.x =32; main.origin.y =0; main.ownerUID = stage.manager.userID; - main.movingVelocity = 200; - - stage.userControlledCharacter = main; - stage.addStageObject(main, true); + main.movingVelocity = 200; + stage.userControlledCharacter = main var barn = new SlopeBlockClass(stage, ["barn.png", 49, 49]); diff --git a/www/stage/okubo.js b/www/stage/okubo.js index 1302c56..27f5d6e 100755 --- a/www/stage/okubo.js +++ b/www/stage/okubo.js @@ -123,6 +123,7 @@ stage.runStage = function(){ var main = new MainCharacterClass_Hunter(stage); main.origin.x = 0; main.origin.y = 0; + main.ownerUID = stage.manager.userID; stage.userControlledCharacter = main; var e1 = new EnemyCharacterClass_PanTank(stage); diff --git a/www/stage/pcdsltest.js b/www/stage/pcdsltest.js deleted file mode 100644 index 8a03b1b..0000000 --- a/www/stage/pcdsltest.js +++ /dev/null @@ -1,54 +0,0 @@ -var stgObjects = { - a : {base:BlockClass,args:'1190.png'}, - b : {base:SlopeBlockClass,args:['1191.png',0,32],prop:{enableDebugMode:true}}, - c : {base:FreeItemClass,args:["1234.png",callBack],prop:{times:1}}, - _ : null -}; - -function callBack(obj, obj_x, obj_y) -{ - if(obj instanceof MainCharacterClass){ - - } -} - -var stgInfo = { - width: 6400, - height: 480, - background: "back2.png", -}; - -with(stgObjects) { - var tbl = [ - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,b,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,a,b,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,a,a,b,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,a,a,a,b,_,_,_,_,c,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a], - [a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a], - ]; -} - -var stage = new PCDSLStageClass(stgInfo, tbl); - -stage.runStage = function(){ - PCDSLStageClass.prototype.runStage.apply(this, []); - var main = new MainCharacterClass(stage, [["kuma1.png","kuma2.png","kuma3.png", "kuma4.png", "kuma3.png", "kuma2.png"], ["kumaready.png"]]); - main.origin.x = 50; - main.origin.y =0; - main.ownerUID = stage.manager.userID; - stage.userControlledCharacter = main; - stage.addStageObject(main, true); -}, - - -stage; diff --git a/www/stage/pengin.js b/www/stage/pengin.js index b718169..08cc71e 100644 --- a/www/stage/pengin.js +++ b/www/stage/pengin.js @@ -1,4 +1,4 @@ -var stgObjects={ +var stgObjects={ a:{base:SlopeBlockClass,args:['1213.png',16,16],prop:{enableDebugMode:false}}, b:{base:BlockClass, args:"1190.png"}, @@ -97,7 +97,6 @@ stage.runStage = function(){ main.origin.y =0; main.ownerUID = stage.manager.userID; stage.userControlledCharacter = main; - stage.addStageObject(main, true); diff --git a/www/stage/sea.js b/www/stage/sea.js index e0901ed..1230e40 100644 --- a/www/stage/sea.js +++ b/www/stage/sea.js @@ -73,7 +73,7 @@ var stage = new PCDSLStageClass(stgInfo, tbl); stage.runStage = function(){ PCDSLStageClass.prototype.runStage.apply(this, []); - var main = new MainCharacterClass(stage, [["bowman1.png","bowman2.png","bowman3.png", "bowman4.png", "bowman3.png", "bowman2.png","bowman-aim.png","bowman-shot.png",]]); + var main = new MainCharacterClass_Hunter(stage); main.size.x = 32; main.size.y=64; main.origin.x = 32; @@ -81,7 +81,6 @@ stage.runStage = function(){ main.collisionMargin.bottom = 0; main.ownerUID = stage.manager.userID; stage.userControlledCharacter = main; - stage.addStageObject(main, true); var msg1 = new MessageItemClass(stage, ["この看板を読んだあなたは、そろそろ覚悟を決めたほうがいい。\n...なぜかって??\nそれは少し先にすすもうとしてみればわかるよ。\n"]); msg1.origin.x = 3648; diff --git a/www/stage/selectWindowTestStage.js b/www/stage/selectWindowTestStage.js deleted file mode 100644 index 3d6d116..0000000 --- a/www/stage/selectWindowTestStage.js +++ /dev/null @@ -1,109 +0,0 @@ - - - -var stgObjects = { - a : {base:BlockClass,args:'1190.png'}, - b : {base:SlopeBlockClass,args:['1191.png',0,32]}, - d : {base:SlopeBlockClass,args:['1192.png',32,0]}, - e : {base:SlopeBlockClass,args:['1193.png',16,16]}, - h : {base:SlopeBlockClass,args:['1194.png',0,16]}, - i : {base:SlopeBlockClass,args:['1195.png',16,0]}, - j : {base:SlopeBlockClass,args:['1196.png',16,32]}, - k : {base:SlopeBlockClass,args:['1197.png',32,16]}, - l : {base:BlockClass,args:'1198.png'}, - c : {base:FreeItemClass,args:["1234.png",callbackFunc],prop:{times:1},adjust:[0, 16]}, - m : {base:SlopeBlockClass,args:['1212.png',16,16]}, - n : {base:SlopeBlockClass,args:['1213.png',16,16]}, - o : {base:SlopeBlockClass,args:['1214.png',16,16]}, - p : {base:SlopeBlockClass,args:['1215.png',16,16]}, - q : {base:SlopeBlockClass,args:['1216.png',16,16]}, - _ : null -}; - -var stgInfo = { - width: 6400, - height: 480, - background: "back2.png" -}; - -with(stgObjects){ - var tbl = [ - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, ,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,_,c,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,_,_,_,_,k,e,e,j,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,_,_,_,k,e,i,l,a,a,a,a,b,_, , ,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,_,k,i,l,a,a,a,a,a,a,a,a,a,h,j,_, , , ,n,p, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [_,d,a,a,a,a,a,a,a,a,a,a,a,a,a,a,b, ,_,_,q,o,n,m,n, , , , , ,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ], - [l,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,b,_,_,q,q,q,q,q,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] - ]; -} - - -var stage = new PCDSLStageClass(stgInfo, tbl, null); -var main = new MainCharacterClass(stage, [["kuma1.png","kuma2.png","kuma3.png", "kuma4.png", "kuma3.png", "kuma2.png"], ["kumaready.png"]]); -main.size.x = 64; -main.size.y=64; -main.origin.x = 50; -main.origin.y =0; -stage.userControlledCharacter = main; -stage.addStageObject(main); - - -function callbackFunc(obj, obj_x, obj_y) -{ - var list = []; - var siz = new Point2D(48, 48); - - // SelectWidgetItemClassの引数 - // showAsLabel ... true : 第二引数をテキストとして表示する - // value : 表示する文字列または画像 - // size : 要素のサイズ(Point2D) - // selected : 初めから選択されているか(省略可 : 初期値false) - // message : SelectWidgetClassの下に表示する文字列 - list.push(new SelectWidgetItemClass(false, "001.png", siz, false, "飴玉")); - list.push(new SelectWidgetItemClass(false, "003.png", siz, false, "油")); - list.push(new SelectWidgetItemClass(false, "004.png", siz, false, "ぶどう")); - list.push(new SelectWidgetItemClass(false, "005.png", siz, false, "りんご")); - list.push(new SelectWidgetItemClass(false, "006.png", siz, false, "本")); - list.push(new SelectWidgetItemClass(false, "008.png", siz, true, "いわし")); - list.push(new SelectWidgetItemClass(false, "010.png", siz, false, "石")); - list.push(new SelectWidgetItemClass(false, "011.png", siz, false, "カレー")); - list.push(new SelectWidgetItemClass(false, "012.png", siz, false, "かびたパン")); - list.push(new SelectWidgetItemClass(false, "013.png", siz, false, "イースト菌")); - list.push(new SelectWidgetItemClass(false, "014.png", siz, false, "あんこ")); - list.push(new SelectWidgetItemClass(false, "015.png", siz, false, "ハム")); - - // atgs[0] : SelectWidgetItemClassのリスト - // args[1] : 選択完了時のコールバック 引数: Cancel->null, Ok->SelectWidgetItemClassの「リスト」(複数選択不可の時も) (省略可) - // args[2] : 複数選択可(省略可、初期値はfalse) - // args[3] : 初期選択位置(省略可、初期値は0); - // args[4] : 最下部にメッセージを表示するかどうか(省略可、初期値はtrue); - stage.manager.addWidget(new SelectWidgetClass(mainManager, [list, function(selected){ - if(selected == null) - { - stage.manager.addWidget(new MessageWidgetClass(mainManager, ["キャンセルされました。\n"])); - }else if(selected.length == 0) - { - stage.manager.addWidget(new MessageWidgetClass(mainManager, ["ひとつも選択されていません。\n"])); - }else - { - var msg = ""; - for(var item in selected) - { - msg += selected[item].message + "\n"; - } - stage.manager.addWidget(new MessageWidgetClass(mainManager, ["選択項目は...\n" + msg + "です\n"])); - } - }, true, 0, true])); -} - - -stage; \ No newline at end of file -- 2.11.0