Panda3D
asyncTaskSequence.I
1 // Filename: asyncTaskSequence.I
2 // Created by: drose (04Oct08)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: AsyncTaskSequence::set_repeat_count
18 // Access: Published
19 // Description: Sets the repeat count of the sequence. If the count
20 // is 0 or 1, the sequence will run exactly once. If it
21 // is greater than 0, it will run that number of times.
22 // If it is negative, it will run forever until it is
23 // explicitly removed.
24 ////////////////////////////////////////////////////////////////////
25 INLINE void AsyncTaskSequence::
26 set_repeat_count(int repeat_count) {
27  _repeat_count = repeat_count;
28 }
29 
30 ////////////////////////////////////////////////////////////////////
31 // Function: AsyncTaskSequence::get_repeat_count
32 // Access: Published
33 // Description: Returns the repeat count of the sequence. See
34 // set_repeat_count().
35 ////////////////////////////////////////////////////////////////////
36 INLINE int AsyncTaskSequence::
38  return _repeat_count;
39 }
40 
41 ////////////////////////////////////////////////////////////////////
42 // Function: AsyncTaskSequence::get_current_task_index
43 // Access: Published
44 // Description: Returns the index of the task within the sequence
45 // that is currently being executed (or that will be
46 // executed at the next epoch).
47 ////////////////////////////////////////////////////////////////////
48 INLINE int AsyncTaskSequence::
50  return _task_index;
51 }
int get_current_task_index() const
Returns the index of the task within the sequence that is currently being executed (or that will be e...
int get_repeat_count() const
Returns the repeat count of the sequence.
void set_repeat_count(int repeat_count)
Sets the repeat count of the sequence.