You've already forked CC-Framework.Commercialization
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e19d1f4339 | |||
| 495ec137b5 | |||
| 4a813fa481 | |||
| e154b3ef17 | |||
| bb0939fd98 | |||
| 082e6770aa |
@@ -48,15 +48,20 @@ namespace Runtime.ADAggregator
|
|||||||
|
|
||||||
private AsyncAdPlayer _curAsyncPlayer;
|
private AsyncAdPlayer _curAsyncPlayer;
|
||||||
|
|
||||||
|
private string _userId;
|
||||||
|
|
||||||
|
public string UserId => _userId;
|
||||||
|
|
||||||
#pragma warning disable CS0414
|
#pragma warning disable CS0414
|
||||||
private bool _isInit = false;
|
private bool _isInit = false;
|
||||||
#pragma warning restore CS0414
|
#pragma warning restore CS0414
|
||||||
|
|
||||||
public void Init(Action onCallback , ADConfig adConfig , IAdController controller , params object[] args)
|
public void Init(Action onCallback , string userId, ADConfig adConfig , IAdController controller , params object[] args)
|
||||||
{
|
{
|
||||||
_isInit = true;
|
_isInit = true;
|
||||||
_instance.name = "[GameUpdater] <color=green>Init<color>";
|
_instance.name = "[GameUpdater] <color=green>Init<color>";
|
||||||
AD_Dicts = new Dictionary<AD_Type, ADPlayer>();
|
AD_Dicts = new Dictionary<AD_Type, ADPlayer>();
|
||||||
|
_userId = userId;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
onCallback?.Invoke();
|
onCallback?.Invoke();
|
||||||
#else
|
#else
|
||||||
@@ -168,6 +173,7 @@ namespace Runtime.ADAggregator
|
|||||||
private void InitTimeSystem()
|
private void InitTimeSystem()
|
||||||
{
|
{
|
||||||
this._updateList = new List<Action>(DefaultLength);
|
this._updateList = new List<Action>(DefaultLength);
|
||||||
|
this._timeHandlers = new List<AdTimeHandler>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _InvokeUpdate(List<Action> list)
|
private void _InvokeUpdate(List<Action> list)
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ namespace Runtime.ADAggregator
|
|||||||
}
|
}
|
||||||
|
|
||||||
public abstract void ShowAD(Action onClose, Action<bool> onVideoComplete);
|
public abstract void ShowAD(Action onClose, Action<bool> onVideoComplete);
|
||||||
public abstract bool IsReadly();
|
|
||||||
|
public virtual bool IsReadly()
|
||||||
|
{
|
||||||
|
return this.curState == 2;
|
||||||
|
}
|
||||||
|
|
||||||
public abstract void LoadAD();
|
public abstract void LoadAD();
|
||||||
|
|
||||||
public virtual void OnInit()
|
public virtual void OnInit()
|
||||||
@@ -43,5 +48,12 @@ namespace Runtime.ADAggregator
|
|||||||
public virtual void CloseAD()
|
public virtual void CloseAD()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnError(object code, string message)
|
||||||
|
{
|
||||||
|
this.OnErrorAction?.Invoke();
|
||||||
|
this.OnErrorAction = null;
|
||||||
|
curState = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 131a6b21c8605f84396be9f6751fb6e3
|
guid: 094f67b7dbe0a8d4bb32d358c57004c6
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@@ -202,6 +202,7 @@ Transform:
|
|||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!114 &11400000
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 98b31b835f394db4a51957c3f0f3ac32, type: 3}
|
|
||||||
m_Name: Sample-AdConfig
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
ConfigName:
|
|
||||||
Id:
|
|
||||||
Key:
|
|
||||||
Key2:
|
|
||||||
BaseAwardAdKeyValue:
|
|
||||||
key:
|
|
||||||
value:
|
|
||||||
BaseInteractionAdKeyValue:
|
|
||||||
key:
|
|
||||||
value:
|
|
||||||
BaseSplashAdKeyValue:
|
|
||||||
key:
|
|
||||||
value:
|
|
||||||
CommonKeyValues: []
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d4eed937a29d5f2408fa1bb48c59169a
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.foldcc.cc-framework.commercialization",
|
"name": "com.foldcc.cc-framework.commercialization",
|
||||||
"displayName": "CC-Framework.commercialization",
|
"displayName": "CC-Framework.commercialization",
|
||||||
"description": "商业化sdk通用组件,包含广告、内购、用户统计、归因统计等",
|
"description": "商业化sdk通用组件,包含广告、内购、用户统计、归因统计等",
|
||||||
"version": "1.0.0",
|
"version": "1.0.4",
|
||||||
"unity": "2021.1",
|
"unity": "2021.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user