mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-05-20 22:22:28 +00:00
Error handling for frame buffer
This commit is contained in:
parent
a0df87c6b2
commit
ce0860fc18
|
@ -53,6 +53,11 @@ class FrameBufferManager
|
|||
*/
|
||||
public function copySpriteTo(name:String, sprite:FlxSprite, color:Null<FlxColor> = null):Void
|
||||
{
|
||||
if (!frameBufferMap.exists(name))
|
||||
{
|
||||
FlxG.log.warn('frame buffer "$name" does not exist');
|
||||
return;
|
||||
}
|
||||
frameBufferMap[name].addSpriteCopy(new SpriteCopy(sprite, color));
|
||||
}
|
||||
|
||||
|
@ -63,6 +68,11 @@ class FrameBufferManager
|
|||
*/
|
||||
public function moveSpriteTo(name:String, sprite:FlxSprite):Void
|
||||
{
|
||||
if (!frameBufferMap.exists(name))
|
||||
{
|
||||
FlxG.log.warn('frame buffer "$name" does not exist');
|
||||
return;
|
||||
}
|
||||
frameBufferMap[name].moveSprite(sprite);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue