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
3d88ea64
Commit
3d88ea64
authored
Jun 28, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改插屏广告
parent
3c6adb44
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
19 deletions
+22
-19
CSJInterstitialUtil.cs
Assets/Base/AdSDK/AD/CSJ/CSJInterstitialUtil.cs
+1
-1
GDTInterstitialAdUtil.cs
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
+6
-1
AdUtils.cs
Assets/Game/Main/Scripts/Utils/AdUtils.cs
+5
-2
DialogControl.cs
Assets/Game/Main/Scripts/View/DialogControl.cs
+6
-13
HomeInfoControl.cs
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
+2
-1
StartControl.cs
Assets/Scripts/StartControl.cs
+2
-1
No files found.
Assets/Base/AdSDK/AD/CSJ/CSJInterstitialUtil.cs
View file @
3d88ea64
...
...
@@ -62,7 +62,7 @@ public class CSJInterstitialUtil
var
adSlot
=
new
AdSlot
.
Builder
()
#if UNITY_IOS
.
SetCodeId
(
entity
.
codeId
)
.
SetExpressViewAcceptedSize
(
800
,
1200
)
.
SetExpressViewAcceptedSize
(
Screen
.
width
*
5
/
6f
,
Screen
.
width
*
6
/
4f
)
#else
.
SetCodeId
(
entity
.
codeId
)
.
SetExpressViewAcceptedSize
(
350
,
0
)
...
...
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
View file @
3d88ea64
...
...
@@ -52,8 +52,8 @@ public class GDTInterstitialAdUtil
if
(
interstitialAdCacheList
.
Count
>
0
)
{
UnifiedInterstitialAd
interAd
=
interstitialAdCacheList
.
Dequeue
();
interAd
.
SetListener
(
new
UnifiedInterstitialAdListener
(
entity
,
interAd
,
listener
,
callback
));
interAd
.
Show
();
interAd
.
SetListener
(
new
UnifiedInterstitialAdListener
(
entity
,
interAd
,
listener
,
callback
));
}
else
{
...
...
@@ -113,7 +113,9 @@ public class GDTInterstitialAdUtil
/// </summary>
public
void
OnAdExposured
()
{
#if UNITY_ANDROID
callback
(
true
);
#endif
if
(
listener
!=
null
)
{
listener
.
onInterstitialAdShow
();
...
...
@@ -141,6 +143,9 @@ public class GDTInterstitialAdUtil
/// </summary>
public
void
OnAdClosed
()
{
#if UNITY_IOS
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
#endif
if
(
listener
!=
null
)
{
listener
.
onInterstitialClose
();
...
...
Assets/Game/Main/Scripts/Utils/AdUtils.cs
View file @
3d88ea64
...
...
@@ -221,15 +221,18 @@ public class AdUtils
}
public
static
void
showInterAd
(
ZXADInterstitialListener
listener
)
public
static
void
showInterAd
(
string
actionName
,
ZXADInterstitialListener
listener
)
{
IsShowRewardAd
=
true
;
#if UNITY_EDITOR
listener
.
onInterstitialClose
();
return
;
#endif
AdManager
.
Instance
.
PlayCacheInterstitialAd
(
"Interstitial"
,
"InterstitialAd"
,
listener
);
AdManager
.
Instance
.
PlayCacheInterstitialAd
(
"Interstitial"
,
actionName
,
listener
);
#if UNITY_ANDROID
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
#endif
}
...
...
Assets/Game/Main/Scripts/View/DialogControl.cs
View file @
3d88ea64
...
...
@@ -437,8 +437,7 @@ public class DialogControl : MonoBehaviour
PlayerPrefs
.
SetInt
(
"CLICL_RED_PACK"
,
a
+
1
);
if
(
PlayerPrefs
.
GetInt
(
"CLICL_RED_PACK"
)
%
5
==
0
)
{
AdManager
.
Instance
.
PlayCacheInterstitialAd
(
"Interstitial"
,
"mrcqg"
,
new
InterstitialAdListener
());
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
AdUtils
.
showInterAd
(
"mrcqg"
,
new
InterstitialAdListener
());
}
}
...
...
@@ -619,8 +618,7 @@ public class DialogControl : MonoBehaviour
PlayerPrefs
.
SetInt
(
"CLICL_RED_PACK"
,
a
+
1
);
if
(
PlayerPrefs
.
GetInt
(
"CLICL_RED_PACK"
)
%
5
==
0
)
{
AdManager
.
Instance
.
PlayCacheInterstitialAd
(
"Interstitial"
,
"qtjs"
,
new
InterstitialAdListener
());
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
AdUtils
.
showInterAd
(
"qtjs"
,
new
InterstitialAdListener
());
}
}
private
void
moveAllSpeedDialog
()
...
...
@@ -746,8 +744,7 @@ public class DialogControl : MonoBehaviour
// if (PlayerPrefs.GetInt("CLICL_RED_PACK") % 5 == 0)
// {
// AdManager.Instance.PlayCacheInterstitialAd("Interstitial", "djhb", new InterstitialAdListener());
// AdManager.Instance.LoadCacheInterstitialAd("Interstitial");
// AdUtils.showInterAd("djhb", new InterstitialAdListener());
// }
...
...
@@ -952,9 +949,7 @@ public class DialogControl : MonoBehaviour
PlayerPrefs
.
SetInt
(
"CLICL_RED_PACK"
,
a
+
1
);
if
(
PlayerPrefs
.
GetInt
(
"CLICL_RED_PACK"
)
%
5
==
0
)
{
AdManager
.
Instance
.
PlayCacheInterstitialAd
(
"Interstitial"
,
"wxlw"
,
new
InterstitialAdListener
());
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
AdUtils
.
showInterAd
(
"wxlw"
,
new
InterstitialAdListener
());
}
}
public
void
closeBoxReward
()
...
...
@@ -1007,9 +1002,7 @@ public class DialogControl : MonoBehaviour
PlayerPrefs
.
SetInt
(
"CLICL_RED_PACK"
,
a
+
1
);
if
(
PlayerPrefs
.
GetInt
(
"CLICL_RED_PACK"
)
%
5
==
0
)
{
AdUtils
.
showInterAd
(
new
InterstitialAdListener
());
// AdManager.Instance.PlayCacheInterstitialAd("Interstitial", "txtc", new InterstitialAdListener());
// AdManager.Instance.LoadCacheInterstitialAd("Interstitial");
AdUtils
.
showInterAd
(
"InterstitialAd"
,
new
InterstitialAdListener
());
}
}
//关闭种树提现弹窗
...
...
@@ -1040,7 +1033,7 @@ public class DialogControl : MonoBehaviour
public
void
onInterstitialClose
()
{
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
}
public
void
onInterstitialError
(
string
errorMsg
)
...
...
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
View file @
3d88ea64
...
...
@@ -45,7 +45,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
private
void
playIntersitialAd
()
{
Debug
.
Log
(
"无操作播放插屏广告"
);
AdUtils
.
showInterAd
(
new
InterstitialAdListener
());
AdUtils
.
showInterAd
(
"InterstitialAd"
,
new
InterstitialAdListener
());
}
private
sealed
class
InterstitialAdListener
:
ZXADInterstitialListener
{
...
...
@@ -58,6 +58,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
public
void
onInterstitialClose
()
{
Debug
.
Log
(
"close"
);
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
GameObject
.
Find
(
"LongTimeNoOpen"
).
GetComponent
<
LongTimeNoOperation
>().
OpenCheck
();
}
...
...
Assets/Scripts/StartControl.cs
View file @
3d88ea64
...
...
@@ -150,7 +150,7 @@ public class StartControl : MonoBehaviour
{
Debug
.
unityLogger
.
Log
(
"展示插屏"
);
yield
return
new
WaitForSeconds
(
Constant
.
Instance
.
Interstitial_time
);
AdUtils
.
showInterAd
(
new
InterstitialAdListener
(
this
));
AdUtils
.
showInterAd
(
"InterstitialAd"
,
new
InterstitialAdListener
(
this
));
}
private
sealed
class
InterstitialAdListener
:
ZXADInterstitialListener
...
...
@@ -166,6 +166,7 @@ public class StartControl : MonoBehaviour
public
void
onInterstitialClose
()
{
AdManager
.
Instance
.
LoadCacheInterstitialAd
(
"Interstitial"
);
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