Panda3D
|
00001 // Filename: asyncTaskSequence.I 00002 // Created by: drose (04Oct08) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: AsyncTaskSequence::set_repeat_count 00018 // Access: Published 00019 // Description: Sets the repeat count of the sequence. If the count 00020 // is 0 or 1, the sequence will run exactly once. If it 00021 // is greater than 0, it will run that number of times. 00022 // If it is negative, it will run forever until it is 00023 // explicitly removed. 00024 //////////////////////////////////////////////////////////////////// 00025 INLINE void AsyncTaskSequence:: 00026 set_repeat_count(int repeat_count) { 00027 _repeat_count = repeat_count; 00028 } 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Function: AsyncTaskSequence::get_repeat_count 00032 // Access: Published 00033 // Description: Returns the repeat count of the sequence. See 00034 // set_repeat_count(). 00035 //////////////////////////////////////////////////////////////////// 00036 INLINE int AsyncTaskSequence:: 00037 get_repeat_count() const { 00038 return _repeat_count; 00039 } 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: AsyncTaskSequence::get_current_task_index 00043 // Access: Published 00044 // Description: Returns the index of the task within the sequence 00045 // that is currently being executed (or that will be 00046 // executed at the next epoch). 00047 //////////////////////////////////////////////////////////////////// 00048 INLINE int AsyncTaskSequence:: 00049 get_current_task_index() const { 00050 return _task_index; 00051 }