SonolusHaniwa
  • 1. 概述
  • 2. ハニプレ
  • 3. ユメステ
  • 4. Stellarity
  • 5. Phigros
  • 首页

    • 1. 概述
  • 玩家

    • 2. 安装服务
    • 3. 配置文件标准
    • 4. 服务使用方法
  • 开发者

    • 5. 自定义搜索函数
    • 6. 自定义资源创建接口
    • 7. 插件开发标准
  • 其他

    • 8. 更新日志
    • 9. 关于 srp 资源包
  • 1. 搭建开发环境
  • 2. Sonolus 基础
  • 3. 配置项目信息
  • 4. 基本数据类型
  • 5. 函数与语句块
  • 6. 注意事项
  • 1. 游玩模式基础
  • Index

    • 1. Introduce
  • Basics

    • 1. Index
    • 2. Types
    • 3. Statements
    • 4. Resources
    • 5. Projects
    • 6. Commands
  • API

    • Index
    • Macros
    • Builtins
    • Engine Options
    • Engine UI
    • Play Mode
    • Tutorial Mode
    • Preview Mode
    • Watch Mode
  • 1. 概述
  • 2. ハニプレ
  • 3. ユメステ
  • 4. Stellarity
  • 5. Phigros
  • 首页

    • 1. 概述
  • 玩家

    • 2. 安装服务
    • 3. 配置文件标准
    • 4. 服务使用方法
  • 开发者

    • 5. 自定义搜索函数
    • 6. 自定义资源创建接口
    • 7. 插件开发标准
  • 其他

    • 8. 更新日志
    • 9. 关于 srp 资源包
  • 1. 搭建开发环境
  • 2. Sonolus 基础
  • 3. 配置项目信息
  • 4. 基本数据类型
  • 5. 函数与语句块
  • 6. 注意事项
  • 1. 游玩模式基础
  • Index

    • 1. Introduce
  • Basics

    • 1. Index
    • 2. Types
    • 3. Statements
    • 4. Resources
    • 5. Projects
    • 6. Commands
  • API

    • Index
    • Macros
    • Builtins
    • Engine Options
    • Engine UI
    • Play Mode
    • Tutorial Mode
    • Preview Mode
    • Watch Mode
  • Index

    • 1. Introduce
  • Basics

    • 1. Index
    • 2. Types
    • 3. Statements
    • 4. Resources
    • 5. Projects
    • 6. Commands
  • API

    • Index
    • Macros
    • Builtins
    • Engine Options
    • Engine UI
    • Play Mode
    • Tutorial Mode
    • Preview Mode
    • Watch Mode

Preview Mode

class Archetype

variable int id

The unique identifier of the archetype.

variable VariablesArray<EntitySharedMemoryId> sharedMemory

Generic shared memory storage accessible by other entities.

variable EntityInfoGroup info

Contains state information of the entity. This variable is read-only in all callback functions.

variable string name

The name of the archetype, referenced by entities in level data. Special names have specific effects:

  • #BPM_CHANGE: Signals a BPM change. Entities with this name must also provide data named #BEAT and #BPM.
  • #TIMESCALE_CHANGE: Signals a time scale change. Entities with this name must also provide data named #BEAT and #TIMESCALE.

variable double preprocessOrder

Determines the order of the preprocess callback function. Smaller values execute earlier.

variable double renderOrder

Determines the order of the render callback function. Smaller values execute earlier.

function preprocess

Description: Callback function executed during preprocessing.

Returns:

Return TypeDescription
SonolusApiThe signature of the SonolusApi function

function render

Description: Callback function executed for rendering.

Returns:

Return TypeDescription
SonolusApiThe signature of the SonolusApi function

function defineImport

Description: Defines an import data for the EntityData block. This macro automatically allocates memory and creates a variable for the imported data.

Parameters:

ParameterTypeDefault ValueDescription
namestringrequiredThe name of the imported data. This will be used as a variable name in the code and a key in the JSON object.

function defineImportDetailed

Description: Defines a detailed import for the EntityData block, allowing a custom JSON key for the import. This macro also allocates memory and creates a variable for the imported data.

Parameters:

ParameterTypeDefault ValueDescription
varNamestringrequiredThe name of the variable in the code.
jsonNamestringrequiredThe key of the imported data in the JSON object.

function BuildData

Description: Finalizes and writes the engine preview data into a GZIP-compressed JSON file.

Parameters:

ParameterTypeDefault ValueDescription
...archetype classesrequiredAll the names of the archetype class

function getAid

Description: Retrieves the identifier for a given archetype class name.

Parameters:

ParameterTypeDefault ValueDescription
archetypestringrequiredThe name of the archetype class.

Returns:

Return TypeDescription
intThe ID of the archetype. If the archetype is not found, returns -1.
最近更新: 2025/8/2 12:40
Contributors: LittleYang0531
Prev
Tutorial Mode
Next
Watch Mode