update Task: complete read task templ, log task name and description on UI, add sprites asset
This commit is contained in:
@@ -1,7 +1,38 @@
|
||||
namespace BrewMonster
|
||||
using System.Collections.Generic;
|
||||
using BrewMonster.Network;
|
||||
using CSNetwork;
|
||||
using CSNetwork.GPDataType;
|
||||
|
||||
// Game runtime partial class
|
||||
partial class CECGameRun : IMsgHandler
|
||||
{
|
||||
public class CECGameRun_Task
|
||||
{
|
||||
private readonly Dictionary<int, int> m_CommonDataTab = new Dictionary<int, int>();
|
||||
|
||||
public int GetCommonData(int key)
|
||||
{
|
||||
// Lookup a common data value by key
|
||||
// 按键查找通用数据值
|
||||
if (m_CommonDataTab != null && m_CommonDataTab.TryGetValue(key, out var value))
|
||||
return value;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
private CECCounter l_QueryServerTime = new CECCounter(); // ��ѯ��������ǰʱ��
|
||||
|
||||
public int HandlerId => -1;
|
||||
public bool ProcessMessage(ECMSG Msg)
|
||||
{
|
||||
switch (Msg.dwMsg)
|
||||
{
|
||||
case CommandID.SERVER_TIME:
|
||||
|
||||
EC_Game.SetServerTime((int)Msg.dwParam1, (int)Msg.dwParam2);
|
||||
l_QueryServerTime.Reset();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user