home *** CD-ROM | disk | FTP | other *** search
/ Inventor Labs: Technology / INVENTORLABS_TECHNOLOGY.BIN / pc / files / shared.cst / 00018_Script_ActorListMgrParent < prev    next >
Text File  |  1997-07-24  |  2KB  |  74 lines

  1. --o: Actorlist Mgr
  2.  
  3.  
  4.  
  5. -- gActorListMgrObj
  6.  
  7. -- FUNCTIONALITY:
  8. -- when in the actorList, the actorList manager will send an update (mPerform) message to all active objects.  
  9.  
  10. property pSuspendedLst
  11. property pActiveActorList
  12. ----------------------------------------------------------------------------ò
  13. on mInit me
  14.   
  15.   return( me )
  16.   mSetUp ( me )
  17.   
  18. end mInit
  19. ----------------------------------------------------------------------------ò
  20. on mSetUp me
  21.   
  22.   set pActiveActorList = []
  23.   set pSuspendedLst = []
  24.   set the actorlist = [me]
  25.   
  26. end mSetUp
  27. ----------------------------------------------------------------------------ò
  28. on stepFrame me
  29.   
  30.   repeat with objectItem in pActiveActorList
  31.     mPerform (objectItem)
  32.   end repeat
  33.   
  34. end stepFrame
  35. ----------------------------------------------------------------------------ò
  36. on mAddToActorlist me, whatObj
  37.   
  38.   set pos = getpos( pActiveActorList, whatObj)
  39.   if (pos = 0) then append(pActiveActorList, whatObj)
  40.   
  41. end mAddToActorlist
  42. ----------------------------------------------------------------------------ò
  43. on mDeleteFromActorlist me, whatObj
  44.   
  45.   set pos = getpos( pActiveActorList, whatObj)
  46.   if (pos <> 0) then deleteAt( pActiveActorList, Pos)
  47.   
  48. end mDeleteFromActorlist
  49. ----------------------------------------------------------------------------ò
  50. on mSuspendActorlist me
  51.   
  52.   set pSuspendedLst =  pActiveActorList
  53.   set pActiveActorList = []
  54.   
  55. end mSuspendActorlist
  56. ----------------------------------------------------------------------------ò
  57. on mResumeActorlist me
  58.   
  59.   if (pSuspendedLst <> []) then set  pActiveActorList = pSuspendedLst
  60.   
  61. end mResumeActorlist
  62. ----------------------------------------------------------------------------ò
  63. on mClearActorlist me
  64.   
  65.   set pActiveActorList = []
  66.   
  67. end mClearActorlist
  68. ----------------------------------------------------------------------------ò
  69. on mGetActorList me
  70.   
  71.   return( pActiveActorList )
  72.   
  73. end mGetActorList
  74. ----------------------------------------------------------------------------ò