public override void Execute(SceneLogicInfo info, long deltaTime) { if (null == info || info.IsLogicFinished || info.IsLogicPaused) { return; } info.Time += deltaTime; if (info.Time > 1000) { TimeoutLogicInfo data = info.LogicDatas.GetData <TimeoutLogicInfo>(); if (null == data) { data = new TimeoutLogicInfo(); info.LogicDatas.AddData <TimeoutLogicInfo>(data); SceneLogicConfig sc = info.SceneLogicConfig; if (null != sc) { data.m_Timeout = long.Parse(sc.m_Params[0]); } } data.m_CurTime += info.Time; info.Time = 0; //执行逻辑 if (null != data && !data.m_IsTriggered && data.m_CurTime >= data.m_Timeout) { data.m_IsTriggered = true; SceneLogicSendStoryMessage(info, "timeout:" + info.ConfigId, data.m_Timeout); } } }
public SceneLogicInfo AddSceneLogicInfo(int id, SceneLogicConfig cfg) { SceneLogicInfo info = NewSceneLogicInfo(id); info.SceneContext = m_SceneContext; info.SceneLogicConfig = cfg; m_SceneLogicInfos.AddLast(info.GetId(), info); return info; }
internal SceneLogicInfo CreateSceneLogic(int infoId, int configId, int logicId, params string[] args) { SceneLogicConfig cfg = new SceneLogicConfig(); cfg.m_ConfigId = configId; cfg.m_LogicId = logicId; cfg.m_Params = args; SceneLogicInfo logicInfo = m_SceneLogicInfoMgr.AddSceneLogicInfo(infoId, cfg); return logicInfo; }
public SceneLogicInfo AddSceneLogicInfo(int id, SceneLogicConfig cfg) { SceneLogicInfo info = NewSceneLogicInfo(id); info.SceneContext = m_SceneContext; info.SceneLogicConfig = cfg; m_SceneLogicInfos.AddLast(info.GetId(), info); return(info); }
public SceneLogicInfo DelayAddSceneLogicInfo(int id, SceneLogicConfig cfg) { SceneLogicInfo info = NewSceneLogicInfo(id); info.SceneContext = m_SceneContext; info.SceneLogicConfig = cfg; m_DelayAdd.Add(info); return(info); }
public SceneLogicInfo CreateSceneLogic(int infoId, int configId, int logicId, params string[] args) { SceneLogicConfig cfg = new SceneLogicConfig(); cfg.m_ConfigId = configId; cfg.m_LogicId = logicId; cfg.m_Params = args; SceneLogicInfo logicInfo = m_SceneLogicInfoMgr.AddSceneLogicInfo(infoId, cfg); return(logicInfo); }
static public int get_m_Params(IntPtr l) { try { GameFramework.SceneLogicConfig self = (GameFramework.SceneLogicConfig)checkSelf(l); pushValue(l, true); pushValue(l, self.m_Params); return(2); } catch (Exception e) { return(error(l, e)); } }
internal int CreateSceneLogic(int configId, int logicId, params string[] args) { int id = 0; SceneLogicConfig cfg = new SceneLogicConfig(); cfg.m_ConfigId = configId; cfg.m_LogicId = logicId; cfg.m_Params = args; SceneLogicInfo logicInfo = m_SceneLogicInfoMgr.AddSceneLogicInfo(cfg); if (null != logicInfo) { id = logicInfo.GetId(); } return id; }
static public int constructor(IntPtr l) { try { GameFramework.SceneLogicConfig o; o = new GameFramework.SceneLogicConfig(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int set_m_Params(IntPtr l) { try { GameFramework.SceneLogicConfig self = (GameFramework.SceneLogicConfig)checkSelf(l); System.String[] v; checkArray(l, 2, out v); self.m_Params = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_m_LogicId(IntPtr l) { try { GameFramework.SceneLogicConfig self = (GameFramework.SceneLogicConfig)checkSelf(l); System.Int32 v; checkType(l, 2, out v); self.m_LogicId = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public int CreateSceneLogic(int configId, int logicId, params string[] args) { int id = 0; SceneLogicConfig cfg = new SceneLogicConfig(); cfg.m_ConfigId = configId; cfg.m_LogicId = logicId; cfg.m_Params = args; SceneLogicInfo logicInfo = m_SceneLogicInfoMgr.AddSceneLogicInfo(cfg); if (null != logicInfo) { id = logicInfo.GetId(); } return(id); }
public SceneLogicInfo DelayAddSceneLogicInfo(int id, SceneLogicConfig cfg) { SceneLogicInfo info = NewSceneLogicInfo(id); info.SceneContext = m_SceneContext; info.SceneLogicConfig = cfg; m_DelayAdd.Add(info); return info; }