|
Last change
on this file since 1876 was
1875,
checked in by patrick, 22 years ago
|
|
/orxonox/trunk: it's smothen now. thanks for the tip bensch. if you have to high frame-rates, the square will move very fast.
|
|
File size:
1.1 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 | xCor += x; |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | void Player::goY(int y) |
|---|
| 51 | { |
|---|
| 52 | yCor += y; |
|---|
| 53 | } |
|---|
| 54 | |
|---|
| 55 | void Player::goZ(int 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(1.0, 0.9, 0.4); |
|---|
| 71 | glRectf(-5.0 + yCor, -5.0 + xCor, 5.0 + yCor, 5.0 + xCor); |
|---|
| 72 | cout << "x: " << xCor << " y: " << yCor << endl; |
|---|
| 73 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.