备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using ThinkingSDK.PC.Time;
namespace ThinkingSDK.PC.DataModel
{
public abstract class ThinkingSDKBaseData
{
// event type
private string mType;
// event time
private ThinkingSDKTimeInter mTime;
// distinct ID
private string mDistinctID;
// event name
private string mEventName;
// account ID
private string mAccountID;
// unique ID for the event
private string mUUID;
private Dictionary<string, object> mProperties = new Dictionary<string, object>();
public Dictionary<string, object> Properties()
{
return mProperties;
}
public void SetEventName(string eventName)
{
this.mEventName = eventName;
}
public void SetEventType(string eventType)
{
this.mType = eventType;
}
public string EventName()
{
return this.mEventName;
}
public void SetTime(ThinkingSDKTimeInter time)
{
this.mTime = time;
}
public ThinkingSDKTimeInter EventTime()
{
return this.mTime;
}
public void SetDataType(string type)
{
this.mType = type;
}
virtual public String GetDataType()
{
return this.mType;
}
public string AccountID()
{
return this.mAccountID;
}
public string DistinctID()
{
return this.mDistinctID;
}
public void SetAccountID(string accuntID)
{
this.mAccountID = accuntID;
}
public void SetDistinctID(string distinctID)
{
this.mDistinctID = distinctID;
}
public string UUID()
{
return this.mUUID;
}
public ThinkingSDKBaseData() { }
public ThinkingSDKBaseData(ThinkingSDKTimeInter time,string eventName)
{
this.SetBaseData(eventName);
this.SetTime(time);
}
public ThinkingSDKBaseData(string eventName)
{
this.SetBaseData(eventName);
}
public void SetBaseData(string eventName)
{
this.mEventName = eventName;
this.mUUID = System.Guid.NewGuid().ToString();
}
public ThinkingSDKBaseData(ThinkingSDKTimeInter time, string eventName, Dictionary<string, object> properties):this(time,eventName)
{
if (properties != null)
{
this.SetProperties(properties);
}
}
abstract public Dictionary<string, object> ToDictionary();
public void SetProperties(Dictionary<string, object> properties,bool isOverwrite = true)
{
if (isOverwrite)
{
foreach (KeyValuePair<string, object> kv in properties)
{
mProperties[kv.Key] = kv.Value;
}
}
else
{
foreach (KeyValuePair<string, object> kv in properties)
{
if (!mProperties.ContainsKey(kv.Key))
{
mProperties[kv.Key] = kv.Value;
}
}
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 69b1ae68ce0724b4290b99fb1920ffca
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using ThinkingSDK.PC.Constant;
using ThinkingSDK.PC.Time;
namespace ThinkingSDK.PC.DataModel
{
public class ThinkingSDKEventData:ThinkingSDKBaseData
{
private DateTime mEventTime;
private TimeZoneInfo mTimeZone;
private float mDuration;
private static Dictionary<string, object> mData;
public void SetEventTime(DateTime dateTime)
{
this.mEventTime = dateTime;
}
public void SetTimeZone(TimeZoneInfo timeZone)
{
this.mTimeZone = timeZone;
}
//public DateTime EventTime()
//{
// return this.mEventTime;
//}
public DateTime Time()
{
return mEventTime;
}
public ThinkingSDKEventData(string eventName) : base(eventName)
{
}
public ThinkingSDKEventData(ThinkingSDKTimeInter time, string eventName):base(time,eventName)
{
}
public ThinkingSDKEventData(ThinkingSDKTimeInter time, string eventName, Dictionary<string, object> properties):base(time,eventName,properties)
{
}
public override string GetDataType()
{
return "track";
}
public void SetDuration(float duration)
{
this.mDuration = duration;
}
public override Dictionary<string, object> ToDictionary()
{
if (mData == null)
{
mData = new Dictionary<string, object>();
}
else
{
mData.Clear();
}
mData[ThinkingSDKConstant.TYPE] = GetDataType();
mData[ThinkingSDKConstant.TIME] = this.EventTime().GetTime(this.mTimeZone);
mData[ThinkingSDKConstant.DISTINCT_ID] = this.DistinctID();
if (!string.IsNullOrEmpty(this.EventName()))
{
mData[ThinkingSDKConstant.EVENT_NAME] = this.EventName();
}
if (!string.IsNullOrEmpty(this.AccountID()))
{
mData[ThinkingSDKConstant.ACCOUNT_ID] = this.AccountID();
}
mData[ThinkingSDKConstant.UUID] = this.UUID();
Dictionary<string, object> properties = this.Properties();
properties[ThinkingSDKConstant.ZONE_OFFSET] = this.EventTime().GetZoneOffset(this.mTimeZone);
if (mDuration != 0)
{
properties[ThinkingSDKConstant.DURATION] = mDuration;
}
mData[ThinkingSDKConstant.PROPERTIES] = properties;
return mData;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3d815c0c9730f473387bb0c0cd83098c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,35 @@
using System.Collections.Generic;
using ThinkingSDK.PC.Constant;
using ThinkingSDK.PC.Utils;
namespace ThinkingSDK.PC.DataModel
{
public class ThinkingSDKFirstEvent:ThinkingSDKEventData
{
private string mFirstCheckId;
public ThinkingSDKFirstEvent(string eventName):base(eventName)
{
}
public void SetFirstCheckId(string firstCheckId)
{
mFirstCheckId = firstCheckId;
}
public string FirstCheckId()
{
if (string.IsNullOrEmpty(mFirstCheckId))
{
return ThinkingSDKDeviceInfo.DeviceID();
}
else
{
return mFirstCheckId;
}
}
override public Dictionary<string, object> ToDictionary()
{
Dictionary<string,object> dictionary = base.ToDictionary();
dictionary[ThinkingSDKConstant.FIRST_CHECK_ID] = FirstCheckId();
return dictionary;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 285f00076791947c8a99103da1a2653d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,24 @@
using System.Collections.Generic;
using ThinkingSDK.PC.Constant;
namespace ThinkingSDK.PC.DataModel
{
public class ThinkingSDKOverWritableEvent:ThinkingSDKEventData
{
private string mEventID;
public ThinkingSDKOverWritableEvent(string eventName,string eventID) : base(eventName)
{
this.mEventID = eventID;
}
public override string GetDataType()
{
return "track_overwrite";
}
override public Dictionary<string, object> ToDictionary()
{
Dictionary<string, object> dictionary = base.ToDictionary();
dictionary[ThinkingSDKConstant.EVENT_ID] = mEventID;
return dictionary;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9609b6c1610254c6795e60fe0ce7a92b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,25 @@
using System.Collections.Generic;
using ThinkingSDK.PC.Constant;
namespace ThinkingSDK.PC.DataModel
{
public class ThinkingSDKUpdateEvent:ThinkingSDKEventData
{
private string mEventID;
public ThinkingSDKUpdateEvent(string eventName, string eventID) : base(eventName)
{
this.mEventID = eventID;
}
public override string GetDataType()
{
return "track_update";
}
override public Dictionary<string, object> ToDictionary()
{
Dictionary<string, object> dictionary = base.ToDictionary();
dictionary[ThinkingSDKConstant.EVENT_ID] = mEventID;
return dictionary;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 25db2db9cd0d24311b5c5db04b42a604
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using System.Collections.Generic;
using ThinkingSDK.PC.Constant;
using ThinkingSDK.PC.Time;
namespace ThinkingSDK.PC.DataModel
{
public class ThinkingSDKUserData:ThinkingSDKBaseData
{
public ThinkingSDKUserData(ThinkingSDKTimeInter time,string eventType, Dictionary<string,object> properties)
{
this.SetEventType(eventType);
this.SetTime(time);
this.SetBaseData(null);
this.SetProperties(properties);
}
override public Dictionary<string, object> ToDictionary()
{
Dictionary<string, object> data = new Dictionary<string, object>();
data[ThinkingSDKConstant.TYPE] = GetDataType();
data[ThinkingSDKConstant.TIME] = EventTime().GetTime(null);
data[ThinkingSDKConstant.DISTINCT_ID] = DistinctID();
if (!string.IsNullOrEmpty(AccountID()))
{
data[ThinkingSDKConstant.ACCOUNT_ID] = AccountID();
}
data[ThinkingSDKConstant.UUID] = UUID();
data[ThinkingSDKConstant.PROPERTIES] = Properties();
return data;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 890bcbb20acb741689b72692aaf6f60a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: