Browse Source

Add ease

master
lealeelu 8 years ago
parent
commit
b083bb0c7f
  1. 2
      Assets/Fungus/Resources/Prefabs/SaveMenu.prefab
  2. 10
      Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs
  3. 8
      Assets/Fungus/Scripts/Components/SaveMenu.cs
  4. 5644
      Assets/FungusExamples/Conversation/Say History.unity

2
Assets/Fungus/Resources/Prefabs/SaveMenu.prefab

@ -2255,7 +2255,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 224813276203911662}
m_Direction: 2
m_Value: 1
m_Size: 0.9840466
m_Size: 0.92140794
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:

10
Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs

@ -149,20 +149,26 @@ namespace Fungus
if (narrativeLogActive)
{
// Switch menu off
LeanTween.value(narrativeLogMenuGroup.gameObject, narrativeLogMenuGroup.alpha, 0f, 0.2f).setOnUpdate((t) => {
LeanTween.value(narrativeLogMenuGroup.gameObject, narrativeLogMenuGroup.alpha, 0f, .2f)
.setEase(LeanTweenType.easeOutQuint)
.setOnUpdate((t) => {
narrativeLogMenuGroup.alpha = t;
}).setOnComplete(() => {
narrativeLogMenuGroup.alpha = 0f;
});
}
else
{
// Switch menu on
LeanTween.value(narrativeLogMenuGroup.gameObject, narrativeLogMenuGroup.alpha, 1f, 0.2f).setOnUpdate((t) => {
LeanTween.value(narrativeLogMenuGroup.gameObject, narrativeLogMenuGroup.alpha, 1f, .2f)
.setEase(LeanTweenType.easeOutQuint)
.setOnUpdate((t) => {
narrativeLogMenuGroup.alpha = t;
}).setOnComplete(() => {
narrativeLogMenuGroup.alpha = 1f;
});
}
narrativeLogActive = !narrativeLogActive;

8
Assets/Fungus/Scripts/Components/SaveMenu.cs

@ -196,7 +196,9 @@ namespace Fungus
if (saveMenuActive)
{
// Switch menu off
LeanTween.value(saveMenuGroup.gameObject, saveMenuGroup.alpha, 0f, 0.2f).setOnUpdate( (t) => {
LeanTween.value(saveMenuGroup.gameObject, saveMenuGroup.alpha, 0f, 0.2f)
.setEase(LeanTweenType.easeOutQuint)
.setOnUpdate( (t) => {
saveMenuGroup.alpha = t;
}).setOnComplete( () => {
saveMenuGroup.alpha = 0f;
@ -205,7 +207,9 @@ namespace Fungus
else
{
// Switch menu on
LeanTween.value(saveMenuGroup.gameObject, saveMenuGroup.alpha, 1f, 0.2f).setOnUpdate( (t) => {
LeanTween.value(saveMenuGroup.gameObject, saveMenuGroup.alpha, 1f, 0.2f)
.setEase(LeanTweenType.easeOutQuint)
.setOnUpdate( (t) => {
saveMenuGroup.alpha = t;
}).setOnComplete( () => {
saveMenuGroup.alpha = 1f;

5644
Assets/FungusExamples/Conversation/Say History.unity

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save