private void OnMouseDown() { Vector2 touchPos = WPDragController.GetMousePos(); touchOffset = new Vector2(touchPos.x - transform.position.x, touchPos.y - transform.position.y); touchDelegate(gameObject); }
private void Start() { _tileSize = (float)Math.Floor((referenceScreenWidth - 2 * padding) / gridSize) / 75f; _wpDragController = new WPDragController(this, _tileSize); _map = GenerateTileMap(GenerateRandomIntegerMap()); ScaleBackground(); CheckFilledTiles(); }
private void OnMouseDrag() { Vector2 touchPos = WPDragController.GetMousePos(); dragDelegate(touchPos); }