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