CannonFireBehavior.cs 585 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.Assertions;
  5. public class CannonFireBehavior : MonoBehaviour
  6. {
  7. [SerializeField] public CannonController CannonParent;
  8. // Start is called before the first frame update
  9. void Start()
  10. {
  11. Debug.Assert(CannonParent);
  12. }
  13. // Update is called once per frame
  14. void Update()
  15. {
  16. }
  17. public void CannonFire()
  18. {
  19. CannonParent.CannonFireAtPosition();
  20. }
  21. public void ExitCannonFire()
  22. {
  23. CannonParent.ExitShot();
  24. }
  25. }