princess-synergy/www/js/plugins/JsScript118Set.js
2026-02-05 14:03:22 -06:00

181 lines
6.6 KiB
JavaScript

/* 目次--------------------------------
■Hステート画面
■Data画面
■Record画面
■Search画面
■Memory
*/
var useHStData = null;
let GetHStData = function () {
return new HStData($Nupu_PSData.hStData);
}
class HStData {
constructor(setData) {
this.View_Rank = [];
for (let i = 0; i < setData.KutiRankDatas.length; i++) {
this.View_Rank.push(new HStRankData(1,setData.KutiRankDatas[i]));
}
for (let i = 0; i < setData.MuneRankDatas.length; i++) {
this.View_Rank.push(new HStRankData(2,setData.MuneRankDatas[i]));
}
for (let i = 0; i < setData.SiriRankDatas.length; i++) {
this.View_Rank.push(new HStRankData(3,setData.SiriRankDatas[i]));
}
for (let i = 0; i < setData.TituRankDatas.length; i++) {
this.View_Rank.push(new HStRankData(4,setData.TituRankDatas[i]));
}
}
}
class HStRankData {
constructor(_No , setData) {
this.No = _No;
this.rank = setData.rank;
this.rankText1 = setData.rankText1;
this.rankText2 = setData.rankText2;
this.rankSetu = setData.rankSetu;
}
}
class HRankText {
constructor(_No, _Rank, _Text1, _Text2, _STxtArr) {
this._No = _No;
this._Rank = _Rank;
this._Text1 = _Text1;
this._Text2 = _Text2;
this._STxtArr = _STxtArr;
}
}
Game_Interpreter.prototype.Menu_H_BaseUpdate = function () {
if (MenuFlame == 0) {
MeneExitOkFlg = false;
this.Menu_H_StartUp();
}
if (MenuFlame > 11) {
MeneExitOkFlg = true;
this.Menu_H_Update();
}
if (Memory_EndFlg) {
this.Menu_H_StartUp();
Menu_Memory_Mode = 0;
Menu_H_ClickNo = 3;
Fade_ZureX = 0;
L2dFadeMdl("romasha_talk", "rightin", 20, "talk");
this.Menu_H_MemoryView(true);
this.Menu_H_MemoryView(true);
Memory_EndFlg = false;
}
}
Game_Interpreter.prototype.Menu_H_StartUp = function () {
this.DelSpriteArr([PNo_RockKey, PNo_RockKey + 1, PNo_RockKey + 2]);
Menu_H_ClickNo = 0;
ViewSpriteArr_Reset();
this.SetSprite(PN_HBase, Menu_H_UIPath + "s_back", 0, 0, 0);
this.MoveSprite(PN_HBase, true, true, 5, 255, true, true);
this.SetSprite(PN_HBtn + 0, Menu_H_UIPath + "s_btn_Data_b", 0, 170 + (67 * 0), 0);
this.SetSprite(PN_HBtn + 1, Menu_H_UIPath + "s_btn_Record", -20, 170 + (67 * 1), 0);
this.SetSprite(PN_HBtn + 2, Menu_H_UIPath + "s_btn_Search", -20, 170 + (67 * 2), 0);
this.SetSprite(PN_HBtn + 3, Menu_H_UIPath + "s_btn_Memory", -20, 170 + (67 * 3), 0);
this.SetSprite(PN_HBtn + 4, Menu_H_UIPath + "s_btn_Close", -20, 170 + (67 * 7) + 30, 0);
if (!Memory_EndFlg) {
this.Menu_H_DataView(true);
} else {
this.SetSprite(PN_HBtn + 0, Menu_H_UIPath + "s_btn_Data", -20, 170 + (67 * 0), 0);
this.SetSprite(PN_HBtn + 3, Menu_H_UIPath + "s_btn_Memory_b", 0, 170 + (67 * 3), 0);
}
for (let _i = 0; _i <= 5 - 1; _i++) {
let _sTimer = 10 + (7 * _i);
this.MoveSprite(PN_HBtn + _i, true, true, _sTimer, 255, true, true);
}
}
let Menu_H_ClickNo = 0;
Game_Interpreter.prototype.Menu_H_Update = function () {
if ((Input.isTriggered('menu') || TouchInput.isCancelled()) &&
Menu_EditLayer == 1) {
L2dFadeMdl("romasha_talk", "rightin", 10, "", null, null, 0, 0);
this.SetCmnEventSc(CN_RomashaMotion);
this.Layer1_DelTopTop();
this.H_CloseBtn();
if (_Menu_FstHstFlg) {
_Menu_FstHstFlg = false;
}
}
this.Menu_H_MouceUpdate();
}
Game_Interpreter.prototype.Menu_H_MouceUpdate = function () {
let ckPicArr = [];
for (let _i = 0; _i <= 7; _i++) {
ckPicArr.push(PN_HBtn + _i);
this.SpriteCngColor(PN_HBtn + _i);
}
let overPicNo = overPointerSpCkArr(ckPicArr);
if (overPicNo != -1 && (PN_HBtn + Menu_H_ClickNo) != overPicNo && MenuCngOkFlg) {
this.SpriteCngColor(overPicNo, [100, 100, 100, 0]);
if (TouchInput.isTriggered()) {
SoundManager.playOk();
Menu_H_ClickNo = overPicNo - PN_HBtn;
this.Layer1_DelTopTop();
Menu_EditLayer = 1;
switch (Menu_H_ClickNo) {
case 0:
this.Menu_H_DataView(true);
break;
case 1:
Fade_ZureX = 0;
L2dFadeMdl("romasha_talk", "rightin", 20);
this.Menu_H_RecordView(true);
break;
case 2:
Fade_ZureX = 0;
this.Menu_H_SearchView(true);
L2dFadeMdl("romasha_talk", "rightin", 20);
break;
case 3:
Fade_ZureX = 0;
L2dFadeMdl("romasha_talk", "rightin", 20);
this.Menu_H_MemoryView(true);
break;
case 4:
this.H_CloseBtn();
break;
}
this.SetCmnEventSc(CN_RomashaMotion);
if (Menu_H_ClickNo != 4) this.H_BtnView();
}
}
switch (Menu_H_ClickNo) {
case 0:
this.Menu_H_DataUpdate();
break;
case 1:
this.Menu_H_RecordUpdate();
break;
case 2:
this.Menu_H_SearchUpdate();
break;
case 3:
this.MemoryUpdate();
break;
}
}
Game_Interpreter.prototype.H_BtnView = function () {
this.SetSprite(PN_HBtn + 0, Menu_H_UIPath + "s_btn_Data", -20, 170 + (67 * 0));
this.SetSprite(PN_HBtn + 1, Menu_H_UIPath + "s_btn_Record", -20, 170 + (67 * 1));
this.SetSprite(PN_HBtn + 2, Menu_H_UIPath + "s_btn_Search", -20, 170 + (67 * 2));
this.SetSprite(PN_HBtn + 3, Menu_H_UIPath + "s_btn_Memory", -20, 170 + (67 * 3));
let setPicPath = GetSpriteData(PN_HBtn + Menu_H_ClickNo)._name + "_b";
this.CngSprite(PN_HBtn + Menu_H_ClickNo, Menu_H_UIPath + setPicPath);
this.MoveSprite(PN_HBtn + Menu_H_ClickNo, 0, 170 + (67 * Menu_H_ClickNo), 5);
}
Game_Interpreter.prototype.H_CloseBtn = function () {
this.H_MenuEnd();
this.MenuMainReset();
}
Game_Interpreter.prototype.H_MenuEnd = function () {
L2dFadeMdl("romasha_talk", "rightin", 10, "");
}
Game_Interpreter.prototype.Layer1_DelTopTop = function (picNo) {
picNo = typeof picNo !== 'undefined' ? picNo : 135;
for (let i = picNo; i <= 250; i++) {
this.DelPict(i)
this.DelSprite(i)
}
}