Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
W
wdlc_mjb_unity
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
wdlc_mjb_unity
Commits
b350c80a
Commit
b350c80a
authored
Jun 29, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改插屏广告问题
parent
3d88ea64
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
9 deletions
+39
-9
GDTInterstitialAdUtil.cs
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
+4
-4
UnifiedInterstitialAd.cs
...SDK/Scripts/iOS/InstitialVideoAd/UnifiedInterstitialAd.cs
+1
-1
AdUtils.cs
Assets/Game/Main/Scripts/Utils/AdUtils.cs
+32
-1
DialogControl.cs
Assets/Game/Main/Scripts/View/DialogControl.cs
+2
-1
HomeInfoControl.cs
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
+0
-1
StartControl.cs
Assets/Scripts/StartControl.cs
+0
-1
No files found.
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
View file @
b350c80a
...
@@ -52,8 +52,8 @@ public class GDTInterstitialAdUtil
...
@@ -52,8 +52,8 @@ public class GDTInterstitialAdUtil
if
(
interstitialAdCacheList
.
Count
>
0
)
if
(
interstitialAdCacheList
.
Count
>
0
)
{
{
UnifiedInterstitialAd
interAd
=
interstitialAdCacheList
.
Dequeue
();
UnifiedInterstitialAd
interAd
=
interstitialAdCacheList
.
Dequeue
();
interAd
.
SetListener
(
new
UnifiedInterstitialAdListener
(
entity
,
interAd
,
listener
,
callback
));
interAd
.
Show
();
interAd
.
Show
();
interAd
.
SetListener
(
new
UnifiedInterstitialAdListener
(
entity
,
interAd
,
listener
,
callback
));
}
}
else
else
{
{
...
@@ -143,9 +143,9 @@ public class GDTInterstitialAdUtil
...
@@ -143,9 +143,9 @@ public class GDTInterstitialAdUtil
/// </summary>
/// </summary>
public
void
OnAdClosed
()
public
void
OnAdClosed
()
{
{
#if UNITY_IOS
//
#if UNITY_IOS
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
//
AdManager.Instance.LoadCacheInterstitialAd("Interstitial");
#endif
//
#endif
if
(
listener
!=
null
)
if
(
listener
!=
null
)
{
{
listener
.
onInterstitialClose
();
listener
.
onInterstitialClose
();
...
...
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/InstitialVideoAd/UnifiedInterstitialAd.cs
View file @
b350c80a
...
@@ -55,7 +55,7 @@ namespace Tencent.GDT
...
@@ -55,7 +55,7 @@ namespace Tencent.GDT
{
{
return
;
return
;
}
}
loadListeners
.
Add
((
int
)
unifiedInterstitialAd
,
listener
)
;
loadListeners
[(
int
)
unifiedInterstitialAd
]
=
listener
;
}
}
public
void
LoadAd
()
public
void
LoadAd
()
...
...
Assets/Game/Main/Scripts/Utils/AdUtils.cs
View file @
b350c80a
...
@@ -228,13 +228,44 @@ public class AdUtils
...
@@ -228,13 +228,44 @@ public class AdUtils
listener
.
onInterstitialClose
();
listener
.
onInterstitialClose
();
return
;
return
;
#endif
#endif
AdManager
.
Instance
.
PlayCacheInterstitialAd
(
"Interstitial"
,
actionName
,
listener
);
AdManager
.
Instance
.
PlayCacheInterstitialAd
(
"Interstitial"
,
actionName
,
new
InterstitialAdListener
(
listener
)
);
#if UNITY_ANDROID
#if UNITY_ANDROID
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
#endif
#endif
}
}
/// <summary>
/// 插屏广告回调, 统一在关闭弹窗时给iOS添加加载方法
/// </summary>
private
sealed
class
InterstitialAdListener
:
ZXADInterstitialListener
{
private
ZXADInterstitialListener
listener
;
public
InterstitialAdListener
(
ZXADInterstitialListener
listener
)
{
this
.
listener
=
listener
;
}
public
void
onInterstitialAdShow
()
{
this
.
listener
.
onInterstitialAdShow
();
}
public
void
onInterstitialClose
()
{
#if UNITY_IOS
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
#endif
this
.
listener
.
onInterstitialClose
();
}
public
void
onInterstitialError
(
string
errorMsg
)
{
this
.
listener
.
onInterstitialError
(
errorMsg
);
}
}
public
static
void
showFeedAd
(
string
action
)
public
static
void
showFeedAd
(
string
action
)
{
{
...
...
Assets/Game/Main/Scripts/View/DialogControl.cs
View file @
b350c80a
...
@@ -1029,11 +1029,12 @@ public class DialogControl : MonoBehaviour
...
@@ -1029,11 +1029,12 @@ public class DialogControl : MonoBehaviour
public
void
onInterstitialAdShow
()
public
void
onInterstitialAdShow
()
{
{
}
}
public
void
onInterstitialClose
()
public
void
onInterstitialClose
()
{
{
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
}
}
public
void
onInterstitialError
(
string
errorMsg
)
public
void
onInterstitialError
(
string
errorMsg
)
...
...
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
View file @
b350c80a
...
@@ -58,7 +58,6 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
...
@@ -58,7 +58,6 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
public
void
onInterstitialClose
()
public
void
onInterstitialClose
()
{
{
Debug
.
Log
(
"close"
);
Debug
.
Log
(
"close"
);
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
GameObject
.
Find
(
"LongTimeNoOpen"
).
GetComponent
<
LongTimeNoOperation
>().
OpenCheck
();
GameObject
.
Find
(
"LongTimeNoOpen"
).
GetComponent
<
LongTimeNoOperation
>().
OpenCheck
();
}
}
...
...
Assets/Scripts/StartControl.cs
View file @
b350c80a
...
@@ -166,7 +166,6 @@ public class StartControl : MonoBehaviour
...
@@ -166,7 +166,6 @@ public class StartControl : MonoBehaviour
public
void
onInterstitialClose
()
public
void
onInterstitialClose
()
{
{
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
startControl
.
StartCoroutine
(
startControl
.
SetInterAd
());
startControl
.
StartCoroutine
(
startControl
.
SetInterAd
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment