Last change
on this file since 1872 was
1872,
checked in by patrick, 20 years ago
|
orxonox/trunk: play the square - its possible now…
|
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( int x, int y, int z) |
---|
35 | { |
---|
36 | xCor = x; yCor = y; zCor = z; |
---|
37 | } |
---|
38 | |
---|
39 | void Player::getPosition(int* x, int* y, int* z) |
---|
40 | { |
---|
41 | *x = xCor; *y = yCor; *z = zCor; |
---|
42 | } |
---|
43 | |
---|
44 | void Player::goX(int x) |
---|
45 | { |
---|
46 | // (*player).goUp(); |
---|
47 | xCor += x; |
---|
48 | cout << "goX now..." << endl; |
---|
49 | } |
---|
50 | |
---|
51 | |
---|
52 | void Player::goY(int y) |
---|
53 | { |
---|
54 | yCor += y; |
---|
55 | } |
---|
56 | |
---|
57 | void Player::goZ(int z) |
---|
58 | { |
---|
59 | zCor += z; |
---|
60 | } |
---|
61 | |
---|
62 | void Player::shoot(int n) { |
---|
63 | } |
---|
64 | |
---|
65 | |
---|
66 | //void Player::addIO(InputOutput *io) {} |
---|
67 | |
---|
68 | |
---|
69 | void Player::drawPlayer(void) |
---|
70 | { |
---|
71 | //cout << "Player::drawPlayer()" << endl; |
---|
72 | glColor3f(1.0, 0.9, 0.4); |
---|
73 | glRectf(-5.0 + yCor, -5.0 + xCor, 5.0 + yCor, 5.0 + xCor); |
---|
74 | cout << "x: " << xCor << " y: " << yCor << endl; |
---|
75 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.