Exemplo n.º 1
0
 private static void RegistRayTargetEventObject(int _instanceID, InteractObjectAbstract _eventBasic)
 {
     if (!m_dicRegistedRayTargets.ContainsKey(_instanceID))
     {
         m_dicRegistedRayTargets.Add(_instanceID, _eventBasic);
     }
 }
Exemplo n.º 2
0
        public static void RegistNetworkEventObject(InteractObjectAbstract _eventBasic)
        {
            uint uid = _eventBasic.UID;

            if (!m_dicRegistedNetworkInteractObjects.ContainsKey(uid))
            {
                m_dicRegistedNetworkInteractObjects.Add(uid, _eventBasic);
            }
        }
Exemplo n.º 3
0
        public static void UnRegistNetworkEventObject(InteractObjectAbstract _eventBasic)
        {
            uint uid = _eventBasic.UID;

            if (m_dicRegistedNetworkInteractObjects.ContainsKey(uid))
            {
                m_dicRegistedNetworkInteractObjects.Remove(uid);
            }
        }
Exemplo n.º 4
0
        private static void AddToLocalDictionary(eTrick _trickType, InteractObjectAbstract _eventBasicAbstract)
        {
            if (!m_dicRegistedEventObject.ContainsKey(_trickType))
            {
                m_dicRegistedEventObject.Add(_trickType, new List <InteractObjectAbstract>());
            }

            if (!m_dicRegistedEventObject[_trickType].Contains(_eventBasicAbstract))
            {
                m_dicRegistedEventObject[_trickType].Add(_eventBasicAbstract);
            }
        }
Exemplo n.º 5
0
        private static void RemoveToLocalDictionary(eTrick _trickType, InteractObjectAbstract _eventBasicAbstract)
        {
            if (m_dicRegistedEventObject.ContainsKey(_trickType))
            {
                if (m_dicRegistedEventObject[_trickType].Contains(_eventBasicAbstract))
                {
                    m_dicRegistedEventObject[_trickType].Remove(_eventBasicAbstract);
                }

                if (m_dicRegistedEventObject[_trickType].Count == 0)
                {
                    m_dicRegistedEventObject.Remove(_trickType);
                }
            }
        }
Exemplo n.º 6
0
        public static void Remove_EventAbleObject(InteractObjectAbstract _eventAbleObj, bool _removeAll = false)
        {
            if (_eventAbleObj.GetType().IsSubclassOf(typeof(EventRayAbstract)))
            {
                if (_eventAbleObj.DetectionArea != null)
                {
                    UnRegistRayTargetObject(_eventAbleObj.DetectionArea.GetInstanceID());
                }

                if (!_removeAll)
                {
                    return;
                }
            }

            eTrick[] usingTricks = GameTrick.GetTricksFromMaskValue(_eventAbleObj.UsingTrick);

            for (int i = 0; i < usingTricks.Length; i++)
            {
                RemoveToLocalDictionary(usingTricks[i], _eventAbleObj);
            }
            UnRegistNetworkEventObject(_eventAbleObj);
        }
Exemplo n.º 7
0
 public static bool GetEventObjectByNetID(uint _netID, out InteractObjectAbstract _netObject)
 {
     return(m_dicRegistedNetworkInteractObjects.TryGetValue(_netID, out _netObject));
 }
Exemplo n.º 8
0
 public static bool GetRayTargetObject(int _instanceID, out InteractObjectAbstract _rayTargetObject)
 {
     return(m_dicRegistedRayTargets.TryGetValue(_instanceID, out _rayTargetObject));
 }