49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class MenuBase : BackKeyAdd
|
||
|
|
{
|
||
|
|
public bool OffMap = true;
|
||
|
|
public GameObject[] gos_tab_on, gos_tab_off;
|
||
|
|
public GameObject[] gos_contents, gos_noti;
|
||
|
|
|
||
|
|
public int CurTab { get; protected set; }
|
||
|
|
public override void Set()
|
||
|
|
{
|
||
|
|
base.Set();
|
||
|
|
Set_Tab();
|
||
|
|
Set_Contents();
|
||
|
|
Set_Label();
|
||
|
|
if (OffMap) LoadMapMgr.Ins.SetActive_Map(false);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected virtual void Set_Tab()
|
||
|
|
{
|
||
|
|
DSUtil.InActivateGameObjects(gos_tab_on, CurTab);
|
||
|
|
DSUtil.ActivateGameObjects(gos_tab_off, CurTab);
|
||
|
|
Set_Noti();
|
||
|
|
}
|
||
|
|
protected virtual void Set_Contents()
|
||
|
|
{
|
||
|
|
DSUtil.InActivateGameObjects(gos_contents, CurTab);
|
||
|
|
}
|
||
|
|
public virtual void Set_Noti() { }
|
||
|
|
|
||
|
|
public virtual void OnClick_Tab(GameObject _go)
|
||
|
|
{
|
||
|
|
CurTab = int.Parse(_go.name);
|
||
|
|
Set_Tab();
|
||
|
|
Set_Contents();
|
||
|
|
}
|
||
|
|
|
||
|
|
public virtual void Set_Label() { }
|
||
|
|
public override void OnClick_Back()
|
||
|
|
{
|
||
|
|
base.OnClick_Back();
|
||
|
|
if (OffMap) LoadMapMgr.Ins.SetActive_Map(true);
|
||
|
|
GameUI.Ins.LobbyUI.Set_Noti();
|
||
|
|
}
|
||
|
|
|
||
|
|
public void Off() { gameObject.SetActive(false); }
|
||
|
|
}
|