resonance 1.0.1
Loading...
Searching...
No Matches
multiscreenanim.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "game/screenanim.h"
6#include "game/tnlarena.h"
7
8namespace Rnd {
9class Mat;
10} // namespace Rnd
11
24public:
36 MultiScreenAnim(const std::vector<TnlArena::ScreenMesh> *pScreens,
37 const std::vector<TnlArena::PlayerMaterial *> *pPlayerMaterials);
38
44
54 virtual void SetFrame(float flFrame);
55
65 virtual void UpdateLeaders();
66
67private:
68 const std::vector<TnlArena::ScreenMesh> *mScreens;
69 const std::vector<TnlArena::PlayerMaterial *> *mPlayerMaterials;
70 // The materials of the leaders, in world order.
71 std::vector<Rnd::Mat *> mLeaderMats;
72 // Ticks each step of the cycle lasts.
73 float mPeriod;
74 // The step SetFrame() last applied. Starts at -1000.
75 int mPhase;
76};
MultiScreenAnim(const std::vector< TnlArena::ScreenMesh > *pScreens, const std::vector< TnlArena::PlayerMaterial * > *pPlayerMaterials)
Record the screens and the players' materials.
virtual void UpdateLeaders()
Rebuild mLeaderMats from the players' scores.
virtual void SetFrame(float flFrame)
Show the material of the current step on every screen.
virtual ~MultiScreenAnim()
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Animation of the arena screens that TnlArena drives.
Definition screenanim.h:14
The rendering engine.
Definition animhelper.h:3