本文整理匯總了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);
}