本文整理匯總了C#中behaviac.BehaviorTask類的典型用法代碼示例。如果您正苦於以下問題:C# BehaviorTask類的具體用法?C# BehaviorTask怎麽用?C# BehaviorTask使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BehaviorTask類屬於behaviac命名空間,在下文中一共展示了BehaviorTask類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: copyto
public override void copyto(BehaviorTask target)
{
base.copyto(target);
Debug.Check(target is DecoratorCountTask);
DecoratorCountTask ttask = (DecoratorCountTask)target;
ttask.m_n = this.m_n;
}
示例2: copyto
public override void copyto(BehaviorTask target)
{
base.copyto(target);
Debug.Check(target is WaitforSignalTask);
WaitforSignalTask ttask = (WaitforSignalTask)target;
ttask.m_bTriggered = this.m_bTriggered;
}
示例3: copyto
public override void copyto(BehaviorTask target)
{
base.copyto(target);
Debug.Check(target is SelectorLoopTask);
SelectorLoopTask ttask = (SelectorLoopTask)target;
ttask.m_activeChildIndex = this.m_activeChildIndex;
}
示例4: IsValid
public override bool IsValid(Agent pAgent, BehaviorTask pTask)
{
if (!(pTask.GetNode() is DecoratorFailureUntil))
{
return false;
}
return base.IsValid(pAgent, pTask);
}
示例5: copyto
public override void copyto(BehaviorTask target)
{
base.copyto(target);
Debug.Check(target is WaitFramesTask);
WaitFramesTask ttask = (WaitFramesTask)target;
ttask.m_start = this.m_start;
ttask.m_frames = this.m_frames;
}
示例6: IsValid
public override bool IsValid(Agent pAgent, BehaviorTask pTask)
{
if (!(pTask.GetNode() is DecoratorAlwaysSuccess))
{
return false;
}
return base.IsValid(pAgent, pTask);
}
示例7: IsValid
public override bool IsValid(Agent pAgent, BehaviorTask pTask)
{
if (!(pTask.GetNode() is SelectorStochastic))
{
return false;
}
return base.IsValid(pAgent, pTask);
}
示例8: IsValid
public override bool IsValid(Agent pAgent, BehaviorTask pTask)
{
if (!(pTask.GetNode() is And))
{
return false;
}
return base.IsValid(pAgent, pTask);
}
示例9: copyto
public override void copyto(BehaviorTask target)
{
base.copyto(target);
Debug.Check(target is CompositeStochasticTask);
CompositeStochasticTask ttask = (CompositeStochasticTask)target;
ttask.m_set = this.m_set;
}
示例10: copyto
public override void copyto(BehaviorTask target)
{
base.copyto(target);
Debug.Check(target is DecoratorTimeTask);
DecoratorTimeTask ttask = (DecoratorTimeTask)target;
ttask.m_start = this.m_start;
ttask.m_time = this.m_time;
}
示例11: copyto
public override void copyto(BehaviorTask target)
{
base.copyto(target);
Debug.Check(target is WaitStateTask);
WaitStateTask ttask = (WaitStateTask)target;
ttask.m_start = this.m_start;
ttask.m_time = this.m_time;
}
示例12: IsValid
public override bool IsValid(Agent pAgent, BehaviorTask pTask)
{
if (!(pTask.GetNode() is Noop))
{
return false;
}
//used in unittest
//return base.IsValid(pAgent, pTask);
return true;
}
示例13: GetTickInfo
public static string GetTickInfo(Agent pAgent, BehaviorTask b, string action)
{
#if !BEHAVIAC_RELEASE
if (Config.IsLoggingOrSocketing)
{
if (pAgent != null && pAgent.IsMasked())
{
//BEHAVIAC_PROFILE("GetTickInfo", true);
string bClassName = b.GetClassNameString();
//filter out intermediate bt, whose class name is empty
if (!string.IsNullOrEmpty(bClassName))
{
int nodeId = b.GetId();
BehaviorTreeTask bt = pAgent != null ? pAgent.btgetcurrent() : null;
//TestBehaviorGroup\scratch.xml.EventetTask[0]:enter
string bpstr = "";
if (bt != null)
{
string btName = bt.GetName();
bpstr = string.Format("{0}.xml->", btName);
}
bpstr += string.Format("{0}[{1}]", bClassName, nodeId);
if (!string.IsNullOrEmpty(action))
{
bpstr += string.Format(":{0}", action);
}
return bpstr;
}
}
}
#endif
return string.Empty;
}
示例14: reset_handler
private static bool reset_handler(BehaviorTask node, Agent pAgent, object user_data)
{
node.m_status = EBTStatus.BT_INVALID;
node.onreset(pAgent);
node.SetCurrentTask(null);
return true;
}
示例15: SetRootTask
public void SetRootTask(BehaviorTask pRoot)
{
this.addChild(pRoot);
}