BehaviorController.cs 642 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace EnemyAI
  4. {
  5. public class BehaviorController
  6. {
  7. public Blackboard blackboard;
  8. internal enum Behaviors {RechargeBehavior, ChaseBehavior}
  9. private EnemyAI.Behavior currentBehavior;
  10. public BehaviorController()
  11. {
  12. blackboard = new Blackboard();
  13. currentBehavior = new RechargeBehavior();
  14. }
  15. public void Update()
  16. {
  17. EnemyAI.Result result = currentBehavior.Run(ref blackboard);
  18. switch (result)
  19. {
  20. }
  21. }
  22. }
  23. }