62 lines
1.3 KiB
C#
62 lines
1.3 KiB
C#
using UnityEngine;
|
|
|
|
public class SleepMode : MyCoroutine
|
|
{
|
|
public static bool IsActive;
|
|
|
|
int dot = 0;
|
|
float dotTime = 0.5f, serversavetime = 300f;
|
|
bool IsFarm;
|
|
|
|
public void Set()
|
|
{
|
|
IsActive = true;
|
|
gameObject.SetActive(true);
|
|
LoadMapMgr.Ins.SetActive_Map(false);
|
|
Update();
|
|
dotTime = 0.5f;
|
|
serversavetime = 300f;
|
|
IsFarm = InGameInfo.Ins.IsGameMode(eGameMode.MyFarm);
|
|
if (IsFarm)
|
|
{
|
|
//labels[1].text = "마이팜";
|
|
dot = 0;
|
|
}
|
|
else
|
|
{
|
|
}
|
|
|
|
SoundInfo.Ins.Active_Sound(false);
|
|
}
|
|
void Update()
|
|
{
|
|
serversavetime -= Time.deltaTime;
|
|
if (serversavetime <= 0f)
|
|
{
|
|
serversavetime = 300f;
|
|
ServerInfo.Ins.Write(null, false);
|
|
}
|
|
}
|
|
|
|
public void OnClick_BangChi()
|
|
{
|
|
Set();
|
|
}
|
|
|
|
public void OnClick_Close()
|
|
{
|
|
if (!MyValue.m_RealCamera.IsEnter())
|
|
{ // 카메라 연출 도중에 끄면 빈맵이 보인다.
|
|
IsActive = false;
|
|
gameObject.SetActive(false);
|
|
if (InGameInfo.Ins.IsGameMode(eGameMode.Stage))
|
|
{
|
|
}
|
|
else
|
|
{
|
|
LoadMapMgr.Ins.SetActive_Map(true);
|
|
SoundInfo.Ins.Active_Sound(true);
|
|
}
|
|
}
|
|
}
|
|
} |