Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null safety #2

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions source/flxgif/FlxGifBackdrop.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ import openfl.utils.ByteArray;
/**
* `FlxGifBackdrop` is made for showing infinitely scrolling gif backgrounds using FlxBackdrop.
*/
@:nullSafety
class FlxGifBackdrop extends FlxBackdrop
{
/**
* The Gif Player (warning: can be `null`).
*/
public var player(default, null):GifPlayer;
public var player(default, null):Null<GifPlayer>;

/**
* The Gif SpriteMap (warning: can be `null`).
*/
public var map(default, null):GifMap;
public var map(default, null):Null<GifMap>;

/**
* Creates an instance of the `FlxGifBackdrop` class, used to create infinitely scrolling gif backgrounds.
Expand Down
5 changes: 3 additions & 2 deletions source/flxgif/FlxGifSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ import openfl.utils.ByteArray;
/**
* `FlxGifSprite` is made for displaying gif files in HaxeFlixel as sprites.
*/
@:nullSafety
class FlxGifSprite extends FlxSprite
{
/**
* The Gif Player (warning: can be `null`).
*/
public var player(default, null):GifPlayer;
public var player(default, null):Null<GifPlayer>;

/**
* The Gif SpriteMap (warning: can be `null`).
*/
public var map(default, null):GifMap;
public var map(default, null):Null<GifMap>;

/**
* Creates a `FlxGifSprite` at a specified position with a specified gif.
Expand Down