mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-27 07:47:59 +01:00
32 lines
767 B
C#
32 lines
767 B
C#
using Fie.Manager;
|
|
using Fie.Scene;
|
|
using HutongGames.PlayMaker;
|
|
|
|
namespace Fie.PlayMaker
|
|
{
|
|
[ActionCategory("Friendship is Epic")]
|
|
public class FieTitleActionForPlaymaker : FsmStateAction
|
|
{
|
|
public float fadeTime;
|
|
|
|
[RequiredField]
|
|
public FsmEvent EventToSend;
|
|
|
|
private FieSceneManager.FieLoadingSceneJob _loadSceneJob;
|
|
|
|
public override void OnEnter()
|
|
{
|
|
_loadSceneJob = FieManagerBehaviour<FieSceneManager>.I.LoadScene(new FieSceneLobby(), allowSceneActivation: false, FieFaderManager.FadeType.OUT_TO_WHITE, FieFaderManager.FadeType.IN_FROM_WHITE, fadeTime);
|
|
}
|
|
|
|
public override void OnUpdate()
|
|
{
|
|
if (_loadSceneJob.isDoneLoading)
|
|
{
|
|
_loadSceneJob.allowSceneActivation = true;
|
|
base.Fsm.Event(EventToSend);
|
|
Finish();
|
|
}
|
|
}
|
|
}
|
|
}
|