111
This commit is contained in:
@@ -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 {
|
||||
|
||||
//父对象
|
||||
|
||||
BIN
Project/AncientheroLuckyBox/img/0.png
Normal file
BIN
Project/AncientheroLuckyBox/img/0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 471 KiB |
BIN
Project/AncientheroLuckyBox/img/1.png
Normal file
BIN
Project/AncientheroLuckyBox/img/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 664 KiB |
BIN
Project/AncientheroLuckyBox/img/2.png
Normal file
BIN
Project/AncientheroLuckyBox/img/2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 488 KiB |
Reference in New Issue
Block a user