本文整理汇总了C#中Behave.Runtime.Tree类的典型用法代码示例。如果您正苦于以下问题:C# Tree类的具体用法?C# Tree怎么用?C# Tree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tree类属于Behave.Runtime命名空间,在下文中一共展示了Tree类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TickKickBallAction
public BehaveResult TickKickBallAction(BLTree sender)
{
Debug.Log("Kick Ball");
ball.rigidbody.AddForceAtPosition(Vector3.forward * 100,ball.transform.position);
return BehaveResult.Success;
}
开发者ID:Tairos,项目名称:PFP,代码行数:7,代码来源:Kicker.cs
示例2: TickAccelAction
public BehaveResult TickAccelAction(Tree sender)
{
//Debug.Log ("Ticked Accel Action");
//Accelerate the ship if necessary
if(aiShip.Thrust < 10.0f &&
((Vector3.Distance(aiShip.transform.position, playerShip.transform.position) > aiShip.DesiredDistance + 10) ||
(Vector3.Distance(aiShip.transform.position, playerShip.transform.position) < aiShip.DesiredDistance - 10)))
{
aiShip.DesiredThrust = 10.0f;
//Debug.Log("Thrust set!");
}
else
{
//Debug.Log(aiShip.name);
//Debug.Log (playerShip.name);
aiShip.DesiredThrust = playerShip.transform.GetComponent<ShipController>().DesiredThrust;
//Debug.Log(aiShip.DesiredThrust);
}
if(aiShip.Moving)
{
return BehaveResult.Running;
}
else
{
return BehaveResult.Success;
}
}
开发者ID:jacobsky,项目名称:Spaceships-go-Zoom_repo,代码行数:27,代码来源:DemoAgent.cs
示例3: TickEstoyApuntadoAction
public BehaveResult TickEstoyApuntadoAction(Tree sender)
{
Debug.Log ("Estoy apuntado?: "+ agente.estoyApuntado());
if (agente.estoyApuntado())
return BehaveResult.Success;
else
return BehaveResult.Failure;
}
开发者ID:volpejoaquin,项目名称:Tesis,代码行数:8,代码来源:ComportamientoSoldado.cs
示例4: TickIsGrabOutOfRangeAction
//SEEK
public BehaveResult TickIsGrabOutOfRangeAction(Tree sender)
{
if (wbc.IsGrabOutOfRange())
{
return BehaveResult.Success;
}
return BehaveResult.Failure;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:9,代码来源:WBCAIScript.cs
示例5: TickApuntarAction
/*----Condicion--------------------------------*/
public BehaveResult TickApuntarAction(Tree sender)
{
Debug.Log ("Apuntar enemigo?: "+ agente.enemigoApuntado());
if (agente.enemigoApuntado())
return BehaveResult.Success;
else
return BehaveResult.Failure;
}
开发者ID:volpejoaquin,项目名称:Tesis,代码行数:9,代码来源:ComportamientoSoldado.cs
示例6: TickFreeTargetsAction
public BehaveResult TickFreeTargetsAction(Tree sender)
{
if (wbc.DetectsFreeTargets())
{
return BehaveResult.Success;
}
return BehaveResult.Failure;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:9,代码来源:WBCAIScript.cs
示例7: TickIdleAction
public BehaveResult TickIdleAction(Tree sender)
{
if (wbc.DetectsFreeTargets())
{
return BehaveResult.Success;
}
return BehaveResult.Running;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:9,代码来源:WBCAIScript.cs
示例8: TickIsInfectedAction
public BehaveResult TickIsInfectedAction(Tree sender)
{
if (rbc.IsInfected())
{
return BehaveResult.Success;
}
return BehaveResult.Failure;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:9,代码来源:RBCAIScript.cs
示例9: TickIsAttachedAction
//DAMAGE
public BehaveResult TickIsAttachedAction(Tree sender)
{
if (wbc.IsAttached())
{
return BehaveResult.Success;
}
return BehaveResult.Failure;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:10,代码来源:WBCAIScript.cs
示例10: TickDamageOverTimeAction
public BehaveResult TickDamageOverTimeAction(Tree sender)
{
if (wbc.IsAttachedTargetDead())
{
return BehaveResult.Failure;
}
return BehaveResult.Running;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:9,代码来源:WBCAIScript.cs
示例11: TickIdleAction
public BehaveResult TickIdleAction(Tree sender)
{
if (rbc.IsInfected() || rbc.IsKilled())
{
return BehaveResult.Success;
}
return BehaveResult.Running;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:9,代码来源:RBCAIScript.cs
示例12: Tick
public BehaveResult Tick(Tree sender, bool init)
{
Debug.Log("Ticked Received by unhandled " +
(BLNewBehaveLibrary0.IsAction(sender.ActiveID) ? "Action " :
"Decorator ") +
" ... " + (BLNewBehaveLibrary0.IsAction(sender.ActiveID) ?
((BLNewBehaveLibrary0.ActionType)sender.ActiveID).ToString() :
((BLNewBehaveLibrary0.DecoratorType)sender.ActiveID).ToString()));
return BehaveResult.Success;
}
开发者ID:Tiakiana,项目名称:Kingdomizer3,代码行数:10,代码来源:AIAgent.cs
示例13: Start
//Dette er grundstenen i Behave. I stedet for BLNewBehaveLibrary, skriver man sit eget navn
IEnumerator Start()
{
m_Tree = BLNewBehaveLibrary0.InstantiateTree(
BLNewBehaveLibrary0.TreeType.HeroAI1_NewTree1, this);
while (Application.isPlaying && m_Tree != null)
{
yield return new WaitForSeconds(1 / m_Tree.Frequency);
AIUpdate();
}
}
开发者ID:Tiakiana,项目名称:Kingdomizer3,代码行数:12,代码来源:AIAgent.cs
示例14: Start
IEnumerator Start()
{
m_tree = BLSimple.InstantiateTree(BLSimple.TreeType.SimpleCollection_SimpleTree,this);
while(Application.isPlaying && m_tree != null)
{
AIUpdate();
yield return new WaitForSeconds(1 / m_tree.Frequency);
}
}
开发者ID:Tairos,项目名称:PFP,代码行数:11,代码来源:AITest.cs
示例15: Tick
public BehaveResult Tick(Tree sender, bool init)
{
//Shows up if there is an action or decorator that is unhandled in code.
Debug.Log("Got ticked by unhandled " +
(BLAIDemo.IsAction(sender.ActiveID) ? "action " : "decorator ") +
(BLAIDemo.IsAction(sender.ActiveID) ?
((BLAIDemo.ActionType)sender.ActiveID).ToString()
:
((BLAIDemo.DecoratorType)sender.ActiveID).ToString()
)
);
return BehaveResult.Success;
}
开发者ID:jacobsky,项目名称:Spaceships-go-Zoom_repo,代码行数:13,代码来源:DemoAgent.cs
示例16: TickInfectedAction
public BehaveResult TickInfectedAction(Tree sender)
{
if (rbc.CheckShouldExplode())
{
return BehaveResult.Success;
}
if (rbc.IsKilled())
{
return BehaveResult.Failure;
}
return BehaveResult.Running;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:14,代码来源:RBCAIScript.cs
示例17: TickSeekAction
public BehaveResult TickSeekAction(Tree sender)
{
if (!wbc.IsGrabOutOfRange())
{
return BehaveResult.Failure;
}
if (wbc.IsAttachedTargetDead())
{
return BehaveResult.Success;
}
return BehaveResult.Running;
}
开发者ID:coastwise,项目名称:ggj2013,代码行数:14,代码来源:WBCAIScript.cs
示例18: Tick
public BehaveResult Tick(Tree sender, bool init)
{
Debug.Log(
"Tick" +
(BLNewBehaveLibrary0.IsAction(sender.ActiveID) ? " action " : " decorator ") +
(BLNewBehaveLibrary0.IsAction(sender.ActiveID) ?
((BLNewBehaveLibrary0.ActionType)sender.ActiveID).ToString()
:
((BLNewBehaveLibrary0.DecoratorType)sender.ActiveID).ToString()
)
);
return BehaveResult.Success;
}
开发者ID:volpejoaquin,项目名称:Tesis,代码行数:14,代码来源:ComportamientoSoldado.cs
示例19: Start
IEnumerator Start()
{
m_Tree = BLNewBehaveLibrary0.InstantiateTree(
BLNewBehaveLibrary0.TreeType.HeroAI1_NewTree1, this);
stats = gameObject.GetComponent<AIStats>();
stats.distanceToTarget = 10;
stats.fatigue = 100;
stats.oreCap = 150;
while (Application.isPlaying && m_Tree != null)
{
yield return new WaitForSeconds(1 / m_Tree.Frequency);
AIUpdate();
}
}
开发者ID:Tiakiana,项目名称:Coinz,代码行数:15,代码来源:TownieBehave.cs
示例20: TickGoToBallAction
public BehaveResult TickGoToBallAction(BLTree sender)
{
if(!hitBall)
{
Debug.Log("GotoBall");
moveVector = ball.transform.position - transform.position;
moveVector.Normalize();
transform.position += moveVector * Time.deltaTime * chaseMoveSpeed;
return BehaveResult.Running;
}
else
{
return BehaveResult.Success;
}
}
开发者ID:Tairos,项目名称:PFP,代码行数:15,代码来源:Kicker.cs
注:本文中的Behave.Runtime.Tree类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论