feat: Add isDestroy methods
This commit is contained in:
Vendored
+8
@@ -1123,6 +1123,11 @@ type PacketData = (
|
||||
|
||||
/** 二进制流数据包类 */
|
||||
declare class GMLIB_BinaryStream {
|
||||
/** 数据包ID */
|
||||
#id: number;
|
||||
/** 数据包是否被销毁 */
|
||||
#destroy: boolean;
|
||||
|
||||
constructor(
|
||||
/** 数据包数据 */
|
||||
data: PacketData[]?
|
||||
@@ -1161,6 +1166,9 @@ declare class GMLIB_BinaryStream {
|
||||
/** 销毁数据包 */
|
||||
destroy(): GMLIB_BinaryStream;
|
||||
|
||||
/** 数据包是否已被销毁 */
|
||||
isDestroy(): boolean;
|
||||
|
||||
/** 重置数据包 */
|
||||
reset(): GMLIB_BinaryStream;
|
||||
|
||||
|
||||
+9
-1
@@ -2111,7 +2111,7 @@ class GMLIB_BinaryStream {
|
||||
|
||||
/** 数据包ID @type {number} */
|
||||
#id = null;
|
||||
/** 数据包是否被销毁 */
|
||||
/** 数据包是否被销毁 @type {boolean} */
|
||||
#destroy = false;
|
||||
|
||||
/**
|
||||
@@ -2185,6 +2185,14 @@ class GMLIB_BinaryStream {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据包是否已被销毁
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isDestroy() {
|
||||
return this.#destroy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据包
|
||||
* @returns {GMLIB_BinaryStream}
|
||||
|
||||
Reference in New Issue
Block a user