Advertisement
Guest User

Untitled

a guest
May 12th, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class TestScript : MonoBehaviour
  6. {
  7.  
  8. [SerializeField] static Transform testA;
  9. [SerializeField] LayerMask testB;
  10. public int num1 = 0;
  11.  
  12. Vector2 testC = new Vector2(testA.position.x, testA.position.y);
  13.  
  14. void OnDrawGizmosSelected()
  15. {
  16. Gizmos.color = Color.red;
  17. Gizmos.DrawWireSphere(testC, 2f);
  18.  
  19.  
  20. }
  21.  
  22. void Update()
  23. {
  24. Vector2 testC = new Vector2(testA.position.x, testA.position.y);
  25.  
  26. RaycastHit2D test1 = Physics2D.OverlapCircle(testC, 2f, testB);
  27. }
  28.  
  29.  
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement