// Update is called once per frame void Update() { if (treeStatus != Node.Status.SUCCESS) { treeStatus = tree.Process(); } }
void Update() { Node.Status status = child.Tick(Time.deltaTime); if (status == Node.Status.Success) { } Debug.Log(status); }
// Update is called once per frame void FixedUpdate() { float distanceToPlayer = Vector3.Distance(player.transform.position, this.transform.position); if (treeStatus != Node.Status.SUCCESS) { treeStatus = tree.Process(); } if (distanceToPlayer > 10 && lonelyness < 1000) { lonelyness += 1; } if (distanceToPlayer < 10 && lonelyness > 0) { lonelyness -= 1; } SwitchAnimationState(currentState); }