Guest User

Untitled

a guest
Jan 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public Point WorldToMapCell(Point worldPoint)
  2. {
  3. return WorldToMapCell(new Point((int)worldPoint.X, (int)worldPoint.Y));
  4. }
  5.  
  6. public MapCell GetCellAtWorldPoint(Point worldPoint)
  7. {
  8. Point mapPoint = WorldToMapCell(worldPoint);
  9. return Rows[mapPoint.Y].Columns[mapPoint.X];
  10. }
  11.  
  12. public MapCell GetCellAtWorldPoint(Vector2 worldPoint)
  13. {
  14. return GetCellAtWorldPoint(new Point((int)worldPoint.X, (int)worldPoint.Y));
  15. }
  16.  
  17. public int factorial(int x) {
  18. if (x == 0)
  19. return 1;
  20. else
  21. return x * factorial(x - 1);
  22.  
  23. public Point WorldToMapCell(Point worldPoint)
  24. {
  25. return WorldToMapCell(new Point((int)worldPoint.X, (int)worldPoint.Y));
  26. }
  27.  
  28. public Point WorldToMapCell(Point worldPoint)
  29. {
  30. return new Point((int)worldPoint.X, (int)worldPoint.Y);
  31. }
Add Comment
Please, Sign In to add comment