12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using Sfs2X.Entities.Data;
- using UnityEngine;
- public class PlazaRoomMge : Regist
- {
- private class RoomData
- {
- #region Config
- private static string IDLabel = "i";
- private static string OwnerLabel = "o";
- private static string DurationLabel = "d";
- private static string MaxPlayerLabel = "m";
- private static string NameLabel = "n";
- private static string StartTimeLabel = "s";
- public int ID;
- public long Owner;
- public int Duration;
- public int MaxPlayer;
- public string Name;
- public DateTime StartTime;
- public bool IsSystemRoom;
- #endregion
- public RoomData(ISFSObject arg)
- {
- ID = arg.GetInt(IDLabel);
- Owner = arg.GetLong(OwnerLabel);
- Duration = arg.GetInt(DurationLabel);
- MaxPlayer = arg.GetInt(MaxPlayerLabel);
- Name = arg.GetUtfString(NameLabel);
- Debug.Log(arg.GetClass(StartTimeLabel).ToString());
- Debug.Log(arg.GetData(StartTimeLabel).ToString());
- //StartTime = DateTime.Parse();
- if (ID == 0)
- IsSystemRoom = true;
- Debug.Log(ID);
- Debug.Log(Owner);
- Debug.Log(Duration);
- Debug.Log(MaxPlayer);
- Debug.Log(Name);
- Debug.Log(StartTime);
- Debug.Log(IsSystemRoom);
- }
- }
- #region Config
- public static bool FilterEnabled;
-
- #endregion
- public override void RegistValueA()
- {
- DatabaseManager.OnReceiveRoomData += OnReceiveRoomData;
- DatabaseManager.GetRoomList(0);
- }
- public static void OnReceiveRoomData(ISFSArray sfsArray)
- {
- for (int i = 0; i < sfsArray.Count; i++)
- {
- new RoomData(sfsArray.GetSFSObject(i));
- }
- }
- public static void OpenPanel()
- {
- ManaReso.Get("Z_BK").TweenForCG();
- }
- public static void ClosePanel()
- {
- ManaReso.Get("Z_BK").TweenBacCG();
- }
- public static void EnableFilter()
- {
- FilterEnabled = true;
- ManaReso.SetActive("Z_InfoImg51", true);
- }
- public static void DisableFilter()
- {
- FilterEnabled = false;
- ManaReso.SetActive("Z_InfoImg51", false);
- }
- }
|