Beispiel #1
0
        /// <inheritdoc/>
        protected override void OnMessageReceived(IncomingMessage msg)
        {
            var key   = msg.ReadString();
            var value = msg.ReadFloat32();

            m_FloatProperties[key] = value;

            Action <float> action;

            m_RegisteredActions.TryGetValue(key, out action);
            action?.Invoke(value);
        }
Beispiel #2
0
        /// <inheritdoc/>
        protected override void OnMessageReceived(IncomingMessage msg)
        {
            var key  = msg.ReadString();
            var type = msg.ReadInt32();

            if ((int)EnvironmentDataTypes.Float == type)
            {
                var value = msg.ReadFloat32();

                m_Parameters[key] = value;

                Action <float> action;
                m_RegisteredActions.TryGetValue(key, out action);
                action?.Invoke(value);
            }
            else
            {
                Debug.LogWarning("EnvironmentParametersChannel received an unknown data type.");
            }
        }