LookAtFj.cs 512 B

1234567891011121314151617181920212223242526
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class LookAtFj : MonoBehaviour
  5. {
  6. public static LookAtFj Instance;
  7. private void Awake()
  8. {
  9. Instance = this;
  10. }
  11. // Start is called before the first frame update
  12. void Start()
  13. {
  14. }
  15. // Update is called once per frame
  16. void Update()
  17. {
  18. if(PlayerController.Instance)
  19. {
  20. this.transform.LookAt(PlayerController.Instance.transform);
  21. }
  22. }
  23. }