wavelength 1.0.0
Loading...
Searching...
No Matches
metagamearena.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
5#include "os/asyncstream.h"
6#include "os/string.h"
7#include "rnd/rndloader.h"
9#include "rnd/rndview.h"
10
20public:
28
36
43 void StartLoad();
44
52 bool IsLoaded() const;
53
63
70 void Unload();
71
82 void Poll(int nState, int nLoadStage, float flTime, float flTick);
83
91 void Draw(int nState);
92
100 void SetRevealArena(int nArena);
101
109 void StartReveal(float flTime);
110
111private:
113 enum LoadState {
114 kLoadStateIdle = 0,
115 kLoadStateScene = 1,
116 kLoadStateTriggers = 2,
117 kLoadStateDone = 3,
118 };
119
127 void PollLoad(float flTime);
128
129 std::unique_ptr<RndLoader> mLoader;
130 RndView *mView;
131 RndView *mTransitionView;
132 String mPrefix;
133 int mRevealArena;
134 float mRevealStart;
135 float mParticlesStart;
136 RndView *mRevealView;
137 RndParticleSysAnim *mParticles;
138 float mRevealLength;
139 float mParticlesLength;
140 const char *mTriggerFile;
141 std::unique_ptr<AsyncStream> mTriggerStream;
142 int mLoadState;
143};
void StartReveal(float flTime)
Start the animation that reveals the chosen arena.
void Unload()
Stop the triggers and delete the arena scene.
bool IsLoaded() const
Report whether the arena scene and its triggers have loaded.
void SetRevealArena(int nArena)
Choose the arena the next reveal shows.
void ShowUnlocks()
Set the frame of each unlock animation to show the arenas the player has unlocked.
void Draw(int nState)
Draw the arena scene while the front end shows and the scene has loaded.
~MetagameArena()
Delete the load of the arena scene.
void StartLoad()
Start loading the arena scene across frames.
void Poll(int nState, int nLoadStage, float flTime, float flTick)
Advance the arena scene and the unlock animations by one frame.
MetagameArena()
Build the arena with nothing loaded.
Animation of the start colour range, the end colour range, and the emission rate of a particle system...
Definition rndparticlesysanim.h:22
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
Growable text buffer that is also a PrnStream.
Definition string.h:19