本文整理汇总了C#中Agent.GetVariable方法的典型用法代码示例。如果您正苦于以下问题:C# Agent.GetVariable方法的具体用法?C# Agent.GetVariable怎么用?C# Agent.GetVariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent.GetVariable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetFrames
protected override int GetFrames(Agent pAgent)
{
return pAgent.GetVariable<int>(4259617405u);
}
示例2: GetReferencedTree
public override string GetReferencedTree(Agent pAgent)
{
if (pAgent != null) {
return pAgent.GetVariable<string>(526556242u);
}
return null;
}
示例3: GetTime
protected override float GetTime(Agent pAgent)
{
Debug.Check(behaviac.Utils.MakeVariableId("parT_FireInterval") == 1636165819u);
return (int)pAgent.GetVariable(1636165819u);
}
示例4: GetValue
public object GetValue(Agent parent, Agent parHolder)
{
if (parent == null || m_bIsConst)
{
return this.GetDefaultValue();
}
else
{
if (this.m_memberBase != null)
{
#if !BEHAVIAC_RELEASE
ParentType pt = this.m_memberBase.GetParentType();
if (pt == ParentType.PT_INSTANCE)
{
Agent pInstance = Agent.GetInstance(this.GetInstanceNameString(), parHolder.GetContextId());
Debug.Check(Object.ReferenceEquals(pInstance, parHolder));
}
#endif//
if (this.m_pt == ParentType.PT_INSTANCE)
{
Agent pInstance = Agent.GetInstance(this.GetInstanceNameString(), parHolder.GetContextId());
parHolder = pInstance;
}
object pVariable = this.m_memberBase.Get(parHolder);
return pVariable;
}
else
{
return parHolder.GetVariable(this.m_varaibleName);
}
}
}
示例5: GetTime
protected override double GetTime(Agent pAgent)
{
return pAgent.GetVariable<int>(1636165819u);
}
示例6: GetFrames
protected override int GetFrames(Agent pAgent)
{
Debug.Check(behaviac.Utils.MakeVariableId("par_frame_count") == 4259617405u);
return pAgent.GetVariable<int>(4259617405u);
}