summaryrefslogtreecommitdiffstats
path: root/game/code/ai/sequencer/task.cpp
blob: aabfb6cfd88169b21855693c201ce8b74e806727 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//-----------------------------------------------------------------------------
// Copyright (C) 2001 Radical Entertainment Ltd.  All rights reserved.
//
// task.hpp
//
// Description: A Sequencer unit of scheduling having a notion of execution
//              states.
//
// Modification History:
//  + Created Aug 14, 2001 -- Gary Keong
//      - Snapshot from Hair Club (rev 2) Owner: Laurent Ancessi
//-----------------------------------------------------------------------------


#include <ai\sequencer\task.h>

//---------------------------------------------------------------------
// Main functions
//---------------------------------------------------------------------

Task::Task(void)
{
	// Reset the class
	m_status = SLEEPING;
}

Task::~Task(void)
{
}

Status Task::GetStatus(void)
{
	// Return the status of the task
	return m_status;
}

void Task::SetStatus(Status status)
{
	// Set the status of the task
	m_status = status;
}

bool Task::IsSleeping(void)
{
	// Is the status set to SLEEPING
	return m_status == SLEEPING;
}

void Task::Run(void)
{
	// Set the status to RUNNING
	m_status = RUNNING;
}

bool Task::IsRunning(void)
{
	// Is the status set to RUNNING
	return m_status == RUNNING;
}

void Task::Done(void)
{
	// Set the status to DONE
	m_status = DONE;
}

bool Task::IsDone(void)
{
	// Is the status set to DONE
	return m_status == DONE;
}

// End of file.