Example #1
0
        private void updateParameters(AgentType agentType, string agentName, int frame)
        {
            if (string.IsNullOrEmpty(agentName))
            {
                return;
            }

            string typeName      = (agentType == null) ? agentName : agentType.ToString();
            string agentFullname = (agentType == null) ? agentName : agentType.ToString() + "#" + agentName;
            List <AgentDataPool.ValueMark> values = AgentDataPool.GetValidValues(agentType, agentFullname, frame);

            foreach (AgentDataPool.ValueMark value in values)
            {
                ParametersDock.SetProperty(typeName, agentName, value.Name, value.Value);
            }
        }
Example #2
0
        private void updateParameters(AgentType agentType, string agentName, int frame)
        {
            if (string.IsNullOrEmpty(agentName))
            {
                return;
            }

            string       typeName         = (agentType == null) ? agentName : agentType.ToString();
            string       agentFullname    = (agentType == null) ? agentName : agentType.ToString() + "#" + agentName;
            string       behaviorFilename = FrameStatePool.GetBehaviorFilename(agentFullname, frame);
            BehaviorNode behavior         = null;

            if (agentFullname == Plugin.DebugAgentInstance)
            {
                behavior = UIUtilities.ShowBehavior(behaviorFilename);
            }

            List <AgentDataPool.ValueMark> values = AgentDataPool.GetValidValues(agentType, agentFullname, frame);

            foreach (AgentDataPool.ValueMark value in values)
            {
                ParametersDock.SetProperty(behavior, typeName, agentName, value.Name, value.Value);
            }
        }