🖼️Создание объекта (спрайта)

circle-exclamation

If you want to change the Texture of the sprite.

Example of Creating Sprite

// Making variable that we will use to access our sprite
private static SpriteObject player;

// Then when u want in code set it
player =  new SpriteObject(
    "Resources/Images/player_right.png", // Texture Path
    new Vector2f(100, 150), // Position  X  Y
    new Vector2f(100, 100), // Size      X  Y
    1,                      // ID        Uniqe
    true                    // Visible   boolean
);

Last updated