本文整理汇总了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);
}
}
示例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();
}
示例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);
}
}
示例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);
}
}