元编程参考文档

实时应用

78 个节点

本页内容 78

实时应用

函数

此节点没有文档说明。

签名
实时应用() -> Realtime Application
RealtimeApplication RealtimeApplication()

返回

实时应用Realtime Application
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

清屏

函数

此节点没有文档说明。

签名
清屏(Realtime Application: Realtime Application, 背景: 可选颜色)
void Clear(
    RealtimeApplication Realtime Application,
    ColorElement? background)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
背景可选颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

关闭麦克风

函数

此节点没有文档说明。

签名
关闭麦克风
    Realtime Application: Realtime Application
    麦克风: 任意
void CloseMicrophone(
    RealtimeApplication Realtime Application,
    object microphone)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
麦克风任意—From Open Microphone.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制圆弧

函数

此节点没有文档说明。

重载 1/2

签名
绘制圆弧
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    半径: 数字
    起始角度: 数字
    结束角度: 数字
    轮廓粗细: 数字
    轮廓颜色: 可选颜色
void DrawArc(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double radius,
    double startAngle,
    double endAngle,
    double outlineThickness,
    ColorElement? outlineColor)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—
Y数字—
半径数字—
起始角度数字—
结束角度数字—
轮廓粗细数字—
轮廓颜色可选颜色—

重载 2/2

签名
绘制圆弧
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    宽度: 数字
    高度: 数字
    起始角度: 数字
    结束角度: 数字
    轮廓粗细: 数字
    轮廓颜色: 可选颜色
void DrawArc(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double width,
    double height,
    double startAngle,
    double endAngle,
    double outlineThickness,
    ColorElement? outlineColor)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—
Y数字—
宽度数字—
高度数字—
起始角度数字—
结束角度数字—
轮廓粗细数字—
轮廓颜色可选颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制圆

函数

此节点没有文档说明。

签名
绘制圆
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    半径: 数字
    轮廓粗细: 数字
    填充颜色: 可选颜色
    轮廓颜色: 可选颜色
    居中: 真否
void DrawCircle(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double radius,
    double outlineThickness,
    ColorElement? fillColor,
    ColorElement? outlineColor,
    bool centered)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—
Y数字—
半径数字—
轮廓粗细数字—
填充颜色可选颜色—
轮廓颜色可选颜色—
居中真否—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制椭圆

函数

此节点没有文档说明。

签名
绘制椭圆
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    宽度: 数字
    高度: 数字
    旋转: 数字
    轮廓粗细: 数字
    填充颜色: 可选颜色
    轮廓颜色: 可选颜色
void DrawEllipse(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double width,
    double height,
    double rotation,
    double outlineThickness,
    ColorElement? fillColor,
    ColorElement? outlineColor)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—
Y数字—
宽度数字—
高度数字—
旋转数字—
轮廓粗细数字—
填充颜色可选颜色—
轮廓颜色可选颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制渐变

函数

A rectangle shaded smoothly from one colour to another, top to bottom or left to right: a sky, a fade, a highlight.

签名
绘制渐变
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    宽度: 数字
    高度: 数字
    起始颜色: 颜色
    结束颜色: 颜色
    竖直: 真否
void DrawGradient(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double width,
    double height,
    ColorElement from,
    ColorElement to,
    bool vertical = true)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—Left edge.
Y数字—Top edge.
宽度数字—Width.
高度数字—Height.
起始颜色颜色—The colour at the top, or the left.
结束颜色颜色—The colour at the bottom, or the right.
竖直真否TrueTop to bottom; left to right when false.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制图像

函数

此节点没有文档说明。

重载 1/2

签名
绘制图像
    Realtime Application: Realtime Application
    路径: 文本
    位置: Vector 2D
void DrawImage(
    RealtimeApplication Realtime Application,
    string path,
    Vector2D location)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
路径文本—
位置Vector 2D—

重载 2/2

签名
绘制图像
    Realtime Application: Realtime Application
    图像: Pixel Image
    位置: Vector 2D
void DrawImage(
    RealtimeApplication Realtime Application,
    PixelImage image,
    Vector2D location)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
图像Pixel Image—
位置Vector 2D—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制直线

函数

此节点没有文档说明。

签名
绘制直线
    Realtime Application: Realtime Application
    X1: 数字
    Y1: 数字
    X2: 数字
    Y2: 数字
    轮廓粗细: 数字
    轮廓颜色: 可选颜色
void DrawLine(
    RealtimeApplication Realtime Application,
    double x1,
    double y1,
    double x2,
    double y2,
    double outlineThickness,
    ColorElement? outlineColor)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X1数字—
Y1数字—
X2数字—
Y2数字—
轮廓粗细数字—
轮廓颜色可选颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制多边形

函数

此节点没有文档说明。

签名
绘制多边形
    Realtime Application: Realtime Application
    点: Vector 2D 数组
    轮廓粗细: 数字
    填充颜色: 可选颜色
    轮廓颜色: 可选颜色
void DrawPolygon(
    RealtimeApplication Realtime Application,
    Vector2D[] points,
    double outlineThickness,
    ColorElement? fillColor,
    ColorElement? outlineColor)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
点Vector 2D 数组—
轮廓粗细数字—
填充颜色可选颜色—
轮廓颜色可选颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制折线

函数

A line through several points, joined smoothly: a path traced between two tiles, a trail behind a comet, a graph.

签名
绘制折线
    Realtime Application: Realtime Application
    点: Vector 2D 数组
    粗细: 数字
    颜色: 颜色
    圆角: 真否
void DrawPolyline(
    RealtimeApplication Realtime Application,
    Vector2D[] points,
    double thickness,
    ColorElement color,
    bool rounded = true)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
点Vector 2D 数组—The points, in order; at least two.
粗细数字—Pixels across.
颜色颜色—Its colour, transparency included.
圆角真否TrueRound ends and corners; square ones when false.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制四边形

函数

此节点没有文档说明。

签名
绘制四边形
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    宽度: 数字
    高度: 数字
    角度: 数字
    旋转: 数字
    轮廓粗细: 数字
    填充颜色: 可选颜色
    轮廓颜色: 可选颜色
void DrawQuad(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double width,
    double height,
    double angle,
    double rotation,
    double outlineThickness,
    ColorElement? fillColor,
    ColorElement? outlineColor)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—
Y数字—
宽度数字—
高度数字—
角度数字—
旋转数字—
轮廓粗细数字—
填充颜色可选颜色—
轮廓颜色可选颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制矩形

函数

此节点没有文档说明。

签名
绘制矩形
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    宽度: 数字
    高度: 数字
    轮廓粗细: 数字
    填充颜色: 可选颜色
    轮廓颜色: 可选颜色
    居中: 真否
void DrawRectangle(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double width,
    double height,
    double outlineThickness,
    ColorElement? fillColor,
    ColorElement? outlineColor,
    bool centered)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—
Y数字—
宽度数字—
高度数字—
轮廓粗细数字—
填充颜色可选颜色—
轮廓颜色可选颜色—
居中真否—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制圆角矩形

函数

A rectangle with rounded corners: a button, a panel, a card.

签名
绘制圆角矩形
    Realtime Application: Realtime Application
    X: 数字
    Y: 数字
    宽度: 数字
    高度: 数字
    圆角半径: 数字
    轮廓粗细: 数字
    填充颜色: 可选颜色
    轮廓颜色: 可选颜色
void DrawRoundedRectangle(
    RealtimeApplication Realtime Application,
    double x,
    double y,
    double width,
    double height,
    double radius,
    double outlineThickness,
    ColorElement? fillColor,
    ColorElement? outlineColor)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
X数字—Left edge.
Y数字—Top edge.
宽度数字—Width.
高度数字—Height.
圆角半径数字—The corners' radius; no more than half the shorter side.
轮廓粗细数字—The outline's width; 0 for none.
填充颜色可选颜色—The inside; none when not given.
轮廓颜色可选颜色—The outline; none when not given.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制精灵

函数

重载 1/5

签名
绘制精灵
    Realtime Application: Realtime Application
    路径: 文本
    位置: Vector 2D
    源起始位置: Vector 2D
    大小: Vector 2D
void DrawSprite(
    RealtimeApplication Realtime Application,
    string path,
    Vector2D location,
    Vector2D sourceStart,
    Vector2D size)

此节点没有文档说明。

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
路径文本—
位置Vector 2D—
源起始位置Vector 2D—
大小Vector 2D—

重载 2/5

签名
绘制精灵
    Realtime Application: Realtime Application
    图像: Pixel Image
    位置: Vector 2D
    源起始位置: Vector 2D
    大小: Vector 2D
void DrawSprite(
    RealtimeApplication Realtime Application,
    PixelImage image,
    Vector2D location,
    Vector2D sourceStart,
    Vector2D size)

此节点没有文档说明。

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
图像Pixel Image—
位置Vector 2D—
源起始位置Vector 2D—
大小Vector 2D—

重载 3/5

签名
绘制精灵
    Realtime Application: Realtime Application
    精灵: GlazeSprite
    位置: Vector 2D
void DrawSprite(
    RealtimeApplication Realtime Application,
    GlazeSprite sprite,
    Vector2D location)

此节点没有文档说明。

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
精灵GlazeSprite—
位置Vector 2D—

重载 4/5

签名
绘制精灵
    Realtime Application: Realtime Application
    精灵: GlazeSprite
    位置: Vector 2D
    旋转: 数字
    缩放: 数字
    着色: 颜色
    混合: Sprite Blend
void DrawSprite(
    RealtimeApplication Realtime Application,
    GlazeSprite sprite,
    Vector2D location,
    double rotation,
    double scale,
    ColorElement tint,
    SpriteBlend blend = SpriteBlend.Normal)

A sprite tinted, faded, scaled and turned, and blended as light or shadow: a glowing tile, a coloured spark, a sprite fading out.

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
精灵GlazeSprite—The sprite.
位置Vector 2D—Where; its centre if it was made centred, its corner otherwise.
旋转数字—Degrees, clockwise.
缩放数字—How much larger than the sprite's own scale; 1 as it is.
着色颜色—Each pixel multiplied by this colour, its transparency included: white leaves it as it is, white at half alpha fades it to half.
混合Sprite Blend正常How it combines with what is beneath.

重载 5/5

签名
绘制精灵
    Realtime Application: Realtime Application
    精灵: GlazeSprite
    位置: Vector 2D
    旋转: 数字
void DrawSprite(
    RealtimeApplication Realtime Application,
    GlazeSprite sprite,
    Vector2D location,
    double rotation)

此节点没有文档说明。

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
精灵GlazeSprite—
位置Vector 2D—
旋转数字—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制文字

函数

此节点没有文档说明。

重载 1/3

签名
绘制文字
    Realtime Application: Realtime Application
    文本: 文本
    字体名称: 文本
    大小: 整数
    位置: Vector 2D
    颜色: 颜色
void DrawText(
    RealtimeApplication Realtime Application,
    string text,
    string fontName,
    int size,
    Vector2D location,
    ColorElement color)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
文本文本—
字体名称文本—
大小整数—
位置Vector 2D—
颜色颜色—

重载 2/3

签名
绘制文字
    Realtime Application: Realtime Application
    文本: 文本
    字体名称: 文本
    大小: 整数
    位置: Vector 2D
    颜色: 颜色
    居中: 真否
    水平居中: 真否
    垂直居中: 真否
void DrawText(
    RealtimeApplication Realtime Application,
    string text,
    string fontName,
    int size,
    Vector2D location,
    ColorElement color,
    bool centered,
    bool centeredHorizontally = true,
    bool centeredVertically = true)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
文本文本—
字体名称文本—
大小整数—
位置Vector 2D—
颜色颜色—
居中真否—
水平居中真否True
垂直居中真否True

重载 3/3

签名
绘制文字
    Realtime Application: Realtime Application
    文本: 文本
    字体名称: 文本
    字号: 整数
    位置: Vector 2D
    最大宽度: 整数
    颜色: 颜色
void DrawText(
    RealtimeApplication Realtime Application,
    string text,
    string fontName,
    int fontSize,
    Vector2D location,
    int maxWidth,
    ColorElement color)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
文本文本—
字体名称文本—
字号整数—
位置Vector 2D—
最大宽度整数—
颜色颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

绘制平铺图像

函数

An image repeated across a rectangle, shifted by an offset: a texture of grain or cloth, a scrolling background.

签名
绘制平铺图像
    Realtime Application: Realtime Application
    图像: Pixel Image
    X: 数字
    Y: 数字
    宽度: 数字
    高度: 数字
    缩放: 数字
    偏移: Vector 2D
    着色: 颜色
void DrawTiledImage(
    RealtimeApplication Realtime Application,
    PixelImage image,
    double x,
    double y,
    double width,
    double height,
    double scale,
    Vector2D offset,
    ColorElement tint)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
图像Pixel Image—The image to repeat.
X数字—Left edge.
Y数字—Top edge.
宽度数字—Width.
高度数字—Height.
缩放数字—How large one repeat is drawn; 1 as it is.
偏移Vector 2D—How far the pattern is shifted, in the image's own pixels: change it every frame to scroll.
着色颜色—Each pixel multiplied by this colour; white at a low alpha for a faint texture.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

音频输出

函数

Where this application's sound comes out. Attached by whatever is running it.

签名
音频输出(Realtime Application: Realtime Application) -> I Realtime Audio Output
IRealtimeAudioOutput AudioOutput(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果I Realtime Audio Output

备注

Settable rather than constructed here, because the package a graph is authored against must not
depend on an audio backend - SFML lives in the framework, behind IRealtimeAudioOutput. A run with
nothing attached REFUSES BY NAME rather than going quietly silent, which is the failure the thirty-
nine forwarders this class used to carry produced whenever their handle was unset.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

音频输出(如已连接)

函数

The audio output if one was attached, and null if this run has been silent.

签名
音频输出(如已连接)(Realtime Application: Realtime Application) -> I Realtime Audio Output
IRealtimeAudioOutput AudioOutputIfAttached(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果I Realtime Audio Output
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

已请求关闭

函数

Whether the application has asked to stop. A host reads this and ends its loop.

签名
已请求关闭(Realtime Application: Realtime Application) -> 真否
bool CloseRequested(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果真否

备注

ShadowGUI's FrameResult.ExitRequested, in the one shape that works here: a program that wants to end
says so, and whatever is driving it decides what that means. It used to reach through its service
provider to call Close on the window, which is a program holding its host.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

光标可见

函数

Whether the application wants a cursor shown. A host reads this.

签名
光标可见(Realtime Application: Realtime Application) -> 真否
bool CursorVisible(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

调试中

函数

Whether the application draws its own frame-rate readout.

签名
调试中(Realtime Application: Realtime Application) -> 真否
bool Debugging(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果真否

备注

A flag the application reads rather than something a host does for it. The overlay used to be SFML
`Text` drawn onto the window AFTER the frame, which a host that only uploads a framebuffer cannot
do - so it becomes the application's own drawing, like everything else here.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

期望的背景颜色

函数

What Clear paints when it is given no colour of its own.

签名
期望的背景颜色(Realtime Application: Realtime Application) -> 可选颜色
ColorElement? DesiredBackgroundColor(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果可选颜色
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

Desired Frame Rate

函数

The frame rate the application asks for, in hertz; 0, the default, for as fast as the display allows. A host that was given a rate of its own keeps it.

签名
DesiredFrameRate(Realtime Application: Realtime Application) -> 数字
double DesiredFrameRate(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

期望的窗口大小

函数

The size the application wants. A host may show it larger and scale, but this is what drawing is
laid out against and what the framebuffer is built at.

签名
期望的窗口大小(Realtime Application: Realtime Application) -> Size
Size DesiredWindowSize(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Size
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

期望的窗口标题

函数

The window's title.

签名
期望的窗口标题(Realtime Application: Realtime Application) -> 文本
string DesiredWindowTitle(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果文本

备注

Round 25: a game published as a program is a window of its own, and its title bar said "Divoka - Glaze!" whatever the game was; the window now says what the document sets here, "Divooka" until it does.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

已用时间

函数

Milliseconds the last frame took. Set by whatever drives the loop.

签名
已用时间(Realtime Application: Realtime Application) -> 数字
double ElapsedTime(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

帧缓冲区

函数

The pixels. Valid between frames; rebuilt when the window is resized.

签名
帧缓冲区(Realtime Application: Realtime Application) -> Pixel Image
PixelImage Framebuffer(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Pixel Image

备注

The application owns its framebuffer, exactly as ShadowGUI's does - there is no host holding pixels
and no conversion step between drawing and reading, so `Capture` is a copy of this and nothing else.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

输入

函数

Where the pointer is and which keys are down.

签名
输入(Realtime Application: Realtime Application) -> Glaze Input State
GlazeInputState Input(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Glaze Input State

备注

The SFML backend reads `SFML.Window.Mouse` and `SFML.Window.Keyboard` STATICS - process-wide state
belonging to a real device - which is exactly why an offline run could not synthesise input. Here it
is ordinary state on the window, so a driver sets it and the document reads it back through the same
contract it always used.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

在更新循环中

函数

Whether a frame is being drawn.

签名
在更新循环中(Realtime Application: Realtime Application) -> 真否
bool InUpdateLoop(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果真否

备注

Ten drawing routines consult this. Drawing outside the loop is refused rather than ignored because
the pixels it produced would be overwritten by the next Clear without ever being shown, and a draw
that silently does nothing is worse than one that says why.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

是否正在光栅化

函数

Whether this window rasterizes, or merely records.

签名
是否正在光栅化(Realtime Application: Realtime Application) -> 真否
bool IsRasterizing(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

请求的光标

函数

What cursor the application would like. A host reads this; an application draws no cursor itself.

签名
请求的光标(Realtime Application: Realtime Application) -> Cursor Type
CursorType RequestedCursor(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Cursor Type
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

输出端

函数

Where drawing goes: the framebuffer's rasterizer by default, or whatever was composed in.

签名
输出端(Realtime Application: Realtime Application) -> IGeometrySink
IGeometrySink Sink(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果IGeometrySink

备注

Settable so a test can swap in a recorder mid-run - the drawing code neither knows nor can tell,
because everything below is written against the interface.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

存储

函数

Per-run storage a node can keep something in, cleared when a run starts.

签名
存储(Realtime Application: Realtime Application) -> 文本到任意的字典
Dictionary<string, object> Storage(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果文本到任意的字典
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取实际窗口大小

函数

此节点没有文档说明。

签名
获取实际窗口大小(Realtime Application: Realtime Application) -> Vector 2D
Vector2D GetActualWindowSize(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Vector 2D
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取已用时间

函数

此节点没有文档说明。

签名
获取已用时间(Realtime Application: Realtime Application) -> 数字
double GetElapsedTime(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取鼠标按键状态

函数

此节点没有文档说明。

签名
获取鼠标按键状态(Realtime Application: Realtime Application) -> (左键按下: 真否, 左键抬起: 真否, 中键按下: 真否, 中键抬起: 真否, 右键按下: 真否, 右键抬起: 真否)
void GetMouseButtonStates(
    RealtimeApplication Realtime Application,
    out bool LLMDown,
    out bool LLMUp,
    out bool MMMDown,
    out bool MMMUp,
    out bool RMBDown,
    out bool RMBUp)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

左键按下真否
左键抬起真否
中键按下真否
中键抬起真否
右键按下真否
右键抬起真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取鼠标位置

函数

此节点没有文档说明。

重载 1/2

签名
获取鼠标位置(Realtime Application: Realtime Application) -> Vector 2D
Vector2D GetMousePosition(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Vector 2D

重载 2/2

签名
获取鼠标位置(Realtime Application: Realtime Application) -> (X: 数字, Y: 数字)
void GetMousePosition(
    RealtimeApplication Realtime Application,
    out double x,
    out double y)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

X数字
Y数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取录音设备

函数

The recording devices on this machine, by name, for Open Microphone.

签名
获取录音设备(Realtime Application: Realtime Application) -> 文本数组
string[] GetRecordingDevices(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

设备文本数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取声音电平

函数

How loud the sound is now: 0 for silence, 1 for a sine at full scale, over the newest 2048 samples, about 45 ms - what a level meter shows.

签名
获取声音电平 -> 数字
    Realtime Application: Realtime Application
    麦克风: 任意
double GetSoundLevel(
    RealtimeApplication Realtime Application,
    object microphone)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
麦克风任意—From Open Microphone, to measure what it hears; what is playing when not connected.

返回

电平数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取声音频谱

函数

How loud each part of the sound is now, from the bass on the left to the treble on the right: bands spaced evenly in pitch from 40 Hz to 16 kHz, each 0 at -60 dB or quieter and 1 at full scale - the bars of a spectrum visualizer.

签名
获取声音频谱 -> 数字数组
    Realtime Application: Realtime Application
    频段数: 整数
    麦克风: 任意
double[] GetSoundSpectrum(
    RealtimeApplication Realtime Application,
    int bands = 16,
    object microphone)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
频段数整数16How many bars, 1 to 128.
麦克风任意—From Open Microphone, to measure what it hears; what is playing when not connected.

返回

电平数字数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取声音波形

函数

The newest samples of the sound, oldest first, for an oscilloscope to draw: each -1 to 1.

签名
获取声音波形 -> 数字数组
    Realtime Application: Realtime Application
    采样数: 整数
    麦克风: 任意
double[] GetSoundWaveform(
    RealtimeApplication Realtime Application,
    int samples = 735,
    object microphone)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
采样数整数735How many, 1 to 8192: 735 is one frame at 60 frames a second.
麦克风任意—From Open Microphone, to draw what it hears; what is playing when not connected.

返回

波形数字数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取存储

函数

此节点没有文档说明。

签名
获取存储(Realtime Application: Realtime Application) -> 文本到任意的字典
Dictionary<string, object> GetStorage(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果文本到任意的字典
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

获取窗口大小

函数

Get design-time or specified window size.

签名
获取窗口大小(Realtime Application: Realtime Application) -> Vector 2D
Vector2D GetWindowSize(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Vector 2D
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

隐藏光标

函数

此节点没有文档说明。

签名
隐藏光标(Realtime Application: Realtime Application)
void HideCursor(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

按键是否按下

函数

此节点没有文档说明。

签名
按键是否按下 -> 真否
    Realtime Application: Realtime Application
    键: Keyboard Key
bool IsKeyDown(
    RealtimeApplication Realtime Application,
    KeyboardKey key)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
键Keyboard Key—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

声音是否在播放

函数

此节点没有文档说明。

签名
声音是否在播放 -> 真否
    Realtime Application: Realtime Application
    声音: 任意
bool IsSoundPlaying(
    RealtimeApplication Realtime Application,
    object sound)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
声音任意—A sound, music or signal from one of the Play nodes.

返回

正在播放真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

创建精灵

函数

此节点没有文档说明。

重载 1/4

签名
创建精灵 -> GlazeSprite
    Realtime Application: Realtime Application
    图像路径: 文本
    缩放: 数字
    居中: 真否
GlazeSprite MakeSprite(
    RealtimeApplication Realtime Application,
    string imagePath,
    double scale = 1,
    bool centered = false)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
图像路径文本—
缩放数字1
居中真否False

返回

结果GlazeSprite

重载 2/4

签名
创建精灵 -> GlazeSprite
    Realtime Application: Realtime Application
    图像: Pixel Image
    缩放: 数字
    居中: 真否
GlazeSprite MakeSprite(
    RealtimeApplication Realtime Application,
    PixelImage image,
    double scale = 1,
    bool centered = false)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
图像Pixel Image—
缩放数字1
居中真否False

返回

结果GlazeSprite

重载 3/4

签名
创建精灵 -> GlazeSprite
    Realtime Application: Realtime Application
    图像路径: 文本
    源起始位置: Vector 2D
    大小: Vector 2D
    缩放: 数字
    居中: 真否
GlazeSprite MakeSprite(
    RealtimeApplication Realtime Application,
    string imagePath,
    Vector2D sourceStart,
    Vector2D size,
    double scale,
    bool centered)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
图像路径文本—
源起始位置Vector 2D—
大小Vector 2D—
缩放数字—
居中真否—

返回

结果GlazeSprite

重载 4/4

签名
创建精灵 -> GlazeSprite
    Realtime Application: Realtime Application
    图像: Pixel Image
    源起始位置: Vector 2D
    大小: Vector 2D
    缩放: 数字
    居中: 真否
GlazeSprite MakeSprite(
    RealtimeApplication Realtime Application,
    PixelImage image,
    Vector2D sourceStart,
    Vector2D size,
    double scale,
    bool centered)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
图像Pixel Image—
源起始位置Vector 2D—
大小Vector 2D—
缩放数字—
居中真否—

返回

结果GlazeSprite
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

打开麦克风

函数

Starts listening to a microphone, so the measuring nodes can hear it: pass what this returns as their Microphone.

签名
打开麦克风 -> 任意
    Realtime Application: Realtime Application
    设备: 文本
object OpenMicrophone(
    RealtimeApplication Realtime Application,
    string device = "")

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
设备文本—A name from Get Recording Devices; empty for the default.

返回

麦克风任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

播放片段

函数

Plays a clip from memory - one the audio nodes made, generated rather than recorded.

签名
播放片段 -> 任意
    Realtime Application: Realtime Application
    音频: AudioBuffer
    音量: 数字
    声像: 数字
    音高: 数字
    循环: 真否
object PlayClip(
    RealtimeApplication Realtime Application,
    AudioBuffer audio,
    double volume = 1,
    double pan = 0,
    double pitch = 1,
    bool loop = false)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
音频AudioBuffer—The clip.
音量数字10 to 1.
声像数字0-1 (left) to 1 (right).
音高数字1Playback speed: 2 is an octave up and twice as fast.
循环真否FalseWhether it repeats until stopped.

返回

声音任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

播放音乐

函数

Plays a music file, looping by default: WAV, OGG/Vorbis, FLAC or MP3. Music is never cut short to make room for another sound.

签名
播放音乐 -> 任意
    Realtime Application: Realtime Application
    文件路径: 文本
    循环: 真否
object PlayMusic(
    RealtimeApplication Realtime Application,
    string filePath,
    bool loop = true)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
文件路径文本—The file.
循环真否TrueWhether it repeats.

返回

音乐任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

播放信号

函数

Plays a signal, synthesized as it plays, until it is stopped: the same on both sides. A Microphone in it is heard live.

签名
播放信号 -> 任意
    Realtime Application: Realtime Application
    信号: Signal
    音量: 数字
object PlaySignal(
    RealtimeApplication Realtime Application,
    Signal signal,
    double volume = 1)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
信号Signal—What to play.
音量数字10 to 1.

返回

声音任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

播放音效

函数

Plays a sound file once: WAV, OGG/Vorbis, FLAC or MP3.

签名
播放音效 -> 任意
    Realtime Application: Realtime Application
    文件路径: 文本
object PlaySound(
    RealtimeApplication Realtime Application,
    string filePath)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
文件路径文本—The file.

返回

声音任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

播放立体声信号

函数

Plays a stereo signal - a panned voice, a stereo reverb or chorus - synthesized as it plays, until it is stopped.

签名
播放立体声信号 -> 任意
    Realtime Application: Realtime Application
    立体声: Stereo Signal
    音量: 数字
object PlayStereoSignal(
    RealtimeApplication Realtime Application,
    StereoSignal stereo,
    double volume = 1)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
立体声Stereo Signal—What to play.
音量数字10 to 1.

返回

声音任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

呈现

函数

Make sure every draw has reached the pixels, then answer them.

签名
呈现(Realtime Application: Realtime Application) -> Pixel Image
PixelImage Present(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—

返回

结果Pixel Image
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

请求关闭

函数

Ask to stop after this frame.

签名
请求关闭(Realtime Application: Realtime Application)
void RequestClose(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置光标

函数

此节点没有文档说明。

签名
设置光标
    Realtime Application: Realtime Application
    光标类型: Cursor Type
void SetCursor(
    RealtimeApplication Realtime Application,
    CursorType cursorType)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
光标类型Cursor Type—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置帧率

函数

Paces the frames at a steady rate, so every frame's delta is the same and motion is smooth: 60 for most games, 120 for a fast one; 0 for as fast as the display allows.

签名
设置帧率
    Realtime Application: Realtime Application
    每秒帧数: 数字
void SetFrameRate(
    RealtimeApplication Realtime Application,
    double framesPerSecond = 60)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
每秒帧数数字600 to 1000.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置循环

函数

此节点没有文档说明。

签名
设置循环
    Realtime Application: Realtime Application
    声音: 任意
    循环: 真否
void SetLoop(
    RealtimeApplication Realtime Application,
    object sound,
    bool loop = true)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
声音任意—A sound or music from one of the Play nodes.
循环真否TrueWhether it repeats.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置总音量

函数

The volume of everything at once, on top of each sound's own: a game's volume setting.

签名
设置总音量
    Realtime Application: Realtime Application
    音量: 数字
void SetMasterVolume(
    RealtimeApplication Realtime Application,
    double volume = 1)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
音量数字10 to 1.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置声像

函数

此节点没有文档说明。

签名
设置声像
    Realtime Application: Realtime Application
    声音: 任意
    声像: 数字
void SetPan(
    RealtimeApplication Realtime Application,
    object sound,
    double pan = 0)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
声音任意—A sound, music or signal from one of the Play nodes.
声像数字0-1 (left) to 1 (right).
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置音高

函数

此节点没有文档说明。

签名
设置音高
    Realtime Application: Realtime Application
    声音: 任意
    音高: 数字
void SetPitch(
    RealtimeApplication Realtime Application,
    object sound,
    double pitch = 1)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
声音任意—A sound, music or signal from one of the Play nodes.
音高数字1Playback speed: 1 as recorded, 2 an octave up and twice as fast.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置音量

函数

此节点没有文档说明。

签名
设置音量
    Realtime Application: Realtime Application
    声音: 任意
    音量: 数字
void SetVolume(
    RealtimeApplication Realtime Application,
    object sound,
    double volume = 1)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
声音任意—A sound, music or signal from one of the Play nodes.
音量数字10 to 1.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置窗口背景

函数

此节点没有文档说明。

签名
设置窗口背景
    Realtime Application: Realtime Application
    背景: 可选颜色
void SetWindowBackground(
    RealtimeApplication Realtime Application,
    ColorElement? background)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
背景可选颜色—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置窗口大小

函数

此节点没有文档说明。

签名
设置窗口大小
    Realtime Application: Realtime Application
    宽度: 数字
    高度: 数字
void SetWindowSize(
    RealtimeApplication Realtime Application,
    double width = 1024,
    double height = 768)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
宽度数字1024
高度数字768
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

设置窗口标题

函数

Set the window's title.

签名
设置窗口标题
    Realtime Application: Realtime Application
    标题: 文本
void SetWindowTitle(
    RealtimeApplication Realtime Application,
    string title = "Divooka")

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
标题文本Divooka
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

显示光标

函数

此节点没有文档说明。

重载 1/2

签名
显示光标
    Realtime Application: Realtime Application
    光标类型: Cursor Type
void ShowCursor(
    RealtimeApplication Realtime Application,
    CursorType cursorType)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
光标类型Cursor Type—

重载 2/2

签名
显示光标(Realtime Application: Realtime Application)
void ShowCursor(RealtimeApplication Realtime Application)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

显示调试信息

函数

此节点没有文档说明。

签名
显示调试信息
    Realtime Application: Realtime Application
    显示: 真否
void ShowDebugInformation(
    RealtimeApplication Realtime Application,
    bool show)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
显示真否—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

精灵碰撞

函数

此节点没有文档说明。

签名
精灵碰撞 -> 真否
    Realtime Application: Realtime Application
    精灵 1: GlazeSprite
    位置 1: Vector 2D
    旋转 1: 整数
    精灵 2: GlazeSprite
    位置 2: Vector 2D
    旋转 2: 整数
bool SpriteCollide(
    RealtimeApplication Realtime Application,
    GlazeSprite sprite1,
    Vector2D position1,
    int rotation1,
    GlazeSprite sprite2,
    Vector2D position2,
    int rotation2)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
精灵 1GlazeSprite—
位置 1Vector 2D—
旋转 1整数—
精灵 2GlazeSprite—
位置 2Vector 2D—
旋转 2整数—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

停止所有声音

函数

Stops everything playing, fading it out over some seconds.

签名
停止所有声音
    Realtime Application: Realtime Application
    淡出: 数字
void StopAllSounds(
    RealtimeApplication Realtime Application,
    double fade = 0)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
淡出数字0Seconds.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

停止声音

函数

Stops a sound, fading it out over some seconds; 0 stops it at once.

签名
停止声音
    Realtime Application: Realtime Application
    声音: 任意
    淡出: 数字
void StopSound(
    RealtimeApplication Realtime Application,
    object sound,
    double fade = 0)

参数

名称类型默认值说明
Realtime ApplicationRealtime Application—
声音任意—A sound, music or signal from one of the Play nodes.
淡出数字0Seconds.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
实时应用
所属包
Glaze 实时

已初始化

事件

Window is created.

签名
已初始化()
void Initialized()
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 状态机状态
声明于
实时应用
所属包
Glaze 实时

按键按下

事件

A key went down.

签名
按键按下(键: Keyboard Key)
void KeyDown(KeyboardKey key)

参数

名称类型默认值说明
键Keyboard Key—The key pressed.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 状态机状态
声明于
实时应用
所属包
Glaze 实时

Key Up

事件

A key came back up.

签名
KeyUp(key: Keyboard Key)
void KeyUp(KeyboardKey key)

参数

名称类型默认值说明
keyKeyboard Key—The key released.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 状态机状态
声明于
实时应用
所属包
Glaze 实时

Mouse Down

事件

A pointer button went down - a click begins, a drag starts.

签名
MouseDown(button: Mouse Button, position: Vector 2D)
void MouseDown(MouseButton button, Vector2D position)

参数

名称类型默认值说明
buttonMouse Button—Which button.
positionVector 2D—Where, in the framebuffer's pixels, whatever size the window is.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 状态机状态
声明于
实时应用
所属包
Glaze 实时

Mouse Up

事件

A pointer button came back up - a click ends, a drag drops.

签名
MouseUp(button: Mouse Button, position: Vector 2D)
void MouseUp(MouseButton button, Vector2D position)

参数

名称类型默认值说明
buttonMouse Button—Which button.
positionVector 2D—Where, in the framebuffer's pixels.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 状态机状态
声明于
实时应用
所属包
Glaze 实时

启动

事件

Divooka procedural program entry, equivalent to "Main" in many programming language. Runs before
the window exists; RealtimeApplication.Initialized is the one that runs when it does.

签名
启动()
void Start()
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 状态机状态
声明于
实时应用
所属包
Glaze 实时

更新

事件

Called once per frame. Procedural context entrance.

签名
更新(时间增量(毫秒): 数字)
void Update(double deltaTimeMiliseconds)

参数

名称类型默认值说明
时间增量(毫秒)数字—Time elapsed since the previous frame.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 状态机状态
声明于
实时应用
所属包
Glaze 实时