/* * ORXONOX - the hottest 3D action shooter ever to exist * > www.orxonox.net < * * * License notice: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: * Joel Lingg * Co-authors: * ... * */ #include "SMCoord.h" namespace orxonox { SMCoord::SMCoord() { set(0); } SMCoord::~SMCoord() { } SMCoord::SMCoord(int x) { set(x); } //sets the index. the boundaries neeed to set higher when you want more games. void SMCoord::set(int index) { if (index < 0) { this -> index = 0; } else if (index > 3) { this -> index = 3; } else { this -> index = index; } } //Returns the 3dcoordinate of the symbol which is choosen at the moment Vector3 SMCoord::get3dcoordinate() { Vector3 coord; switch (this -> index) { case 0: coord.x = 550; coord.y = 300; coord.z = 0; break; case 1: coord.x = 600; coord.y = 300; coord.z = 0; break; case 2: coord.x = 650; coord.y = 300; coord.z = 0; break; case 3: coord.x = 700; coord.y = 300; coord.z = 0; break; default: coord.x = 550; coord.y = 300; coord.z = 0; break; } return coord; } int SMCoord::getIndex() { return this -> index; } }