36 lines
771 B (Stored with Git LFS)
C#
36 lines
771 B (Stored with Git LFS)
C#
using UnityEngine;
|
|
using UnityEngine.Polybrush;
|
|
|
|
public class ModeManager : SLGameComponent
|
|
{
|
|
public override void Begin()
|
|
{
|
|
SLGame.AddNotify("CurrentMode", OnChangeMode);
|
|
}
|
|
|
|
private void OnChangeMode()
|
|
{
|
|
var currentMode = SLGame.Session["CurrentMode"];
|
|
|
|
if (currentMode == "Title")
|
|
{
|
|
SLGame.ActiveComponent("Title", true);
|
|
}
|
|
|
|
if (currentMode == "Restaurant")
|
|
{
|
|
// TODO: 현재 모드 기억해놨다가 지우기
|
|
SLGame.ActiveComponent("Title", false);
|
|
SLGame.ActiveComponent("Restaurant", true);
|
|
// TODO: 씬을 바꿔준다
|
|
}
|
|
}
|
|
|
|
public override void End()
|
|
{
|
|
}
|
|
|
|
public override void Update()
|
|
{
|
|
}
|
|
} |