*
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public abstract class AiComposite : AiBehavior {
|
||||
public AiBehavior[] children;
|
||||
|
||||
public void Add(AiBehavior behavior) {
|
||||
if (children == null || children.Length == 0) {
|
||||
children = new AiBehavior[1];
|
||||
children[0] = behavior;
|
||||
}
|
||||
else {
|
||||
Array.Resize(ref children, children.Length + 1);
|
||||
children[children.Length - 1] = behavior;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user