示例#1
0
    // Use this for initialization
    void Start()
    {
        randomBehaviour = gameObject.GetComponent <RandomBehaviour>();
        if (randomBehaviour == null)
        {
            Debug.LogError("cannot find random behaviour on game behaviour");
        }

        spawns = GameObject.FindGameObjectsWithTag("Respawn");
        if (spawns.Length == 0)
        {
            Debug.LogError("cannot find respawn objects");
        }
    }
示例#2
0
 public static T SetBehaviour <T>(this T entity, RandomBehaviour value)
     where T : BehaviorModeDescription
 {
     entity.SetField("behaviour", value);
     return(entity);
 }
示例#3
0
 public PNJ(RandomBehaviour randomBehaviour)
 {
     this.randomBehaviour = randomBehaviour;
     this.next();
 }