Last change
on this file since 1895 was
1879,
checked in by patrick, 21 years ago
|
orxonox/trunk: perspective view, key-repeat bug fixed
|
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: ... |
---|
15 | co-programmer: ... |
---|
16 | */ |
---|
17 | |
---|
18 | |
---|
19 | #include "input_output.h" |
---|
20 | #include <iostream> |
---|
21 | |
---|
22 | using namespace std; |
---|
23 | |
---|
24 | |
---|
25 | /** |
---|
26 | \brief InputOutput Module for each player |
---|
27 | \param wld A reference to the game-world |
---|
28 | |
---|
29 | This Class registers all moves, a player makes and passes it to the player object. ToDo: extend to support network players... |
---|
30 | */ |
---|
31 | InputOutput::InputOutput (World* world, Player* player) |
---|
32 | { |
---|
33 | this->world = world; |
---|
34 | this->player = player; |
---|
35 | } |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | InputOutput::~InputOutput () {} |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | void InputOutput::goUp() |
---|
44 | { |
---|
45 | (*player).goY(STEP_FRONT); |
---|
46 | } |
---|
47 | |
---|
48 | void InputOutput::goDown() |
---|
49 | { |
---|
50 | (*player).goY(-STEP_FRONT); |
---|
51 | } |
---|
52 | |
---|
53 | void InputOutput::goLeft() |
---|
54 | { |
---|
55 | (*player).goX(-STEP_SIDE); |
---|
56 | |
---|
57 | } |
---|
58 | |
---|
59 | void InputOutput::goRight() |
---|
60 | { |
---|
61 | |
---|
62 | (*player).goX(STEP_SIDE); |
---|
63 | } |
---|
64 | |
---|
65 | void InputOutput::shoot() |
---|
66 | { |
---|
67 | (*player).shoot(1); |
---|
68 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.