Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
taskmanager.h
1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
4  * http://epsiteс.ch; http://colobot.info; http://github.com/colobot
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see http://gnu.org/licenses
18  */
19 
20 // taskmanager.h
21 
22 #pragma once
23 
24 
25 #include "object/object.h"
26 #include "object/task/task.h"
27 #include "object/task/taskmanip.h"
28 #include "object/task/taskgoto.h"
29 #include "object/task/taskshield.h"
30 #include "object/task/taskflag.h"
31 
32 
33 
35 {
36 public:
37  CTaskManager(CObject* object);
38  ~CTaskManager();
39 
40  Error StartTaskWait(float time);
41  Error StartTaskAdvance(float length);
42  Error StartTaskTurn(float angle);
43  Error StartTaskGoto(Math::Vector pos, float altitude, TaskGotoGoal goalMode, TaskGotoCrash crashMode);
44  Error StartTaskTake();
45  Error StartTaskManip(TaskManipOrder order, TaskManipArm arm);
46  Error StartTaskFlag(TaskFlagOrder order, int rank);
47  Error StartTaskBuild(ObjectType type);
48  Error StartTaskSearch();
49  Error StartTaskDeleteMark();
50  Error StartTaskInfo(const char *name, float value, float power, bool bSend);
51  Error StartTaskTerraform();
52  Error StartTaskPen(bool bDown, int color);
53  Error StartTaskRecover();
54  Error StartTaskShield(TaskShieldMode mode, float delay);
55  Error StartTaskFire(float delay);
56  Error StartTaskFireAnt(Math::Vector impact);
57  Error StartTaskGunGoal(float dirV, float dirH);
58  Error StartTaskSpiderExplo();
59  Error StartTaskReset(Math::Vector goal, Math::Vector angle);
60 
61  bool EventProcess(const Event &event);
62  Error IsEnded();
63  bool IsBusy();
64  bool IsPilot();
65  bool Abort();
66 
67 protected:
68  CTask* m_task;
69  CObject* m_object;
70  bool m_bPilot;
71 };
72 
Definition: taskmanager.h:34
ObjectType
Type of game object.
Definition: object.h:51
CObject - base class for all game objects.
Definition: task.h:64
Error
Type of error or info message.
Definition: global.h:32
3D (3x1) vector
Definition: vector.h:52
Event sent by system, interface or game.
Definition: event.h:678
Definition: object.h:357