diff --git a/assets b/assets index c86e6ba78..8eb0b74b4 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit c86e6ba78e80a0fb7514ba2d662b6fd00d327a74 +Subproject commit 8eb0b74b4149190f32f8bfab38bfdefa709b849d diff --git a/source/funkin/play/GameOverSubState.hx b/source/funkin/play/GameOverSubState.hx index a3aeb4139..c5d9b4b0b 100644 --- a/source/funkin/play/GameOverSubState.hx +++ b/source/funkin/play/GameOverSubState.hx @@ -102,6 +102,9 @@ class GameOverSubState extends MusicBeatSubState cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1); cameraFollowPoint.x = boyfriend.getGraphicMidpoint().x; cameraFollowPoint.y = boyfriend.getGraphicMidpoint().y; + var offsets:Array = boyfriend.getDeathCameraOffsets(); + cameraFollowPoint.x += offsets[0]; + cameraFollowPoint.y += offsets[1]; add(cameraFollowPoint); FlxG.camera.target = null; diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 8b47e6ebd..048b6ed6e 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1641,7 +1641,7 @@ class PlayState extends MusicBeatSubState */ function onConversationComplete():Void { - isInCutscene = true; + isInCutscene = false; remove(currentConversation); currentConversation = null; diff --git a/source/funkin/play/character/BaseCharacter.hx b/source/funkin/play/character/BaseCharacter.hx index 71022c5df..5346ced61 100644 --- a/source/funkin/play/character/BaseCharacter.hx +++ b/source/funkin/play/character/BaseCharacter.hx @@ -188,6 +188,11 @@ class BaseCharacter extends Bopper shouldBop = false; } + public function getDeathCameraOffsets():Array + { + return _data.death?.cameraOffsets ?? [0.0, 0.0]; + } + /** * Gets the value of flipX from the character data. * `!getFlipX()` is the direction Boyfriend should face. diff --git a/source/funkin/play/character/CharacterData.hx b/source/funkin/play/character/CharacterData.hx index f1b316b7f..8be9f25c7 100644 --- a/source/funkin/play/character/CharacterData.hx +++ b/source/funkin/play/character/CharacterData.hx @@ -19,8 +19,10 @@ class CharacterDataParser * The current version string for the stage data format. * Handle breaking changes by incrementing this value * and adding migration to the `migrateStageData()` function. + * + * - Version 1.0.1 adds `death.cameraOffsets` */ - public static final CHARACTER_DATA_VERSION:String = '1.0.0'; + public static final CHARACTER_DATA_VERSION:String = '1.0.1'; /** * The current version rule check for the stage data format. @@ -603,6 +605,8 @@ typedef CharacterData = */ var healthIcon:Null; + var death:Null; + /** * The global offset to the character's position, in pixels. * @default [0, 0] @@ -695,3 +699,13 @@ typedef HealthIconData = */ var offsets:Null>; } + +typedef DeathData = +{ + /** + * The amount to offset the camera by while focusing on this character as they die. + * Default value focuses on the character's graphic midpoint. + * @default [0, 0] + */ + var ?cameraOffsets:Array; +}