From b97b1e162a59fddb0cea5d8eed7c458b5fe78d55 Mon Sep 17 00:00:00 2001 From: Mihai Alexandru <77043862+MAJigsaw77@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:09:31 +0000 Subject: [PATCH] Null safety (#2) --- source/flxgif/FlxGifBackdrop.hx | 5 +++-- source/flxgif/FlxGifSprite.hx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/flxgif/FlxGifBackdrop.hx b/source/flxgif/FlxGifBackdrop.hx index 02df9f7..2e0eb4a 100644 --- a/source/flxgif/FlxGifBackdrop.hx +++ b/source/flxgif/FlxGifBackdrop.hx @@ -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; /** * The Gif SpriteMap (warning: can be `null`). */ - public var map(default, null):GifMap; + public var map(default, null):Null; /** * Creates an instance of the `FlxGifBackdrop` class, used to create infinitely scrolling gif backgrounds. diff --git a/source/flxgif/FlxGifSprite.hx b/source/flxgif/FlxGifSprite.hx index 12d804b..1f62899 100644 --- a/source/flxgif/FlxGifSprite.hx +++ b/source/flxgif/FlxGifSprite.hx @@ -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; /** * The Gif SpriteMap (warning: can be `null`). */ - public var map(default, null):GifMap; + public var map(default, null):Null; /** * Creates a `FlxGifSprite` at a specified position with a specified gif.