예제 #1
0
    private void Update()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        if (trackObjects.Count <= 0)
        {
            return;
        }
        if (trackObjects.Count > MAX_OBJECTS)
        {
            CheckClosestObjects();
        }
        else
        {
            sortedList = trackObjects;
        }
        for (var i = 0; i < MAX_OBJECTS; i++)
        {
            if (sortedList.Count <= i || sortedList[i] == null)
            {
                m_values[i] = Vector4.zero;
            }
            else
            {
                m_values[i] = sortedList[i].GetVector() * sortedList[i].gameObject.activeSelf.ToInt() *
                              sortedList[i].enabled.ToInt();
            }
        }
    }
예제 #2
0
 private void OnAwake()
 {
     Instance = this;
 }
예제 #3
0
 private void OnEnable()
 {
     Instance = this;
 }