本文整理汇总了C#中Sequence.addListNode方法的典型用法代码示例。如果您正苦于以下问题:C# Sequence.addListNode方法的具体用法?C# Sequence.addListNode怎么用?C# Sequence.addListNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sequence
的用法示例。
在下文中一共展示了Sequence.addListNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
initialPos = transform.position;
agent = GetComponent<NavMeshAgent>();
seekAllOtherPlayers();
InvokeRepeating("chooseATarget", 0, 1f);
#region startTree
Task taskSeePlayer = new Task(seePlayer);
Task taskCAnShoot = new Task(canIShoot);
Task taskShoot = new Task(shoot);
Task taskEsquive = new Task(esquive);
Task taskIsNear = new Task(isNear);
Task taskIdle = new Task(stay);
Task taskWalk = new Task(walk);
S1 = new Selector();
Selector S2 = new Selector();
Selector S3 = new Selector();
Sequence SE1 = new Sequence();
Sequence SE3 = new Sequence();
Sequence SE4 = new Sequence();
List<NodeTree> list1 = new List<NodeTree>();
list1.Add(taskIsNear);
list1.Add(taskIdle);
SE4.addListNode(list1);
List<NodeTree> list2 = new List<NodeTree>();
list2.Add(SE4);
list2.Add(taskWalk);
S3.addListNode(list2);
List<NodeTree> list3 = new List<NodeTree>();
list3.Add(taskCAnShoot);
list3.Add(taskShoot);
SE3.addListNode(list3);
List<NodeTree> list4 = new List<NodeTree>();
list4.Add(SE3);
list4.Add(taskEsquive);
S2.addListNode(list4);
List<NodeTree> list5 = new List<NodeTree>();
list5.Add(taskSeePlayer);
list5.Add(S2);
SE1.addListNode(list5);
List<NodeTree> list6 = new List<NodeTree>();
list6.Add(SE1);
list6.Add(S3);
S1.addListNode(list6);
#endregion
InvokeRepeating("checkTree", 0, 0.1f);
}