blob: 781054abb1c6dfdb9a12a0aa8c95fa1b26547227 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#pragma once
#include "anim/task.hpp"
#include "std/shared_ptr.hpp"
class Framework;
struct AnimPhase
{
AnimPhase(double endScale, double timeInterval);
double m_endScale;
double m_timeInterval;
};
class AnimPhaseChain : public anim::Task
{
public:
AnimPhaseChain(Framework & f, double & scale);
void AddAnimPhase(AnimPhase const & phase);
virtual void OnStart(double ts);
virtual void OnStep(double ts);
private:
Framework & m_f;
vector<AnimPhase> m_animPhases;
size_t m_phaseIndex;
double & m_scale;
double m_startTime;
double m_startScale;
};
void InitDefaultPinAnim(AnimPhaseChain * chain);
shared_ptr<anim::Task> CreateDefaultPinAnim(Framework & f, double & scale);
|