-
Notifications
You must be signed in to change notification settings - Fork 0
/
Block.h
52 lines (47 loc) · 1.14 KB
/
Block.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
#pragma once
#ifndef __Block_h_
#define __Block_h_
#include <OgreEntity.h>
#include <OgreSceneNode.h>
#include <Ogre.h>
#include <OgreSceneManager.h>
#include <btBulletDynamicsCommon.h>
#define PI 3.1415926535898
class Block
{
public:
enum Type {step,ceiling,rail,gap, sideRun};
int id;
Type type;
int position;
bool multi;
bool serv;
Block();
Block(Ogre::SceneManager *newManager, int num, int z, bool m, bool s);
//void setPos(int x, int y, int z);
//Ogre::Vector3 getPos();
int destroy();
//void collision();
int getID();
Ogre::SceneManager *blockManager;
Ogre::SceneNode* blockNode1;
Ogre::Entity* blockEntity1;
Ogre::SceneNode* blockNode2;
Ogre::Entity* blockEntity2;
Ogre::SceneNode* blockNode3;
Ogre::Entity* blockEntity3;
Ogre::SceneNode* blockNode4;
Ogre::Entity* blockEntity4;
void setPosition(int x, int y, int z);
void setSize(double x, double y, double z);
btVector3 getPosition();
int getZ();
int getType();
//btDefaultMotionState* blockMotionState;
//btCollisionShape* blockShape;
//btRigidBody blockRigidBody;
//btDiscreteDynamicsWorld* dynamicsWorld;
private:
void buildBlock();
};
#endif // #ifndef __Block_h_