Esempio n. 1
0
    public UIGhostJoystick(UIToolkit manager, Rect frame, int depth, UISprite joystickSprite)
        : base(frame, depth, UIUVRect.zero)
    {
        // Save out the uvFrame for the sprite so we can highlight
        _tempUVframe = joystickSprite.uvFrame;

        // Save the joystickSprite and make it a child of the us for organization purposes
        _joystickSprite = joystickSprite;
        _joystickSprite.parentUIObject = this;

        resetJoystick();

        manager.addTouchableSprite(this);
        _manager = manager;

        resolutionDivisor = UIRelative.pixelDensityMultiplier();
    }