载入中...
搜索中...
未找到
ParticleConfig.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Json.h"
4#include "common/Result.h"
6
7#include <string>
8
9namespace eve::particles {
10
17
19bool applyConfigText(ParticleEmitter *emitter, const std::string &json, std::string *error = nullptr);
20
25bool loadConfigFile(ParticleEmitter *emitter, const std::string &path, std::string *error = nullptr);
26
28bool reloadConfigFile(ParticleEmitter *emitter, std::string *error = nullptr);
29
30} // namespace eve::particles
int root
Definition AnimSmr.cpp:119
std::string error
Definition Package.cpp:60
std::string path
Definition PlayHost.cpp:110
Move-only, checked operation results for the common layer.
std::unique_ptr< TrailEmitter > emitter
Move-only operation result carrying either a value or Status.
Definition Result.h:155
EVENGINE_API_FOUNDATION public API.
Definition Json.h:38
bool loadConfigFile(ParticleEmitter *emitter, const std::string &path, std::string *error)
Read path via Filesystem, apply, and bind Resource.path + modtime for hot reload. Returns false if fi...
eve::Result< void > applyConfigDocument(ParticleEmitter *emitter, eve::json::Value root)
Apply particle JSON config onto an emitter, including material texture resources. Does not change buf...
bool reloadConfigFile(ParticleEmitter *emitter, std::string *error)
Re-read Resource.path if set; updates modtime.
bool applyConfigText(ParticleEmitter *emitter, const std::string &json, std::string *error)
Parse JSON text and apply.