-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathentityPlayer2.cpp
More file actions
91 lines (73 loc) · 2.38 KB
/
entityPlayer2.cpp
File metadata and controls
91 lines (73 loc) · 2.38 KB
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
91
#include "entityPlayer2.hpp"
#include "game.hpp"
#include "grid.hpp"
entityPlayer2::entityPlayer2()
: player()
{
mPlayerAssignment = 1;
mType = ENTITY_TYPE_PLAYER2;
mScale = .1;
mRadius = 2;
mPen = vector::pen(.3, .4, 1, 1, 12);
mExhaustPen = vector::pen(.3, .4, 1, 40, 5);
mMissilesPen = vector::pen(.3, .4, 1, 40, 5);
mFontPen = vector::pen(.3, .4, 1, 40, 5);
int i = 0;
mModel.mVertexList.resize(13);
mModel.mVertexList[i++] = Point3d(0, 17.5);
mModel.mVertexList[i++] = Point3d(6.5, 5.5);
mModel.mVertexList[i++] = Point3d(0, -6.5);
mModel.mVertexList[i++] = Point3d(-6.5, 5.5);
mModel.mVertexList[i++] = Point3d(1.5, -10.5);
mModel.mVertexList[i++] = Point3d(15, 1.5);
mModel.mVertexList[i++] = Point3d(9.2, -13.1);
mModel.mVertexList[i++] = Point3d(-1.5, -10.5);
mModel.mVertexList[i++] = Point3d(-15, 1.5);
mModel.mVertexList[i++] = Point3d(-9.2, -13.1);
mModel.mVertexList[i++] = Point3d(5, -17.7);
mModel.mVertexList[i++] = Point3d(0, -14.5);
mModel.mVertexList[i++] = Point3d(-5, -17.7);
i = 0;
mModel.mEdgeList.resize(12);
mModel.mEdgeList[i].from = 0;
mModel.mEdgeList[i++].to = 1;
mModel.mEdgeList[i].from = 1;
mModel.mEdgeList[i++].to = 2;
mModel.mEdgeList[i].from = 2;
mModel.mEdgeList[i++].to = 3;
mModel.mEdgeList[i].from = 3;
mModel.mEdgeList[i++].to = 0;
mModel.mEdgeList[i].from = 4;
mModel.mEdgeList[i++].to = 5;
mModel.mEdgeList[i].from = 5;
mModel.mEdgeList[i++].to = 6;
mModel.mEdgeList[i].from = 6;
mModel.mEdgeList[i++].to = 4;
mModel.mEdgeList[i].from = 7;
mModel.mEdgeList[i++].to = 9;
mModel.mEdgeList[i].from = 9;
mModel.mEdgeList[i++].to = 8;
mModel.mEdgeList[i].from = 8;
mModel.mEdgeList[i++].to = 7;
mModel.mEdgeList[i].from = 10;
mModel.mEdgeList[i++].to = 11;
mModel.mEdgeList[i].from = 11;
mModel.mEdgeList[i++].to = 12;
}
void entityPlayer2::initPlayerForGame()
{
player::initPlayerForGame();
if (theGame->numPlayers() == 2) {
mPos.x = (theGame->mGrid->extentX() / 2) + 9;
mPos.y = (theGame->mGrid->extentY() / 2) + 9;
mPos.z = 0;
}
}
void entityPlayer2::spawnTransition()
{
player::spawnTransition();
mPos.x = (theGame->mGrid->extentX() / 2) + 9;
mPos.y = (theGame->mGrid->extentY() / 2) + 9;
mPos.z = 0;
mAngle = 0;
}