1 class PluginObjectsInteractionManager
extends PluginBase
5 private const float TIME_TO_FORCED_UNLOCK = 60;
6 private const float TICK_RATE = 10;
9 void PluginObjectsInteractionManager()
20 if ( target && m_LockedObjects.Count() > 0 )
22 for (
int i = 0; i < m_LockedObjects.Count(); i++ )
24 if ( m_LockedObjects.Get(i) == target )
35 if ( target && !IsFree(target) )
37 m_LockedObjects.Insert(target);
38 m_LockedObjectsDecay.Insert(0);
44 if ( target && m_LockedObjects.Count() > 0 )
46 for (
int i = 0; i < m_LockedObjects.Count(); i++ )
48 if ( m_LockedObjects.Get(i) == target )
50 m_LockedObjects.Remove(i);
51 m_LockedObjectsDecay.Remove(i);
61 if ( m_LockedObjectsDecay.Count() > 0 )
63 for (
int i = 0; i < m_LockedObjectsDecay.Count(); i++ )
65 if ( m_LockedObjectsDecay.Get(i) >= TIME_TO_FORCED_UNLOCK )
67 m_LockedObjects.Remove(i);
68 m_LockedObjectsDecay.Remove(i);
72 m_LockedObjectsDecay.Get(i) += TICK_RATE;