添加核心库基础类的 判断是否执行Update函数判断

This commit is contained in:
Lenheart 2024-12-16 20:31:05 +08:00
parent 301b51b5d3
commit 7b53180344
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,8 @@ class CL_BaseObject {
Var = null;
//销毁状态
DestroyFlag = false;
//不需要Update函数
NoUpdate = false;
constructor(C_Object, ...) {
Children = {};
@ -36,6 +38,7 @@ class CL_BaseObject {
//被调用
function OnUpdate(dt) {
if (NoUpdate) return;
ExistingTime += dt;
//如果CallBack函数存在则调用