The keyframes of the animation. @zh_param keyframes 动画的关键帧。
OptionalplaybackInfo: Partial<GameAnimationPlaybackConfig>Playback information for the animation. @zh_param playbackInfo 动画的播放信息。
The animation instance. @zh_returns 动画实例。
An array of animation instances. @zh_returns 动画实例数组。
The message to say. @zh_param message 要说的信息。
Optionaloptions: Partial<{ duration: number; hideFloat: boolean }>Options for saying the message. @zh_param options 说话的选项。
The amount of damage to inflict. @zh_param amount 伤害量。
Optionaloptions: Partial<GameHurtOptions>Options for the damage. @zh_param options 伤害选项。
启用交互
The position to look at. @zh_param targetPosition 要朝向的位置。
OptionalfacingDirection: "X" | "Y" | "Z"The direction that should face the target. @zh_param facingDirection 应朝向目标的方向。
Optionalup: GameVector3The up vector. @zh_param up 上方向向量。
A 3D vector containing x, y, z coordinates, representing the position to rotate around. @zh_param localPosition 一个包含x、y、z坐标的三维向量,表示待旋转的位置。
A string specifying the rotation axis, can be 'X', 'Y', or 'Z'. @zh_param axis 一个字符串,指定旋转轴可以是'X'、'Y'或'Z'。
The angle of rotation in radians. @zh_param rad 旋转的角度,以弧度为单位。
The position vector in the local coordinate system, representing the point to scale around. @zh_param localPosition 本地坐标系中的位置向量,表示待缩放的点。
The scaling vector, representing the scaling factors on the x, y, and z axes. @zh_param v 缩放向量,表示在x、y、z轴上的缩放因子。
粒子加速度/重力力矢量 单位是方块/(滴答^2)
粒子噪声幅度。影响粒子运动
粒子噪声频率。增加噪声偏置的运动速率
粒子目标实体
粒子目标权重
ReadonlycontactReadonlyentityReadonlyfluidReadonlyvoxelReadonlyis已废弃。请直接使用 if (entity.player) 进行玩家实体存在性检查,这能让TypeScript自动推断出 GameEntity.player 在该代码块中是已定义的 GamePlayer 类型,从而提高类型安全性。
Deprecated. Please use if (entity.player) directly to check for player entity existence. This allows TypeScript to automatically infer that GameEntity.player is a defined GamePlayer type within that code block, improving type safety.
The tag to add. @zh_param tag 要添加的标签。
The tag to test for. @zh_param tag 要测试的标签。
@zh_returns 如果实体有该标签则返回 true,否则返回 false。 @en_returns True if the entity has the tag, otherwise false.
The tag to remove. @zh_param tag 要移除的标签。
The sound specification. This can be an audio asset string, an empty string to stop the sound, or a configuration object with the following properties:
sample: The audio asset (GameAudioAssets | '').radius: The sound radius (optional).pitch: The pitch (optional).gain: The gain (optional).
@zh_param spec 音效规格。可以是一个音频资源字符串,一个用于停止音效的空字符串,或一个包含以下属性的配置对象:sample: 音频资源 (GameAudioAssets | '')。radius: 音效半径(可选)。pitch: 音调(可选)。gain: 音量(可选)。The sound instance. @zh_returns 音效实例。
Zh
实体是游戏中的游戏对象,可以用来表示玩家、物体等。
En
An entity is a game object in the game, which can be used to represent players, objects, etc.