载入中...
搜索中...
未找到
PcgGrowth.h
浏览该文件的文档.
1#pragma once
2
3#include <cstdint>
4#include "common/Export.h"
5#include "common/Result.h"
6namespace ssq{class Table;} namespace eve::scene{class SceneNodeRef;
9public:
[[nodiscard]] Result<void> configure(float startScale,float endScale,float variance,float duration); [[nodiscard]] Result<void> start(float now,std::uint32_t seed); [[nodiscard]] Result<float> advance(float now); [[nodiscard]] Result<void> die(float now); [[nodiscard]] Result<bool> shouldDestroy(float now)const; float getActualEndScale()const noexcept{return actualEnd_;} float getScale()const noexcept{return scale_;} bool getFinished()const noexcept{return finished_;}
18private:
19 float startScale_=.15f,endScale_=1,variance_=.25f,duration_=5,startTime_=0,actualEnd_=0,scale_=.15f,deathTime_=0;bool started_=false,finished_=false,dying_=false;
20};
void exposePcgGrowthBindings(ssq::Table& table);
24} // namespace eve::scene
Duration start
float duration
#define EVENGINE_API_PLATFORM
Definition Export.h:107
std::uint32_t seed
Definition PointSet.cpp:807
Move-only, checked operation results for the common layer.
const RoadNode * node
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Caller-owned one-shot Pcg Growth state with explicit time and random seed.
Definition PcgGrowth.h:8
Script handle to a scene node (hostName + nodeId). Deliberately holds strings rather than arena point...
Result< bool > applyPcgGrowth(PcgGrowth &g, SceneNodeRef &node, float now)
Advance growth on a real scene node; returns true when it removed the node.
Definition PcgGrowth.cpp:14
void exposePcgGrowthBindings(ssq::Table &t)
Register Pcg Growth bindings.
Definition PcgGrowth.cpp:15
enum EVENGINE_API_FOUNDATION Table
OT_TABLE (editable via Runtime table APIs / ReflectedPropertyModel).
Definition Runtime.h:121
EVEngine ECS 集成层:底层实现使用 sunxfancy/ECS.hpp https://github.com/sunxfancy/ECS.hpp
Definition ECS.h:14