Browse Source

Force new portrait in Show to undimmed

Close #922
master
Steve Halliwell 3 years ago
parent
commit
8b217496af
  1. 1
      Assets/Fungus/Docs/CHANGELOG.txt
  2. 12
      Assets/Fungus/Scripts/Components/PortraitController.cs

1
Assets/Fungus/Docs/CHANGELOG.txt

@ -10,6 +10,7 @@ Unreleased
- SetNextLineFlag only flags if Dialog is actually active/writing. Thanks to breadnone. - SetNextLineFlag only flags if Dialog is actually active/writing. Thanks to breadnone.
- TextAdapter with TMPro, now forces mesh update on text change. Fixes cases where a Say/Writer would expect RevealedCharacters to be current but would be previous frame stale value. - TextAdapter with TMPro, now forces mesh update on text change. Fixes cases where a Say/Writer would expect RevealedCharacters to be current but would be previous frame stale value.
- Camera Fade clears local callback before execution, fixes #973. - Camera Fade clears local callback before execution, fixes #973.
- Force portraits undimmed on change sprite.
## Changed ## Changed
- Block will LogError when an exception is caught from a Command being Executed. - Block will LogError when an exception is caught from a Command being Executed.

12
Assets/Fungus/Scripts/Components/PortraitController.cs

@ -438,7 +438,17 @@ namespace Fungus
options.character.State.SetPortraitImageBySprite(options.portrait); options.character.State.SetPortraitImageBySprite(options.portrait);
options.character.State.portraitImage.rectTransform.gameObject.SetActive(true); options.character.State.portraitImage.rectTransform.gameObject.SetActive(true);
LeanTween.alpha(options.character.State.portraitImage.rectTransform, 1f, duration).setEase(stage.FadeEaseType).setRecursive(false);
if(options.character.State.portraitImage.color != Color.white)
{
LeanTween.color(options.character.State.portraitImage.rectTransform, Color.white, duration)
.setEase(stage.FadeEaseType)
.setRecursive(false);
}
LeanTween.alpha(options.character.State.portraitImage.rectTransform, 1f, duration)
.setEase(stage.FadeEaseType)
.setRecursive(false);
DoMoveTween(options); DoMoveTween(options);

Loading…
Cancel
Save