00001 /*************************************************************************** 00002 unit.h - description 00003 ------------------- 00004 begin : Wed Jul 25 2001 00005 copyright : (C) 2001 by T Kontkanen 00006 email : tkontkanen@mail.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef UNITMARINE_H 00019 #define UNITMARINE_H 00020 00021 #include "renderer.h" 00022 #include "player.h" 00023 #include "ground.h" 00024 #include "allincludes.h" 00025 #include "gamedefs.h" 00026 #include "vector.h" 00027 #include "groundmovement.h" 00028 #include "bulletweapon.h" 00029 #include "unit.h" 00030 00035 class Player; 00036 class Unit; 00037 00038 using namespace TGL; 00039 00040 class Game; 00041 00042 class UnitMarine : public Unit, GroundMovement, BulletWeapon { 00043 public: 00044 UnitMarine::UnitMarine( Game *pgame, int myplayernum, int myunitnum ); 00045 virtual ~UnitMarine(); 00046 00047 //controls 00048 virtual int action( int actionnum, Vector destpos ); 00049 00050 //render 00051 virtual int render(); // render this unit 00052 00053 virtual int step(); 00054 00055 virtual void setUnitPosition( Vector pos ) { setPosition( pos ); } 00056 virtual Vector& getUnitPosition( void ) { return getPosition(); } 00057 private: 00058 //needed information 00059 int playerNum; // number of this player 00060 tgl_object *model; 00061 00063 void findTarget(); 00064 00065 Renderer *renderer; 00066 Game *game; 00067 Ground *ground; 00068 Player **players; //the other players including this 00069 00070 //unit information 00071 int unitNum; // number of this unit 00072 }; 00073 00074 #endif