Last change
on this file since 1895 was
1883,
checked in by patrick, 21 years ago
|
orxonox/trunk: added envoronment eg. little mountain - its time to talk about further development…
|
File size:
1.2 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | /* |
---|
4 | orxonox - the future of 3D-vertical-scrollers |
---|
5 | |
---|
6 | Copyright (C) 2004 orx |
---|
7 | |
---|
8 | This program is free software; you can redistribute it and/or modify |
---|
9 | it under the terms of the GNU General Public License as published by |
---|
10 | the Free Software Foundation; either version 2, or (at your option) |
---|
11 | any later version. |
---|
12 | |
---|
13 | ### File Specific: |
---|
14 | main-programmer: Patrick Boenzli |
---|
15 | co-programmer: |
---|
16 | */ |
---|
17 | |
---|
18 | |
---|
19 | #include "player.h" |
---|
20 | #include <iostream> |
---|
21 | |
---|
22 | using namespace std; |
---|
23 | |
---|
24 | |
---|
25 | Player::Player () { |
---|
26 | xCor = yCor = zCor = 0; |
---|
27 | } |
---|
28 | |
---|
29 | |
---|
30 | |
---|
31 | Player::~Player () {} |
---|
32 | |
---|
33 | |
---|
34 | void Player::setPosition( float x, float y, float z) |
---|
35 | { |
---|
36 | xCor = x; yCor = y; zCor = z; |
---|
37 | } |
---|
38 | |
---|
39 | void Player::getPosition(float* x, float* y, float* z) |
---|
40 | { |
---|
41 | *x = xCor; *y = yCor; *z = zCor; |
---|
42 | } |
---|
43 | |
---|
44 | void Player::goX(float x) |
---|
45 | { |
---|
46 | xCor += x; |
---|
47 | } |
---|
48 | |
---|
49 | |
---|
50 | void Player::goY(float y) |
---|
51 | { |
---|
52 | yCor += y; |
---|
53 | } |
---|
54 | |
---|
55 | void Player::goZ(float z) |
---|
56 | { |
---|
57 | zCor += z; |
---|
58 | } |
---|
59 | |
---|
60 | void Player::shoot(int n) { |
---|
61 | } |
---|
62 | |
---|
63 | |
---|
64 | //void Player::addIO(InputOutput *io) {} |
---|
65 | |
---|
66 | |
---|
67 | void Player::drawPlayer(void) |
---|
68 | { |
---|
69 | //cout << "Player::drawPlayer()" << endl; |
---|
70 | //glColor3f(0.0, 0.9, 0.7); |
---|
71 | //glRectf(-0.5 + yCor, -0.5 + xCor, 0.5 + yCor, 2.0 + xCor); |
---|
72 | |
---|
73 | glPushMatrix(); |
---|
74 | glScalef(1.0, 3.0, 1.0); |
---|
75 | glTranslatef(xCor, yCor, 3.0); |
---|
76 | glutWireCube(1.0); |
---|
77 | glPopMatrix(); |
---|
78 | |
---|
79 | |
---|
80 | //cout << "x: " << xCor << " y: " << yCor << endl; |
---|
81 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.