コード例 #1
0
// Input Observer Interface
void
dmz::EntityPluginPortalFollow3D::update_channel_state (
      const Handle Channel,
      const Boolean State) {

   _active += State ? 1 : -1;

   if (_active == 1) {

      if (_history) { delete []_history; _history = 0; }
      _history = new Matrix[_HistoryCount > 0 ? _HistoryCount : 1];
      _which = 0;

      ObjectModule *module = get_object_module ();

      if (module && _hilAttrHandle) {

         Matrix ori;

         module->lookup_orientation (_hil, _defaultHandle, ori);

         for (Int32 ix = 0; ix < _HistoryCount; ix++) { _history[ix] = ori; }
      }

      start_time_slice ();
   }
   else if (_active == 0) { stop_time_slice (); }
}
コード例 #2
0
// Input Observer Interface
void
dmz::EntityPluginFreeFly::update_channel_state (
      const Handle Channel,
      const Boolean State) {

   _active += State ? 1 : - 1;

   if (_active == 1) { start_time_slice (); }
   else if (_active == 0) { stop_time_slice (); }
}
コード例 #3
0
void
dmz::EntityPluginDeadTimer::update_object_state (
      const UUID &Identity,
      const Handle ObjectHandle,
      const Handle AttributeHandle,
      const Mask &Value,
      const Mask *PreviousValue) {

   if (_deadState && (AttributeHandle == _defaultHandle) && (ObjectHandle == _hil)) {

      const Boolean IsDead (Value.contains (_deadState));
      const Boolean WasDead (
         PreviousValue ? PreviousValue->contains (_deadState) : False);

      if (IsDead && !WasDead) { start_time_slice (); }
   }
}