Skip to content

Home > @esengine/ecs-framework-monorepo > IntervalSystem

IntervalSystem class

间隔系统抽象类 定义一个按时间间隔处理的抽象类,继承自EntitySystem类 子类需要实现process方法,用于实现具体的处理逻辑

Signature:

typescript
export declare abstract class IntervalSystem extends EntitySystem

Extends: EntitySystem

Constructors

Constructor

Modifiers

Description

(constructor)(interval, matcher)

构造函数,初始化时间间隔

Methods

Method

Modifiers

Description

getIntervalDelta()

protected

获取本系统上次处理后的实际delta值 实际delta值等于时间间隔加上时间间隔余数

onCheckProcessing()

protected

判断是否需要进行处理 如果需要进行处理,则更新累积增量和时间间隔余数,返回true 否则返回false

基于 MIT 许可证发布