This commit is contained in:
2025-08-27 08:45:37 +08:00
parent f3d0cbd222
commit 0d0465fad3
20 changed files with 2263 additions and 330 deletions

View File

@@ -12,7 +12,7 @@ class AncientheroLuckyBoxC extends LenheartNewUI_Windows {
// NoWindow = true;
//是否可见
// Visible = false;
Visible = false;
Img = null;
@@ -319,70 +319,6 @@ getroottable().rawdelete("EventList_Obj")
getroottable().rawdelete("AncientheroLuckyBox_Obj");
//任务队列
class QuestQueue {
//队列
Queue = null;
constructor() {
Queue = {};
}
//添加任务
function AddQuest(QuestName, QuestLogic, ...) {
local args = null;
if (vargc > 0) {
args = [];
for (local i = 0; i< vargc; i++) {
args.append(vargv[i]);
}
}
Queue[QuestName] <- {
Logic = QuestLogic,
InseartTime = Clock(),
arg = args
};
}
//移除任务
function RemoveQuest(QuestName) {
if (Queue) {
Queue.rawdelete(QuestName);
}
}
//执行任务
function Run() {
if (Queue) {
local NowTime = Clock();
foreach(QuestName, QuestInfo in Queue) {
if (QuestInfo.arg && QuestInfo.arg.len() > 0) {
local Arr = [];
Arr.append(getroottable());
Arr.append(QuestName);
Arr.append(NowTime);
foreach(value in QuestInfo.arg) {
Arr.append(value);
}
QuestInfo.Logic.acall(Arr);
// QuestInfo.Logic(QuestName, NowTime - QuestInfo.InseartTime, QuestInfo.arg);
} else QuestInfo.Logic(QuestName, NowTime - QuestInfo.InseartTime);
}
}
}
//示例
/*
Obj.AddQuest("测试任务",function (Name,Time)
{
print(Time);
if(Time >= 2000)Obj.RemoveQuest(Name);
}.bindenv(this));
*/
}
class AncientheroLuckyBoxC_Box extends Rindro_BaseToolClass {
//父对象

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB