forked from theetails/CS330
/
Shell.cpp
57 lines (37 loc) · 934 Bytes
/
Shell.cpp
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
/*
* Shell.cpp
* Game
*
* Created by David Reed, Matt Oldfield, Jeremy Sampson, Andrew Daugherty
* and Alex Martishius
* Copyright 2011. All rights reserved.
*
*/
//---------------------------------------------------------
#include "Shell.h"
//---------------------------------------------------------
Shell::Shell()
{
setKillsBottom(true);
setKillsSide(true);
setKillsTop(false);
setPoints(0);
setXVelocity(2.0);
setYVelocity(0.0);
}
//---------------------------------------------------------
Shell::~Shell()
{
}
//---------------------------------------------------------
void Shell::draw()
{
glColor3ub(153, 50, 204);
glBegin(GL_POLYGON);
glVertex2d(left(),bottom());
glVertex2d(right(),bottom());
glVertex2d(right(),top());
glVertex2d(left(),top());
glEnd();
}
//---------------------------------------------------------