-
Notifications
You must be signed in to change notification settings - Fork 0
/
MultiPlayers.h
68 lines (47 loc) · 1.56 KB
/
MultiPlayers.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
#pragma once
#include "Character.h"
#include <vector>
#include <memory>
class MultiPlayers
{
std::shared_ptr<Bullet_physics> bullet;
int world;
std::vector<std::shared_ptr<Character>> players;
std::vector<unsigned int> playerID;
std::vector<std::string> names;
std::vector<float> ts;
std::vector<VECTOR> d;
std::vector<float> oldts;
std::vector<VECTOR> oldd;
std::vector<float> k;
std::vector<VECTOR> kd;
size_t playersSize = 0;
public:
MultiPlayers(std::shared_ptr<Bullet_physics> bullet_, int world_);
~MultiPlayers();
unsigned int findPlayerID(unsigned int PlayerID);
int addPlayer(unsigned int PlayerID, std::string name);
int loadModel(unsigned int PlayerID, char *ModelPath);
int setModel(unsigned int PlayerID, int ModelHandle, std::string ModelPath);
int copyModel(unsigned int PlayerID, int ModelHandle);
int deletePlayer(unsigned int PlayerID);
int setup(unsigned int PlayerID);
//全員分のアニメを再生
void playAnimeControl();
//全員分の位置を更新
void update();
//全員分の描画
void draw();
//座標を設定
int setPosBullet(unsigned int &PlayerID, btVector3 &pos, btQuaternion &q);
//アニメーションの状態を設定
void setState(unsigned int PlayerID,std::string &state);
//方向を設定
void setDirection(unsigned int PlayerID, VECTOR dir);
void setTurningSpeed(unsigned int PlayerID, float TurningSpeed);
VECTOR getPos(unsigned int PlayerID);
std::string getName(unsigned int PlayerID);
unsigned int getPlayerID(size_t PlayerNunber);
size_t getMultiplayerSize();
void addPlayerSize();
};