Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/AI_HS15/src/orxonox/controllers/FleetController.h @ 10678

Last change on this file since 10678 was 10678, checked in by gania, 9 years ago

Didn't delete old structure, but intend to replace it with new: FleetController is a Base type, it should manage divisions, each consisting of 2 sections, each section is a pair of a Leader and a Wingman. Divisions can have different formation types: Echelon, Wall, Finger Four, Diamond, Vee. Leader decides what target to shoot first, wingmen cover Leader's rear. When 2 sections merge into a division, one of the Leaders becomes a Wingman. FleetController asks Leaders to attack targets, fly to positions or protect targets.

File size: 3.4 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      Dominik Solenicki
26 *
27 */
28
29#ifndef _FleetController_H__
30#define _FleetController_H__
31
32#include "controllers/Controller.h"
33
34#include "OrxonoxPrereqs.h"
35#include "core/class/Super.h"
36#include "core/CoreIncludes.h"
37#include "core/XMLPort.h"
38#include "core/command/ConsoleCommandIncludes.h"
39#include "core/command/Executor.h"
40
41#include <vector>
42#include "util/Math.h"
43#include <climits>
44
45#include "tools/Timer.h"
46#include "tools/interfaces/Tickable.h"
47
48#include "worldentities/ControllableEntity.h"
49#include "worldentities/pawns/SpaceShip.h"
50#include "worldentities/pawns/Pawn.h"
51#include "worldentities/pawns/TeamBaseMatchBase.h"
52
53#include "gametypes/TeamDeathmatch.h"
54#include "gametypes/Dynamicmatch.h"
55#include "gametypes/Mission.h"
56#include "gametypes/Gametype.h"
57
58#include "controllers/WaypointPatrolController.h"
59#include "controllers/NewHumanController.h"
60#include "controllers/DroneController.h"
61
62
63namespace orxonox
64{   
65
66    class _OrxonoxExport FleetController : public Controller
67    {
68        public:
69        FleetController(Context* context);
70        virtual ~FleetController();
71
72
73        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
74
75        //gameGoal_ is to be set in XML
76        //DOMINATE is default, makes AI want to be the only team alive
77        //MOVE makes a fleet move to a set absolute position (set in variable goalPosition_)
78        //DESTROY makes a fleet destroy a target (set in variable goalTarget_)
79        //PROTECT makes a fleet protect a target (set in variable goalProtect_)
80        enum GameGoal {DOMINATE, MOVE, DESTROY, PROTECT};
81       
82        /*void setGameGoal(GameGoal gameGoal)
83           { this->gameGoal_ = gameGoal; }
84        GameGoal getGameGoal() const
85           { return this->gameGoal_; }
86       
87        void setGoalPosition(Vector3* goalPosition)
88           { this->goalPosition_ = goalPosition; }
89        Vector3* getGoalPosition() const
90           { return this->goalPosition_; }
91       
92        void setGoalTarget(Pawn* goalTarget)
93           { this->goalTarget_ = goalTarget; }
94        Pawn* getGoalTarget() const
95           { return this->goalTarget_; }
96       
97        void setGoalProtect(Pawn* goalProtect)
98           { this->goalProtect_ = goalProtect; }
99        Pawn* getGoalProtect() const
100           { return this->goalProtect_; }*/
101
102
103
104        protected:
105
106           
107            GameGoal gameGoal_;
108            Vector3* goalPosition_;
109            WeakPtr<Pawn> goalTarget_;
110            WeakPtr<Pawn> goalProtect_;
111
112
113    };
114}
115
116#endif /* _FleetController_H__ */
Note: See TracBrowser for help on using the repository browser.