Skip to content

Commit

Permalink
Null safety (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
MAJigsaw77 authored Sep 25, 2024
1 parent bfe9998 commit b97b1e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit b97b1e1

Please sign in to comment.