X Tutup
Skip to content

background: fix loading background along with scene#154

Open
yookoala wants to merge 3 commits intoMonogatari:developfrom
yookoala:fix/background-gameslot-loading
Open

background: fix loading background along with scene#154
yookoala wants to merge 3 commits intoMonogatari:developfrom
yookoala:fix/background-gameslot-loading

Conversation

@yookoala
Copy link
Contributor

@yookoala yookoala commented Mar 25, 2022

Why this PR is needed?

To reproduce my issue

  1. Create a script with scene and background together, for example:
    monogatari.script ({
    // The game starts here.
    'Start': [
    	'show scene #555555 with fadeIn',
    	'show background phone.jpg with fadeIn',
    	'Hello.',
    	'Time to test saving',
    	'After save',
         ],
    });
  2. Run the game.
  3. When you see "Hello.", save the game.
  4. After save, simply load the newly saved game.

Expected behaviour

See the word "Hello" with the background "phone.jpg".

Actual behaviour

See the word "Hello" with the background color #555555. No phone.jpg.

What this PR does?

  • Background should be of higher priority than scene. So the presents
    of Scene should not prevent Background from taking effect.

* Background should be of higher priority than scene. So the presents
  of Scene should not prevent Background from taking effect.
@yookoala
Copy link
Contributor Author

I'm not 100% sure about this. The original scene variable check might be doing something essential. But it did fix the problem for me.

* Fix the warning for "context", "cy" and etc. marked as undefined
  by eslint.
* Correctly display background image if not loaded by show scene.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

X Tutup