E:/Eigene Dateien/Eigene Projekte/c0re/Unit.h

Go to the documentation of this file.
00001 /*
00002         This file is part of c0re.
00003 
00004         c0re is a multiplayer RTS on a hexagonal map with an evolving unit concept.
00005     Copyright (C) 2007 Stephan Hofmann
00006 
00007     c0re is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #ifndef _UNIT_H_
00022 #define _UNIT_H_
00023 
00024 #include "Object.h"
00025 
00026 class Field;
00027 class Level;
00028 class Player;
00029 
00033 class Unit : public Object
00034 {
00035 public:
00036 
00040         Unit(Player *p_player);
00041 
00045         virtual ~Unit();
00046 
00053         int settle(Level* p_level);
00054 
00062         int generate(Field* p_field, Level *p_level);
00063 
00070         int mutate(Level *p_level);
00071 
00078         int load(std::string p_filename);
00079 
00088         int render(Vector3d p_pos, Level* p_level, double p_deltasize = 1.0);
00089 
00097         int leechEnergy(Field* p_field, Level *p_level);
00098 
00106         int compute(Field* p_field, Level *p_level);
00107 
00114         int getCombatValue(double p_rand);
00115 
00119         static int s_selectedID;
00120 
00125         int spawnDestination;
00126 
00130         Field* spawnDestinationField;
00131 
00135         bool isSettled;
00136 
00140         std::string name;
00141 
00145         Player * player;
00146         
00150         int move_cost;
00151 
00155         int move_cooldown;
00156 
00160         int settle_cost;
00161 
00165         int settle_energy;
00166 
00170         int settle_cooldown;
00171 
00175         int absorb_cost;
00176 
00180         int absorb_cooldown;
00181 
00185         int absorb_cooldown_core;
00186 
00190         std::string generates;
00191 
00195         int generate_cooldown;
00196 
00200         std::string mutates;
00201 
00205         std::string settleSprite;
00206 
00210         int movingCombatValue;
00211 
00215         int movingCombatBonus;
00216 
00220         int movingCombatRandom;
00221 
00225         int settledCombatValue;
00226 
00230         int settledCombatBonus;
00231 
00235         int settledCombatRandom;
00236 
00240         bool isBlocked;
00241 
00245         int bonus;
00246 };
00247 
00248 
00249 
00250 #endif
00251 
00252 

Generated on Tue Jul 17 22:02:22 2007 for C0re by  doxygen 1.5.2