Exemplo n.º 1
0
        public void UpdateSensors()
        {
            for (int i = 0; i < m_Sensors.Count; ++i)
            {
                ISensor <TKey, TValue> sensor = m_Sensors[i];
                if (sensor.GetShouldBeTicked() || Time.frameCount % (sensor.GetTickRate() + i) != 0)
                {
                    continue;
                }

                m_UnhandledSensorChanges |= sensor.DetectWorldStateChange(this);
            }

            if (m_UnhandledSensorChanges)
            {
                OnWorkingMemoryChanged?.Invoke(m_WorkingMemory);
            }
        }