载入中...
搜索中...
未找到
GroundParticleCulling.cpp
浏览该文件的文档.
2
4
5namespace eve::particles {
6
8 bool entered, bool exited) {
9 if (!emitter || playerTag == 0 || entered == exited)
12 "particles.groundCulling: emitter, nonzero player tag and one event direction required"));
13 if (visitorTag != playerTag) return Result<void>::success();
14 if (entered) {
15 if (emitter->isStopped()) emitter->start();
16 } else if (!emitter->isStopped()) {
17 emitter->stop();
18 }
19 return Result<void>::success();
20}
21
22} // namespace eve::particles
std::unique_ptr< TrailEmitter > emitter
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
Move-only operation result carrying either a value or Status.
Definition Result.h:155
static Result success(T value)
Construct a successful result owning value.
Definition Result.h:164
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
ECS emitter entity. Script configures components; ParticleSimSystem / ParticleRenderSystem drive per-...
Result< void > applyGroundParticleCulling(ParticleEmitter *emitter, int playerTag, int visitorTag, bool entered, bool exited)
Apply one Pcg GroundParticlesCulling trigger event to a caller-owned emitter.