-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCutScene.h
90 lines (88 loc) · 2.03 KB
/
CutScene.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/////////////////////////////////////////////////////////////////////
///////////////Original file by:Fyodor Zagumennov aka Sgw32//////////
///////////////Copyright(c) 2010 Fyodor Zagumennov //////////
/////////////////////////////////////////////////////////////////////
#pragma once
#include <Ogre.h>
#include <OgreNewt.h>
#include <vector>
#include "Player.h"
#include "global.h"
#include "HUD.h"
#include "MusicPlayer.h"
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
class CutScene:public FrameListener
{
public:
CutScene();
~CutScene();
void assign(Vector3 pos,Real length,String name,bool freezebefore,bool unfreezeafter,bool splineanims,bool hidehud);
String getname();
void addFrame(Vector3 pos,Real second,Quaternion quat);
//void setSpeed(Real speed);
void start();
void setMusicSync(String fileName,Real length)
{
musicSync=true;
musicName=fileName;
musicLength=length;
speedcoef=2.0f; //Because music doesnt't support 3.0f
}
void setNoDestroy(bool noD)
{
mNoDestroy=noD;
}
void enableSkipAbility()
{
skipMessage=true;
}
void setFasterCoefficient(Real k)
{
if ((k>2.0f)&&(musicSync))
speedcoef=2.0f;
else
speedcoef = k;
}
void setInf(bool inf)
{mInf=inf;
}
void addLuaRun(Real second,String script)
{
scripts.push_back(script);
scripts_s.push_back(second);
}
void setWait(Real wait);
void stop();
virtual bool frameStarted(const Ogre::FrameEvent &evt);
void dispose();
void dispose2();
private:
AnimationState* mAnimState;
Animation* anim;
Camera* mCamera;
bool started,unfreeze,disposed,first,hhud;
bool musicSync;
Real timeBefore;
Real musicLength;
String musicName;
bool fb;
int i;
NodeAnimationTrack* track;
TransformKeyFrame* key;
Player* mPlayer;
Real time,length,wait_before_start,tim2,elapsedt,lastt;
bool mInf;
bool skipMessage;
bool skipping;
bool mNoDestroy;
Real speedcoef;
String mName;
SceneManager* mSceneMgr;
Vector3 mStartPosition;
SceneNode* camera_scenenode;
vector<TransformKeyFrame*> frames;
vector<String> scripts;
vector<Real> scripts_s;
};