Eonirr

Untitled

Apr 11th, 2025 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. float totalSizeX = 300f;
  2. int nbSlotX = 4;
  3.  
  4. float slotSizeX = totalSizeX / nbSlotX;
  5. float center = totalSizeX / 2f;
  6.  
  7. float slot1Start = -center;
  8. Vector2 slot1SurfaceX = new Vector2(slot1Start ,slot1Start + slotSizeX);
  9.  
  10. float slot1EndSurface = slot1Start + slotSizeX;
  11. Vector2 slot2SurfaceX = new Vector2(slot1EndSurface, sslot1EndSurface + slotSizeX);
  12.  
  13.  
  14.  
  15.  
  16.  
Advertisement
Add Comment
Please, Sign In to add comment