OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/h58pcdgame/GameScriptCore...
[h58pcdgame/GameScriptCoreLibrary.git] / www / stage / sea.js
1 var stgObjects = {
2         
3         // BlockClass : 普通のブロック。 引数に画像名を指定
4     a : {base:BlockClass,args:'1241.png'},
5     d : {base:BlockClass,args:'1248.png'},
6     e : {base:BlockClass,args:'1244.png'},
7     n : {base:HiddenBlockClass,args:'1244.png', prop:{collidingMask:CollideRight, collidingExcludeMask:(CollideLeft | CollideTop | CollideBody)}},
8     p : {base:HiddenBlockClass,args:'1241.png', prop:{collidingMask:CollideBottom, collidingExcludeMask:(CollideLeft |CollideRight| CollideTop)}},
9     f : {base:BlockClass,args:'1245.png'},
10     o : {base:BlockClass,args:'palm_body.png'},
11     // SlopeBlockClass : 当たり判定が斜めのブロック。
12     // 引数 : 画像名, 当たり判定領域左側の開始位置のブロック上辺からの高さ, 当たり判定領域右側の...
13     //        たとえば、この例のように 0, 32 と指定すれば右下がりの坂になり、32, 0と指定すれば左下がり、 16, 16と指定すれば半分の高さの長方形になる
14     // enableBlockMode : 当たり判定領域をデバッグ表示する。
15     b : {base:SlopeBlockClass,args:['1243.png',-1,33],prop:{enableDebugMode:true}},
16     g : {base:SlopeBlockClass,args:['1242.png',33,-1],prop:{enableDebugMode:true}},
17     h : {base:SlopeBlockClass,args:['1246.png',32,0],prop:{enableDebugMode:true}},
18     i : {base:SlopeBlockClass,args:['1247.png',0,32],prop:{enableDebugMode:true}},
19     j : {base:SlopeBlockClass,args:['1244.png',600,600],prop:{enableDebugMode:true}},
20     k : {base:SlopeBlockClass,args:['1246.png',600,600],prop:{enableDebugMode:true}},
21     l : {base:SlopeBlockClass,args:['1247.png',600,600],prop:{enableDebugMode:true}},
22     m : {base:SlopeBlockClass,args:['1241.png',600,600],prop:{enableDebugMode:true}},
23     
24    
25     // FreeItemClass : キャラが取得するとコールバックが実行されるアイテム
26     // callback : 誰かに取得されたときに発生するコールバック。アタックした人、そのアタック直後のx, y座標が引数にセットされる。
27     // times : 取得できる回数で、-1で無限。
28     c : {base:FreeItemClass,args:["1248.png",callBack],prop:{times:1}},
29     
30     // 何もブロックを置かない位置のためにかならずこのようなエントリーを記述
31     _ : null
32 };
33
34 // FreeItemClassのコールバック
35 function callBack(obj, obj_x, obj_y)
36 {
37         if(obj instanceof MainCharacterClass){
38
39         }
40 }
41
42 var stgInfo = {
43     width: 6400,                                //横サイズ
44     height: 480,                                //縦サイズ
45     background: "back2.png",    
46     BGM: "umi.mp3",  
47     waterLevel: 352,
48
49 };
50
51 with(stgObjects){
52         var tbl = [
53                 [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , ,a,c,c,a,c,c,a,c,a,a, , , , , , , , , , , , , , , , , , , , , ],
54                 [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , ,a,c,a,a,c,c,a,c,c,a, , , , , , , , , , , , , , , , , , , , , ],
55                 [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , ,a,c,c,a,c,c,a,c,c,a, , , , , , , , , , , , , , , , , , , , , ],
56                 [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , ,a,c,c,a,c,c,a,c,c,c, , , , , , , , , , , , , , , , , , , , , ],
57                 [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,_, , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , ,g,a,a,a,a,b, , , , , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , ,c,a,c,a,c,c,a,c,c,c, , , , , , , , , , , , , , , , , , , , , ],
58                 [ , , , ,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, ,_, ,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , ,a,m,m,m,m,m,a,a,b, , , , , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , ,_,c,c,a,c,c,a,c,c,c, , , , , , , , , , , ,d,d,d,d,d,d,d,d, , ],
59                 [ , , , , , , , , , , , , , ,_, , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , ,_,o,_,_,_,_,_,_,_,_,_,_,_,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , ,p, , , ,a,m,m,m,m,m,a,a,m,b, , , , , , , , ,_,_, , , , , , ,o, , , , , , , , , , , , , , , , , , , ,_,c,c,a,c,c,a,c,a,a, , ,g,a,a,a,a,b, , ,d,d,d,d,d,d,d,d,d,d, ],
60                 [ , , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , ,o, , , , , , , , , , , , , , , , , , , , , , , , , , , ,_,o,_,_,_,g,a,a,a,a,a,a,b,_, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , ,a,a,a,a,a,a,a,a,a,a,_, , , , , , , ,_,_,_,_,_, , , ,o, , , , , , , , , , , , , , , , , , , ,c,a,a,a,c,c,a,c,a,a, , ,a,a,a,a,a,a, , ,a,d,d,d,d,d,d,d,d,a, ],
61                 [ , , , , , , , ,_,p, , , , ,o, , , , , , , , , , , , , , , , , , , , , , , ,g,a,a,a,a,a,d,a,b, , , , , , , , , , , , , , , , , , , , , , , , , , ,_,o,_,_,g,d,d,d,d,d,a,a,a,a,b, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,o, , , , , , ,a,a,a,a,a,a,a,a,a,m,b, , , , , , ,_,_,_,_,_,_,_, ,c,c,c,m,b, , , , , , , , , , , , , ,p, , ,a,a,a,a,c,c,a,c,a,a, , ,a,a,a,a,a,a, , ,a,d,d,d,d,d,d,d,d,a, ],
62                 [b, , , , , , , , , , , , , ,o, , , , , , , , , , , , , , , , , , , , ,g,a,a,m,m,m,m,m,m,m,m,m,a,a,a,a,b, , , , , , , , , , , , , , , , , , , , , ,_,o,_,g,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,d,a,d,d,d,b,_, , ,g,a,a,a,a,a,b, , , , ,_,g,a,a,a,a,b, , , , ,a,a,a,a,a,a,a,a,a,m,m, , , ,g,a,a,a,a,a,a,b,_,_,g,c,c,c,m,a,a,b,_, , , , , ,g,b, , , , , , ,a,a,a,a,c,c,a,c,c,c, , ,a,a,a,a,a,a, , ,a,d,d,d,d,d,d,d,d,a, ],
63                 [a,a,a,b, , , , ,_, , , ,_,g,a,b, , , , , , , ,_,_,g,a,a,a,a,a,a,a,a,a,a,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,_,_,_,g,a,a,a,b, , , , , , , , , , , , ,g,a,a,a,a,a,d,d,a,a,a,a,a,a,_,_,_,_,_,d,d,d,d,d,d, , , ,a,a,a,a,a,a,a, , , , ,g,a,a,a,a,a,a, , , , ,a,m,m,m,m,a,a,a,m,m,m, , , ,a,a,a,a,a,a,a,a,_,_,a,a,a,a,a,a,a,a,_,_, , ,_,g,a,a,b, , , , , ,a,a,a,a,c,c,a,c,c,c, , ,a,a,a,a,a,a, , ,a,d,d,d,d,d,d,d,d,a, ],
64                 [e,e,e,e,i,_,_,_,_,_,_,_,h,e,e,e,i,_,_,_,_,_,_,_,h,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,e,_,_,_,e,e,e,e,e,_,_,_,_,_,_,_,_,_,_,_,_,e,e,e,e,e,e,e,e,e,e,e,e,e,_, , , , , ,e,e,e,e,e, , , , ,e,e,e,e,e,e,e, , , , ,e,e,e,e,e,e,e, , , , ,e,e,e,e,e,e,e,e,e,e,e, , , ,f,e,e,e,f,f,e,f, , ,e,e,e,e,e,e,e,e,_, , , ,h,e,e,e,e,i, , , , ,e,e,e,e,j,j,e,e,e,e, , ,f,e,e,e,e,e, , ,e, , , , , , , , ,e, ],
65                 [e,e,e,e,e,i,_,_,_,_,_,h,e,e,f,e,e,e,e,i,_,_,_,h,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,e, , , , , , , , , , ,h,e,e,e,e,e,i, , , , , , , ,_,e,e,e,e,_,_,_,_, , ,h,e,i, ,_,e,e,e, , , , , , ,e,e,e,e,e, , , , , , ,e,e,e,e,e,e, , , , ,e,e,e,e,e,e,e,e,e,e,e, , , , , , , , , , , , , , ,e,e,e,e,e,e, , , , ,h,e,e,e,e,e,e,i, , , ,e,e,e,e,j,j,e,f,e,e, , ,e,e,e,e,e,e, , ,e,_,_,_,_,_,_,_,_,e, ],
66                 [e,e,e,e,e,e,_,_,_,_,h,e,e,e,e,e,e,e,e,e,i,_,h,n,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,e, , , , , , , , , ,h,j,e,e,e,e,e,j,i, , , , , , , , , , , , , , , , ,h,e,e,e, , ,_,e, , , , , , , , , , , , , , , , , , , ,e,e,e,e, , , , , ,e,e,e,e,e,e,e,e,e,e,e,l, , , , , , , , , , , , , , , , , , , , , , ,h,e,e,e,e,e,e,e,e,i, , ,e,e,e,e,j,j,e,e,e,e, , ,e,e,e,f,e,e, , ,e,_,_,_,_,_,_,_,_,e, ],
67                 [e,e,f,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,j,e,e,j,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,j,e,e,e,f,e,e,e,e,e,e,i,_,_,h,e,e,e,e,e,e,e,e,e,e,j,j,e,e,e,e,e,i, , , , , , ,h,e,e,e,e,e,e,e,i, , , , , , , , , , , ,_,_, , , , , , , , , , , , , , , , , , ,e,e,e,e,e,e,e,e,e,e,e,j,j,j,j,j,l, , , , , , , , , , , , , , , ,h,e,e,e,e,e,e,e,e,e,e,e,i, ,e,e,e,e,j,j,e,e,e,e, , ,e,f,e,e,e,e, , ,e,e,e,e,e,e,e,e,e,e, ]
68         ];
69 }
70
71 //約束事
72 var stage = new PCDSLStageClass(stgInfo, tbl);
73
74 stage.runStage = function(){
75         PCDSLStageClass.prototype.runStage.apply(this, []);
76         var main = new MainCharacterClass_Hunter(stage);
77         main.size.x = 32;
78         main.size.y=64;
79         main.origin.x = 32;
80         main.origin.y =0;
81         main.collisionMargin.bottom = 0;
82         main.ownerUID = stage.manager.userID;
83         stage.userControlledCharacter = main;
84         
85 var msg1 = new MessageItemClass(stage, ["この看板を読んだあなたは、そろそろ覚悟を決めたほうがいい。\n...なぜかって??\nそれは少し先にすすもうとしてみればわかるよ。\n"]);
86 msg1.origin.x = 3648;
87 msg1.origin.y = 256;
88 stage.addStageObject(msg1);
89
90 var leaf = new BlockClass(stage, ["palm_leaf.png",]);
91
92 leaf.size.x = 140;
93 leaf.size.y = 140;
94 leaf.origin.x = 390;
95 leaf.origin.y =124;
96 leaf.collisionMargin.top = 900;
97 leaf.collisionMargin.right = 0;
98 stage.addStageObject(leaf);
99
100 var leaf1 = new BlockClass(stage, ["palm_leaf.png",]);
101
102 leaf1.size.x = 140;
103 leaf1.size.y = 140;
104 leaf1.origin.x = 1250;
105 leaf1.origin.y =60;
106 leaf1.collisionMargin.top = 900;
107 leaf1.collisionMargin.right = 0;
108 stage.addStageObject(leaf1);
109
110 var leaf2 = new BlockClass(stage, ["palm_leaf.png",]);
111
112 leaf2.size.x = 140;
113 leaf2.size.y = 140;
114 leaf2.origin.x = 1385;
115 leaf2.origin.y =30;
116 leaf2.collisionMargin.top = 900;
117 leaf2.collisionMargin.right = 0;
118 stage.addStageObject(leaf2);
119
120 var cover = new BlockClass(stage, ["1245.png",]);
121
122 cover.size.x = 32;
123 cover.size.y = 32;
124 cover.origin.x = 736;
125 cover.origin.y =416;
126 cover.collisionMargin.top =900;
127
128 stage.addStageObject(cover);
129
130
131
132
133
134
135 var e1 = new EnemyCharacterClass(stage, [["kani3.png","kani2.png","kani1.png","kani2.png",]]);
136         e1.size.x = 40;
137         e1.size.y=  40;
138         e1.origin.x =930;
139         e1.origin.y =0;
140         e1.chasingRange = 300;
141         e1.collisionMargin.top = 20;
142         e1.hurt = 0
143         e1.movingVelocity = 50;
144         e1.touchDamage = 20;
145         stage.addStageObject(e1);
146         
147         var e2 = new EnemyCharacterClass(stage, [["kani3.png","kani2.png","kani1.png","kani2.png",]]);
148         e2.size.x = 40;
149         e2.size.y=  40;
150         e2.origin.x =990;
151         e2.origin.y =0;
152         e2.chasingRange = 300;
153         e2.collisionMargin.top = 20;
154         e2.hurt= 0;
155         e2.movingVelocity = 50;
156         e2.touchDamage = 20;
157         stage.addStageObject(e2);
158         
159         var e3 = new EnemyCharacterClass(stage, [["kani3.png","kani2.png","kani1.png","kani2.png",]]);
160         e3.size.x = 40;
161         e3.size.y=  40;
162         e3.origin.x =1050;
163         e3.origin.y =0;
164         e3.chasingRange = 300;
165         e3.collisionMargin.top = 20;
166         e3.hurt=0;
167         e3.movingVelocity = 50;
168         e3.touchDamage = 20;
169         stage.addStageObject(e3);
170         
171         var e4 = new EnemyCharacterClass(stage, [["kani3.png","kani2.png","kani1.png","kani2.png",]]);
172         e4.size.x = 40;
173         e4.size.y=  40;
174         e4.origin.x =1110;
175         e4.origin.y =0;
176         e4.chasingRange = 300;
177         e4.collisionMargin.top = 20;
178         
179         e4.movingVelocity = 50;
180         e4.touchDamage = 20;
181         e4.hurt = 0;
182         stage.addStageObject(e4);
183         
184         var e5 = new EnemyCharacterClass(stage, [["kani3.png","kani2.png","kani1.png","kani2.png",]]);
185         e5.size.x = 40;
186         e5.size.y=  40;
187         e5.origin.x =1210;
188         e5.origin.y =0;
189         e5.chasingRange = 300;
190         e5.collisionMargin.top = 20;
191         
192         e5.movingVelocity = 50;
193         e5.touchDamage = 20;
194         e5.hurt = 0;
195         stage.addStageObject(e4);
196 },
197
198
199
200 stage;
201