50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using ModelRenderer.Scripts.GameData;
|
|
using PerfectWorld.Scripts.Task;
|
|
using UnityEngine;
|
|
namespace BrewMonster.Network
|
|
{
|
|
public class EC_Game
|
|
{
|
|
#region Fields
|
|
private static ATaskTemplMan m_pTaskMan; // Task template manager
|
|
private static elementdataman m_pElementDataMan; // global element templates manager
|
|
private static CECGameRun m_pGameRun; // Game running object
|
|
|
|
CECStringTab m_FixedMsgs; // Fixed message table
|
|
CECStringTab m_ItemDesc; // Item desciption string table
|
|
CECStringTab m_ItemExtDesc; // Item extend description string table
|
|
CECStringTab m_SkillDesc; // Skill description string table
|
|
CECStringTab m_BuffDesc; // Buff description string table
|
|
#endregion
|
|
|
|
#region Properties
|
|
public static ATaskTemplMan GetTaskTemplateMan() { return m_pTaskMan; }
|
|
public static elementdataman GetElementDataMan() { return m_pElementDataMan; }
|
|
#endregion
|
|
|
|
#region Public Methods
|
|
public static bool Init()
|
|
{
|
|
m_pElementDataMan = elementdataman.Instance;
|
|
|
|
// Load task templates
|
|
if (m_pTaskMan == null) m_pTaskMan = new ATaskTemplMan();
|
|
|
|
m_pTaskMan.Init(m_pElementDataMan);
|
|
if (!m_pTaskMan.InitStorageTask())
|
|
{
|
|
Debug.LogError("[Dat]- CECGame::Init, Storage task Init Failed!");
|
|
return false;
|
|
}
|
|
m_pGameRun = new CECGameRun();
|
|
if (m_pGameRun == null)
|
|
{
|
|
BMLogger.LogError("CECGame::Init");
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
public static CECGameRun GetGameRun() { return m_pGameRun; }
|
|
#endregion
|
|
}
|
|
} |