Colobot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
src
object
motion
motionhuman.h
1
// * This file is part of the COLOBOT source code
2
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
3
// *
4
// * This program is free software: you can redistribute it and/or modify
5
// * it under the terms of the GNU General Public License as published by
6
// * the Free Software Foundation, either version 3 of the License, or
7
// * (at your option) any later version.
8
// *
9
// * This program is distributed in the hope that it will be useful,
10
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// * GNU General Public License for more details.
13
// *
14
// * You should have received a copy of the GNU General Public License
15
// * along with this program. If not, see http://www.gnu.org/licenses/.
16
17
// motionhuman.h
18
19
#pragma once
20
21
22
#include "object/motion/motion.h"
23
24
25
26
enum
MotionHumanAction
27
{
28
MH_MARCH = 0,
29
MH_MARCHTAKE = 1,
30
MH_TURN = 2,
31
MH_STOP = 3,
32
MH_FLY = 4,
33
MH_SWIM = 5,
34
MH_SPEC = 6
35
};
36
37
enum
MotionHumanSpecialAction
38
{
39
MHS_FIRE = 0,
40
MHS_GUN = 1,
41
MHS_TAKE = 2,
42
MHS_TAKEOTHER = 3,
43
MHS_TAKEHIGH = 4,
44
MHS_UPRIGHT = 5,
45
MHS_WIN = 6,
46
MHS_LOST = 7,
47
MHS_DEADg = 8,
48
MHS_DEADg1 = 9,
49
MHS_DEADg2 = 10,
50
MHS_DEADg3 = 11,
51
MHS_DEADg4 = 12,
52
MHS_DEADw = 13,
53
MHS_FLAG = 14,
54
MHS_SATCOM = 15
55
};
56
57
58
class
CMotionHuman
:
public
CMotion
59
{
60
public
:
61
CMotionHuman
(
CObject
*
object
);
62
~
CMotionHuman
();
63
64
void
DeleteObject(
bool
bAll=
false
);
65
bool
Create(
Math::Vector
pos,
float
angle,
ObjectType
type,
float
power);
66
bool
EventProcess(
const
Event
&event);
67
Error
SetAction(
int
action,
float
time=0.2f);
68
69
void
StartDisplayPerso();
70
void
StopDisplayPerso();
71
72
protected
:
73
void
CreatePhysics(
ObjectType
type);
74
bool
EventFrame(
const
Event
&event);
75
76
protected
:
77
int
m_partiReactor;
78
float
m_armMember;
79
float
m_armTimeAbs;
80
float
m_armTimeAction;
81
float
m_armTimeSwim;
82
short
m_armAngles[3*3*3*3*7 + 3*3*3*16];
83
int
m_armTimeIndex;
84
int
m_armPartIndex;
85
int
m_armMemberIndex;
86
int
m_armLastAction;
87
bool
m_bArmStop;
88
float
m_lastSoundMarch;
89
float
m_lastSoundHhh;
90
float
m_time;
91
float
m_tired;
92
bool
m_bDisplayPerso;
93
};
94
Generated on Sat Jul 5 2014 09:25:03 for Colobot by
1.8.1.2