Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
sora
/
sanitary-net
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
13c2b7cf
authored
Mar 25, 2024
by
o.kimura
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
納品時に戻し(TAKUMI)
parent
cf3aac8a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
74 deletions
takumi-style/js/levelMenu.js
takumi-style/js/levelMenu.js
View file @
13c2b7cf
// level select menu
// level select menu
function
levelSelectMenu
(
et
)
{
function
levelSelectMenu
(
et
){
//---init
//---init
var
myObj
=
new
Object
();
var
myObj
=
new
Object
();
...
@@ -10,17 +10,11 @@ function levelSelectMenu(et) {
...
@@ -10,17 +10,11 @@ function levelSelectMenu(et) {
//-------------------------------------------------------------------------------------------------難易度選択のイベントハンドラの設定
//-------------------------------------------------------------------------------------------------難易度選択のイベントハンドラの設定
var
menu_levelSelect
=
document
.
getElementsByClassName
(
"select_level_button"
);
var
menu_levelSelect
=
document
.
getElementsByClassName
(
"select_level_button"
);
Object
.
keys
(
menu_levelSelect
).
forEach
(
function
(
key
)
{
Object
.
keys
(
menu_levelSelect
).
forEach
(
function
(
key
)
{
menu_levelSelect
[
key
].
addEventListener
(
eventClick
,
levelSelectFunc
,
{
menu_levelSelect
[
key
].
addEventListener
(
eventClick
,
levelSelectFunc
,
{
passive
:
true
});
passive
:
true
menu_levelSelect
[
key
].
addEventListener
(
eventMouseDown
,
function
(){
androidConnect
?
alert
(
"playSE#click"
):
console
.
log
(
"playSE#click"
)},
{
passive
:
true
});
//-----click音
});
});
menu_levelSelect
[
key
].
addEventListener
(
eventMouseDown
,
function
()
{
function
levelSelectFunc
(
e
){
//---------------------------------------------------------------------難易度選択処理(private)
},
{
passive
:
true
});
//-----click音
});
function
levelSelectFunc
(
e
)
{
//---------------------------------------------------------------------難易度選択処理(private)
var
newLevel
=
this
.
id
.
split
(
"_"
)[
1
];
var
newLevel
=
this
.
id
.
split
(
"_"
)[
1
];
if
(
selectLevel
==
newLevel
)
return
;
if
(
selectLevel
==
newLevel
)
return
;
...
@@ -38,39 +32,22 @@ function levelSelectMenu(et) {
...
@@ -38,39 +32,22 @@ function levelSelectMenu(et) {
}
}
//-------------------------------------------------------------------------------------------------TOPに戻るボタンのイベントハンドラの設定
//-------------------------------------------------------------------------------------------------TOPに戻るボタンのイベントハンドラの設定
var
menu_top
=
document
.
getElementById
(
"button_return"
);
var
menu_top
=
document
.
getElementById
(
"button_return"
);
menu_top
.
addEventListener
(
eventMouseDown
,
function
()
{
menu_top
.
addEventListener
(
eventMouseDown
,
function
(){
androidConnect
?
alert
(
"playSE#click"
):
console
.
log
(
"playSE#click"
)},
{
passive
:
true
});
//-----click音
},
{
menu_top
.
addEventListener
(
eventClick
,
goTopFunc
,
{
passive
:
true
});
passive
:
true
});
//-----click音
menu_top
.
addEventListener
(
eventClick
,
goTopFunc
,
{
passive
:
true
});
//-------------------------------------------------------------------------------------------------戻るボタンのイベントハンドラの設定
//-------------------------------------------------------------------------------------------------戻るボタンのイベントハンドラの設定
var
menu_return
=
document
.
getElementsByClassName
(
"select_return_button"
);
var
menu_return
=
document
.
getElementsByClassName
(
"select_return_button"
);
Object
.
keys
(
menu_levelSelect
).
forEach
(
function
(
key
)
{
Object
.
keys
(
menu_levelSelect
).
forEach
(
function
(
key
)
{
menu_return
[
key
].
addEventListener
(
eventClick
,
returnFunc
,
{
menu_return
[
key
].
addEventListener
(
eventClick
,
returnFunc
,
{
passive
:
true
});
passive
:
true
menu_return
[
key
].
addEventListener
(
eventMouseDown
,
function
(){
androidConnect
?
alert
(
"playSE#click"
):
console
.
log
(
"playSE#click"
)},
{
passive
:
true
});
//-----click音
});
});
menu_return
[
key
].
addEventListener
(
eventMouseDown
,
function
()
{
function
returnFunc
(
e
){
//--------------------------------------------------------------------------戻る処理(private)
},
{
passive
:
true
});
//-----click音
});
function
returnFunc
(
e
)
{
//--------------------------------------------------------------------------戻る処理(private)
var
newLevel
=
0
;
var
newLevel
=
0
;
if
(
selectLevel
==
newLevel
)
return
;
if
(
selectLevel
==
newLevel
)
return
;
//---- top button
//---- top button
menu_top
.
classList
.
remove
(
"vanish"
);
menu_top
.
classList
.
remove
(
"vanish"
);
anime
({
anime
({
targets
:
"#button_return"
,
opacity
:[
0
,
1
],
easing
:
"easeOutSine"
,
delay
:
500
,
duration
:
500
});
//------ anime
targets
:
"#button_return"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
delay
:
500
,
duration
:
500
});
//------ anime
//----fukidashi
//----fukidashi
doctorObj
.
dispFuki
(
"fuki_text_select.png"
);
doctorObj
.
dispFuki
(
"fuki_text_select.png"
);
...
@@ -84,40 +61,27 @@ function levelSelectMenu(et) {
...
@@ -84,40 +61,27 @@ function levelSelectMenu(et) {
//-------------------------------------------------------------------------------------------------箱のイベントハンドラの設定
//-------------------------------------------------------------------------------------------------箱のイベントハンドラの設定
var
menu_quizSelect
=
document
.
getElementsByClassName
(
"select_content_button"
);
var
menu_quizSelect
=
document
.
getElementsByClassName
(
"select_content_button"
);
Object
.
keys
(
menu_quizSelect
).
forEach
(
function
(
key
)
{
Object
.
keys
(
menu_quizSelect
).
forEach
(
function
(
key
){
menu_quizSelect
[
key
].
addEventListener
(
eventClick
,
quizSelectFunc
,
{
menu_quizSelect
[
key
].
addEventListener
(
eventClick
,
quizSelectFunc
,
{
passive
:
true
});
passive
:
true
menu_quizSelect
[
key
].
addEventListener
(
eventMouseDown
,
function
(){
androidConnect
?
alert
(
"playSE#click"
):
console
.
log
(
"playSE#click"
)},
{
passive
:
true
});
//-----click音
});
menu_quizSelect
[
key
].
addEventListener
(
eventMouseDown
,
function
()
{
},
{
passive
:
true
});
//-----click音
});
});
function
quizSelectFunc
(
e
){
//---------------------------------------------------------------------箱をタップしたので開始(private)
function
quizSelectFunc
(
e
)
{
//---------------------------------------------------------------------箱をタップしたので開始(private)
var
lv
=
this
.
id
.
split
(
"_"
)[
1
];
//---1:初級、2:中級、3:上級、4:博士級
var
lv
=
this
.
id
.
split
(
"_"
)[
1
];
//---1:初級、2:中級、3:上級、4:博士級
var
clr
=
this
.
id
.
split
(
"_"
)[
2
];
//---色は数値はリンクしていない、htmlのidによる。
var
clr
=
this
.
id
.
split
(
"_"
)[
2
];
//---色は数値はリンクしていない、htmlのidによる。
goQuizFunc
(
lv
,
clr
);
goQuizFunc
(
lv
,
clr
);
takumiObj
.
hideFuki
();
takumiObj
.
hideFuki
();
doctorObj
.
setSmallFuki
();
doctorObj
.
setSmallFuki
();
}
}
function
goQuizFunc
(
lv
,
clr
){
//--------------------------------------------------------------------- プレートを隠してクイズへ移行
function
goQuizFunc
(
lv
,
clr
)
{
//--------------------------------------------------------------------- プレートを隠してクイズへ移行
anime
({
targets
:
"#select_plate"
,
marginTop
:
"-120%"
,
duration
:
300
,
easing
:
"easeOutQuad"
,
complete
:
function
(){
anime
({
targets
:
"#select_plate"
,
marginTop
:
"-120%"
,
duration
:
300
,
easing
:
"easeOutQuad"
,
complete
:
function
()
{
levelPlate
.
classList
.
add
(
"vanish"
);
levelPlate
.
classList
.
add
(
"vanish"
);
quizMaster
.
initFunc
(
lv
,
clr
);
quizMaster
.
initFunc
(
lv
,
clr
);
}
}});
//------ anime
});
//------ anime
document
.
getElementById
(
"button_return"
).
classList
.
add
(
"vanish"
);
document
.
getElementById
(
"button_return"
).
classList
.
add
(
"vanish"
);
}
}
//------------------------------------------------------------------------------------------------ プレートを隠してTOPに戻る
//------------------------------------------------------------------------------------------------ プレートを隠してTOPに戻る
function
goTopFunc
()
{
function
goTopFunc
()
{
doctorObj
.
directHide
();
doctorObj
.
directHide
();
takumiObj
.
directHide
();
takumiObj
.
directHide
();
levelPlate
.
classList
.
add
(
"vanish"
);
levelPlate
.
classList
.
add
(
"vanish"
);
...
@@ -134,8 +98,8 @@ function levelSelectMenu(et) {
...
@@ -134,8 +98,8 @@ function levelSelectMenu(et) {
*/
*/
}
}
myObj
.
dispFunc
=
function
()
{
//--------------------------------------------------------------------- プレートを表示します
myObj
.
dispFunc
=
function
(){
//--------------------------------------------------------------------- プレートを表示します
if
(
selectLevel
!=
0
)
{
//----再選択で戻ってきたときのための処理
if
(
selectLevel
!=
0
){
//----再選択で戻ってきたときのための処理
document
.
getElementById
(
"select_content-"
+
selectLevel
).
classList
.
remove
(
"selected"
);
document
.
getElementById
(
"select_content-"
+
selectLevel
).
classList
.
remove
(
"selected"
);
document
.
getElementById
(
"select_content-"
+
0
).
classList
.
add
(
"selected"
);
document
.
getElementById
(
"select_content-"
+
0
).
classList
.
add
(
"selected"
);
selectLevel
=
0
;
selectLevel
=
0
;
...
@@ -144,20 +108,11 @@ function levelSelectMenu(et) {
...
@@ -144,20 +108,11 @@ function levelSelectMenu(et) {
doctorObj
.
dispFunc
(
"fuki_text_select.png"
);
doctorObj
.
dispFunc
(
"fuki_text_select.png"
);
takumiObj
.
dispFunc
();
takumiObj
.
dispFunc
();
levelPlate
.
classList
.
remove
(
"vanish"
);
levelPlate
.
classList
.
remove
(
"vanish"
);
anime
({
androidConnect
?
alert
(
"setBgm#select"
):
console
.
log
(
"setBgm#select"
);
//----- sound : bgm (select)
targets
:
"#select_plate"
,
anime
({
targets
:
"#select_plate"
,
marginTop
:[
"-100%"
,
"-10%"
],
duration
:
1000
});
//------ anime
marginTop
:
[
"-100%"
,
"-10%"
],
duration
:
1000
});
//------ anime
menu_top
.
classList
.
remove
(
"vanish"
);
menu_top
.
classList
.
remove
(
"vanish"
);
anime
({
anime
({
targets
:
"#button_return"
,
opacity
:[
0
,
1
],
easing
:
"easeOutSine"
,
delay
:
1200
,
duration
:
500
});
//------ anime
targets
:
"#button_return"
,
opacity
:
[
0
,
1
],
easing
:
"easeOutSine"
,
delay
:
1200
,
duration
:
500
});
//------ anime
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment