当前位置: 首页>>代码示例>>C#>>正文


C# AgentType.ToString方法代码示例

本文整理汇总了C#中Behaviac.Design.AgentType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# AgentType.ToString方法的具体用法?C# AgentType.ToString怎么用?C# AgentType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Behaviac.Design.AgentType的用法示例。


在下文中一共展示了AgentType.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: updateParameters

        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);
            }
        }
开发者ID:XyzalZhang,项目名称:behaviac,代码行数:13,代码来源:TimelineDock.cs

示例2: InspectObject

        private void InspectObject(AgentType agentType, string agentName, string agentFullname)
        {
            Nodes.Node node = null;
            if (agentType == null && !string.IsNullOrEmpty(agentFullname))
            {
                int frame = AgentDataPool.CurrentFrame > -1 ? AgentDataPool.CurrentFrame : 0;
                string behaviorFilename = FrameStatePool.GetBehaviorFilename(agentFullname, frame);
                List<string> highlightNodeIds = FrameStatePool.GetHighlightNodeIds(agentFullname, frame, behaviorFilename);
                List<string> updatedNodeIds = FrameStatePool.GetUpdatedNodeIds(agentFullname, frame, behaviorFilename);
                Dictionary<string, FrameStatePool.NodeProfileInfos.ProfileInfo> profileInfos = FrameStatePool.GetProfileInfos(frame, behaviorFilename);

                BehaviorNode behavior = UIUtilities.ShowBehaviorTree(agentFullname, frame, highlightNodeIds, updatedNodeIds, HighlightBreakPoint.Instance, profileInfos);
                node = behavior as Nodes.Node;
            }

            _agentType = agentType;
            _agentName = agentName;

            Hide();

            setText(agentType, agentName);
            parametersPanel.InspectObject(agentType, agentFullname, node);

            if (AgentDataPool.CurrentFrame > -1 && !string.IsNullOrEmpty(agentName))
            {
                List<AgentDataPool.ValueMark> valueSet = AgentDataPool.GetValidValues(node, agentType, agentFullname, AgentDataPool.CurrentFrame);
                foreach (AgentDataPool.ValueMark value in valueSet)
                {
                    SetProperty(agentType != null ? agentType.ToString() : null, agentName, value.Name, value.Value);
                }
            }

            lostAnyFocus();
            Show();
        }
开发者ID:KeyleXiao,项目名称:behaviac,代码行数:35,代码来源:ParametersDock.cs

示例3: setText

        private void setText(AgentType agentType, string agentName) {
            // Par
            if (agentType == null) {
                Text = TabText = string.IsNullOrEmpty(agentName) ? Resources.Pars : string.Format(Resources.ParsOf, agentName);
            }

            // Global
            else if (Plugin.IsGlobalInstanceAgentType(agentType)) {
                Text = TabText = string.Format(Resources.PropertiesOf, agentType.ToString());
            }

            // Agent
            else {
                Text = TabText = string.Format(Resources.PropertiesOf + "::{1}", agentType.ToString(), agentName);
            }
        }
开发者ID:675492062,项目名称:behaviac,代码行数:16,代码来源:ParametersDock.cs

示例4: updateParameters

        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);
            }
        }
开发者ID:Just4F,项目名称:behaviac,代码行数:20,代码来源:TimelineDock.cs


注:本文中的Behaviac.Design.AgentType.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。