예제 #1
0
    private void OnMouseDown()
    {
        Vector2 touchPos = WPDragController.GetMousePos();

        touchOffset = new Vector2(touchPos.x - transform.position.x, touchPos.y - transform.position.y);

        touchDelegate(gameObject);
    }
예제 #2
0
    private void Start()
    {
        _tileSize = (float)Math.Floor((referenceScreenWidth - 2 * padding) / gridSize) / 75f;

        _wpDragController = new WPDragController(this, _tileSize);
        _map = GenerateTileMap(GenerateRandomIntegerMap());

        ScaleBackground();
        CheckFilledTiles();
    }
예제 #3
0
    private void OnMouseDrag()
    {
        Vector2 touchPos = WPDragController.GetMousePos();

        dragDelegate(touchPos);
    }