public void BindAdInterface(string placementName) { if (m_AdPlacementName == placementName) { return; } if (m_AdInterface != null) { m_AdInterface.adEventListener = null; m_AdInterface = null; } m_AdPlacementName = placementName; TDAdPlacement data = TDAdPlacementTable.GetData(m_AdPlacementName); if (data == null) { return; } if (!string.IsNullOrEmpty(data.adInterface0)) { m_AdInterface = AdsMgr.S.GetAdInterface(data.adInterface0); if (m_AdInterface != null) { m_AdInterface.adEventListener = this; } } }
private static void OnAddRow(TDAdPlacement memberInstance) { string key = memberInstance.id; if (m_DataCache.ContainsKey(key)) { Log.e(string.Format("Invaild, TDAdPlacementTable Id already exists {0}", key)); } else { m_DataCache.Add(key, memberInstance); m_DataList.Add(memberInstance); } }
public static void Parse(byte[] fileData) { m_DataCache.Clear(); m_DataList.Clear(); DataStreamReader dataR = new DataStreamReader(fileData); int rowCount = dataR.GetRowCount(); int[] fieldIndex = dataR.GetFieldIndex(TDAdPlacement.GetFieldHeadIndex()); #if (UNITY_STANDALONE_WIN) || UNITY_EDITOR || UNITY_STANDALONE_OSX dataR.CheckFieldMatch(TDAdPlacement.GetFieldHeadIndex(), "AdPlacementTable"); #endif for (int i = 0; i < rowCount; ++i) { TDAdPlacement memberInstance = new TDAdPlacement(); memberInstance.ReadRow(dataR, fieldIndex); OnAddRow(memberInstance); memberInstance.Reset(); CompleteRowAdd(memberInstance); } Log.i(string.Format("Parse Success TDAdPlacement")); }
static void CompleteRowAdd(TDAdPlacement tdData) { }
public AdPlacement(TDAdPlacement data) { m_Data = data; }