StationAI.cs 400 B

1234567891011121314151617181920212223242526272829303132333435
  1. using UnityEngine;
  2. using System.Collections;
  3. public class StationAI : AI
  4. {
  5. override protected void Start ()
  6. {
  7. base.Start ();
  8. SetPlayer (new Player ());
  9. }
  10. protected Station owner
  11. {
  12. get{
  13. return _owner as Station;
  14. }
  15. }
  16. void FixedUpdate ()
  17. {
  18. if(!CanSendMessage())
  19. {
  20. return;
  21. }
  22. if(battleController.isGameOver || owner.IsDead())
  23. {
  24. return;
  25. }
  26. CheckDead();
  27. }
  28. }