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
5d745df5
Commit
5d745df5
authored
Jul 01, 2021
by
LiLiuZhou
Browse files
Options
Browse Files
Download
Plain Diff
11
parents
0c28490e
9b00e133
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
300 additions
and
61 deletions
+300
-61
AdManager.cs
Assets/Base/AdSDK/AD/AD_Manager/AdManager.cs
+27
-7
RewardVideoAd.cs
.../AD/GDT/UnionSDK/Scripts/iOS/RewardVideo/RewardVideoAd.cs
+1
-1
NativeExpressAd.cs
...GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
+1
-1
ConfigXcode.cs
Assets/Editor/ConfigXcode.cs
+6
-2
Bugly.framework.meta
Assets/Editor/XUPorter/Mods/Bugly/Bugly.framework.meta
+54
-1
AdUtils.cs
Assets/Game/Main/Scripts/Utils/AdUtils.cs
+10
-0
CarUIControl.cs
Assets/Game/Main/Scripts/View/CarUIControl.cs
+46
-41
DialogControl.cs
Assets/Game/Main/Scripts/View/DialogControl.cs
+6
-1
HomeInfoControl.cs
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
+1
-1
StickDialog.cs
Assets/Game/Main/Scripts/View/StickDialog.cs
+1
-1
LottlyControl.cs
Assets/Game/Main/Scripts/dialog/LottlyControl.cs
+2
-2
CustomUnityAppController.mm
Assets/Plugins/iOS/CustomUnityAppController.mm
+102
-0
CustomUnityAppController.mm.meta
Assets/Plugins/iOS/CustomUnityAppController.mm.meta
+33
-0
Splash.cs
Assets/Scripts/Splash/Splash.cs
+1
-1
StartControl.cs
Assets/Scripts/StartControl.cs
+8
-0
GraphicsSettings.asset
ProjectSettings/GraphicsSettings.asset
+0
-1
PackageManagerSettings.asset
ProjectSettings/PackageManagerSettings.asset
+1
-1
No files found.
Assets/Base/AdSDK/AD/AD_Manager/AdManager.cs
View file @
5d745df5
...
@@ -117,7 +117,7 @@ public class AdManager
...
@@ -117,7 +117,7 @@ public class AdManager
return
;
return
;
#endif
#endif
//穿山甲
//穿山甲
if
(
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
null
&&
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
""
)
if
(
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
null
&&
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
""
)
{
{
#if UNITY_ANDROID
#if UNITY_ANDROID
...
@@ -153,7 +153,7 @@ public class AdManager
...
@@ -153,7 +153,7 @@ public class AdManager
ZXHCADManager
.
Init
(
ZXADConfig
.
Instance
.
HC_AD_APP_ID
,
Constant
.
Instance
.
IsTestNet
);
ZXHCADManager
.
Init
(
ZXADConfig
.
Instance
.
HC_AD_APP_ID
,
Constant
.
Instance
.
IsTestNet
);
#endif
#endif
}
}
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"ZXADConfig.Instance.HC_AD_APP_ID "
+
ZXADConfig
.
Instance
.
HC_AD_APP_ID
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"ZXADConfig.Instance.HC_AD_APP_ID "
+
ZXADConfig
.
Instance
.
HC_AD_APP_ID
);
//风行
//风行
#if UNITY_ANDROID
#if UNITY_ANDROID
AndroidJavaClass
jc3
=
new
AndroidJavaClass
(
"com.ym.admodule.fs.FunShionManager"
);
AndroidJavaClass
jc3
=
new
AndroidJavaClass
(
"com.ym.admodule.fs.FunShionManager"
);
...
@@ -206,7 +206,7 @@ public class AdManager
...
@@ -206,7 +206,7 @@ public class AdManager
// listener.onError("code" + code + "没有默认配置 errMsg" + errMsg);
// listener.onError("code" + code + "没有默认配置 errMsg" + errMsg);
// listener.onLastError();
// listener.onLastError();
//}
//}
listener
.
onError
(
code
+
"errormsg"
+
errMsg
);
listener
.
onError
(
code
+
"errormsg"
+
errMsg
);
listener
.
onLastError
();
listener
.
onLastError
();
}));
}));
...
@@ -306,7 +306,7 @@ public class AdManager
...
@@ -306,7 +306,7 @@ public class AdManager
CSJSplshADUtils
.
Instance
.
LoadSplshAd
(
entity
,
GetActivity
(),
GetSplashAdManager
(),
listener
,
callback
);
CSJSplshADUtils
.
Instance
.
LoadSplshAd
(
entity
,
GetActivity
(),
GetSplashAdManager
(),
listener
,
callback
);
#elif UNITY_IOS
#elif UNITY_IOS
//加载穿山甲开屏广告
//加载穿山甲开屏广告
CSJSplshADUtils
.
Instance
.
LoadSplshAd
(
entity
,
null
,
null
,
listener
,
callback
);
CSJSplshADUtils
.
Instance
.
LoadSplshAd
(
entity
,
null
,
null
,
listener
,
callback
);
#endif
#endif
break
;
break
;
...
@@ -594,7 +594,7 @@ public class AdManager
...
@@ -594,7 +594,7 @@ public class AdManager
if
(
bl
)
if
(
bl
)
{
{
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"大图缓存成功 "
+
entity
.
adPlatform
+
" CodeID "
+
entity
.
codeId
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"大图缓存成功 "
+
entity
.
adPlatform
+
" CodeID "
+
entity
.
codeId
);
//保存
插屏
缓存数据
//保存
大图
缓存数据
ZXADConfig
.
Instance
.
SetAdCache
(
sloatName
,
entity
,
""
);
ZXADConfig
.
Instance
.
SetAdCache
(
sloatName
,
entity
,
""
);
}
}
else
else
...
@@ -850,7 +850,7 @@ public class AdManager
...
@@ -850,7 +850,7 @@ public class AdManager
{
{
entity
.
actionName
=
actionName
;
entity
.
actionName
=
actionName
;
ZXADConfig
.
Instance
.
RemoveAdCache
(
slotName
,
""
);
ZXADConfig
.
Instance
.
RemoveAdCache
(
slotName
,
""
);
mPlayCacheInterstitialAdPlatform
(
entity
,
listener
,
new
Action
<
bool
>((
bl
)
=>
mPlayCacheInterstitialAdPlatform
(
entity
,
listener
,
new
Action
<
bool
>((
bl
)
=>
{
{
if
(
bl
)
if
(
bl
)
{
{
...
@@ -885,7 +885,7 @@ public class AdManager
...
@@ -885,7 +885,7 @@ public class AdManager
#if UNITY_ANDROID
#if UNITY_ANDROID
case
ZXADConfig
.
PLANTFORM_AD_KUS
:
case
ZXADConfig
.
PLANTFORM_AD_KUS
:
//快手插屏广告加载
//快手插屏广告加载
KsInterstitialAdUtils
.
Instance
.
PlayCacheInterstitialAd
(
entity
,
callback
,
listener
);
KsInterstitialAdUtils
.
Instance
.
PlayCacheInterstitialAd
(
entity
,
callback
,
listener
);
break
;
break
;
#endif
#endif
default
:
default
:
...
@@ -1289,6 +1289,15 @@ public class AdManager
...
@@ -1289,6 +1289,15 @@ public class AdManager
if
(
adList
==
null
||
adList
.
Count
==
0
)
if
(
adList
==
null
||
adList
.
Count
==
0
)
{
{
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"激励视频A组没有数据"
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"激励视频A组没有数据"
);
ADLoading
.
Instance
().
loadFailCount
++;
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
return
;
return
;
}
}
if
(
IsFirstLoadRewardAd
)
if
(
IsFirstLoadRewardAd
)
...
@@ -1333,6 +1342,7 @@ public class AdManager
...
@@ -1333,6 +1342,7 @@ public class AdManager
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
}
}
}
...
@@ -1353,6 +1363,15 @@ public class AdManager
...
@@ -1353,6 +1363,15 @@ public class AdManager
if
(
adList
==
null
||
adList
.
Count
==
0
)
if
(
adList
==
null
||
adList
.
Count
==
0
)
{
{
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"激励视频B组没有数据"
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"激励视频B组没有数据"
);
ADLoading
.
Instance
().
loadFailCount
++;
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
return
;
return
;
}
}
List
<
AdEntity
>
totalEntityList
=
adList
;
List
<
AdEntity
>
totalEntityList
=
adList
;
...
@@ -1390,6 +1409,7 @@ public class AdManager
...
@@ -1390,6 +1409,7 @@ public class AdManager
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
}
}
}
...
...
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/RewardVideo/RewardVideoAd.cs
View file @
5d745df5
...
@@ -48,7 +48,7 @@ namespace Tencent.GDT
...
@@ -48,7 +48,7 @@ namespace Tencent.GDT
{
{
return
;
return
;
}
}
loadListeners
.
Add
((
int
)
rewardVideoAd
,
listener
)
;
loadListeners
[(
int
)
rewardVideoAd
]
=
listener
;
}
}
public
void
SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
)
public
void
SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
)
...
...
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
View file @
5d745df5
...
@@ -49,7 +49,7 @@ namespace Tencent.GDT
...
@@ -49,7 +49,7 @@ namespace Tencent.GDT
{
{
return
;
return
;
}
}
loadListeners
.
Add
((
int
)
this
.
nativeExpressAd
,
listener
)
;
loadListeners
[(
int
)
this
.
nativeExpressAd
]
=
listener
;
}
}
public
void
LoadAd
(
int
count
)
public
void
LoadAd
(
int
count
)
...
...
Assets/Editor/ConfigXcode.cs
View file @
5d745df5
...
@@ -14,7 +14,11 @@ public class ConfigXcode
...
@@ -14,7 +14,11 @@ public class ConfigXcode
// 只处理IOS工程, pathToBuildProject会传入导出的ios工程的根目录
// 只处理IOS工程, pathToBuildProject会传入导出的ios工程的根目录
if
(
buildTarget
!=
BuildTarget
.
iOS
)
if
(
buildTarget
!=
BuildTarget
.
iOS
)
return
;
return
;
// ----------------------------- 修改main.mm文件 -----------------------------
var
mainAppPath
=
Path
.
Combine
(
pathToBuiltProject
,
"MainApp"
,
"main.mm"
);
var
mainContent
=
File
.
ReadAllText
(
mainAppPath
);
var
newContent
=
mainContent
.
Replace
(
"#include <UnityFramework/UnityFramework.h>"
,
@"#include ""../UnityFramework/UnityFramework.h"""
);
File
.
WriteAllText
(
mainAppPath
,
newContent
);
// ----------------------------- 创建工程设置对象 -----------------------------
// ----------------------------- 创建工程设置对象 -----------------------------
var
projectPath
=
pathToBuiltProject
+
"/Unity-iPhone.xcodeproj/project.pbxproj"
;
var
projectPath
=
pathToBuiltProject
+
"/Unity-iPhone.xcodeproj/project.pbxproj"
;
...
@@ -27,7 +31,7 @@ public class ConfigXcode
...
@@ -27,7 +31,7 @@ public class ConfigXcode
// ----------------------------- 修改BITCODE设置的例子 -----------------------------
// ----------------------------- 修改BITCODE设置的例子 -----------------------------
project
.
SetBuildProperty
(
mainTargetGuid
,
"ENABLE_BITCODE"
,
"NO"
);
project
.
SetBuildProperty
(
mainTargetGuid
,
"ENABLE_BITCODE"
,
"NO"
);
// -----------------------------
添加
framework -----------------------------
// -----------------------------
设置
framework -----------------------------
project
.
AddFrameworkToProject
(
frameworkTargetGuid
,
"AppTrackingTransparency.framework"
,
false
);
project
.
AddFrameworkToProject
(
frameworkTargetGuid
,
"AppTrackingTransparency.framework"
,
false
);
project
.
AddFrameworkToProject
(
frameworkTargetGuid
,
"libz.dylib"
,
false
);
project
.
AddFrameworkToProject
(
frameworkTargetGuid
,
"libz.dylib"
,
false
);
project
.
AddFrameworkToProject
(
frameworkTargetGuid
,
"libsqlite3.tbd"
,
false
);
project
.
AddFrameworkToProject
(
frameworkTargetGuid
,
"libsqlite3.tbd"
,
false
);
...
...
Assets/Editor/XUPorter/Mods/Bugly/Bugly.framework.meta
View file @
5d745df5
...
@@ -12,6 +12,24 @@ PluginImporter:
...
@@ -12,6 +12,24 @@ PluginImporter:
isExplicitlyReferenced: 0
isExplicitlyReferenced: 0
validateReferences: 1
validateReferences: 1
platformData:
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
- first:
Any:
Any:
second:
second:
...
@@ -20,9 +38,44 @@ PluginImporter:
...
@@ -20,9 +38,44 @@ PluginImporter:
- first:
- first:
Editor: Editor
Editor: Editor
second:
second:
enabled:
1
enabled:
0
settings:
settings:
CPU: AnyCPU
DefaultValueInitialized: true
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: x86_64
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
userData:
assetBundleName:
assetBundleName:
assetBundleVariant:
assetBundleVariant:
Assets/Game/Main/Scripts/Utils/AdUtils.cs
View file @
5d745df5
...
@@ -67,6 +67,10 @@ public class AdUtils
...
@@ -67,6 +67,10 @@ public class AdUtils
public
void
onAdClose
(
AdEntity
entity
)
public
void
onAdClose
(
AdEntity
entity
)
{
{
#if UNITY_IOS
Time
.
timeScale
=
1
;
#endif
Debug
.
Log
(
"音乐是否开关的值"
+
PlayerPrefs
.
GetInt
(
"IS_OPEN_MUSIC"
,
0
));
Debug
.
Log
(
"音乐是否开关的值"
+
PlayerPrefs
.
GetInt
(
"IS_OPEN_MUSIC"
,
0
));
if
(
PlayerPrefs
.
GetInt
(
"IS_OPEN_MUSIC"
,
0
)
==
0
)
if
(
PlayerPrefs
.
GetInt
(
"IS_OPEN_MUSIC"
,
0
)
==
0
)
{
{
...
@@ -107,6 +111,9 @@ public class AdUtils
...
@@ -107,6 +111,9 @@ public class AdUtils
public
void
onAdShow
()
public
void
onAdShow
()
{
{
#if UNITY_IOS
Time
.
timeScale
=
0
;
#endif
AudioUtils
.
ins
.
music
.
Stop
();
AudioUtils
.
ins
.
music
.
Stop
();
EventUtils
.
OnEvent
(
"video_show"
);
EventUtils
.
OnEvent
(
"video_show"
);
...
@@ -212,6 +219,9 @@ public class AdUtils
...
@@ -212,6 +219,9 @@ public class AdUtils
public
void
onError
(
string
errorMsg
)
public
void
onError
(
string
errorMsg
)
{
{
#if UNITY_IOS
Time
.
timeScale
=
1
;
#endif
callback
(
false
);
callback
(
false
);
}
}
...
...
Assets/Game/Main/Scripts/View/CarUIControl.cs
View file @
5d745df5
...
@@ -334,52 +334,57 @@ public class CarUIControl : MonoBehaviour
...
@@ -334,52 +334,57 @@ public class CarUIControl : MonoBehaviour
currentCarTime
=
(
int
)
entity
.
landPlantData
.
growthLastSecond
;
currentCarTime
=
(
int
)
entity
.
landPlantData
.
growthLastSecond
;
//设置暂停状态
//设置暂停状态
setPauseTime
(
currentCarTime
);
setPauseTime
(
currentCarTime
);
//关闭上一次倒计时
if
(
progressBarImg
!=
null
)
if
(
timeControl
!=
null
)
{
{
StopCoroutine
(
timeControl
);
progressBarImg
.
fillAmount
=
1
-
(
currentCarTime
/
(
float
)
totalTime
);
}
fruitTimeTv
.
text
=
((
1
-
(
currentCarTime
/
(
float
)
totalTime
))
*
100
).
ToString
(
"f0"
)
+
"%"
;
if
(
currentCarTime
>
0
)
{
timeControl
=
StartCoroutine
(
timeConteller
());
}
}
////关闭上一次倒计时
//if (timeControl != null)
//{
// StopCoroutine(timeControl);
//}
//if (currentCarTime > 0)
//{
// timeControl = StartCoroutine(timeConteller());
//}
}
}
private
IEnumerator
timeConteller
()
//
private IEnumerator timeConteller()
{
//
{
yield
return
null
;
//
yield return null;
fruitTimeTv
.
text
=
UnityUtil
.
getCountdown
(
currentCarTime
);
//
fruitTimeTv.text = UnityUtil.getCountdown(currentCarTime);
while
(
currentCarTime
>=
0
)
//
while (currentCarTime >= 0)
{
//
{
if
(
progressBarImg
!=
null
)
//
if (progressBarImg != null)
{
//
{
progressBarImg
.
fillAmount
=
1
-
(
currentCarTime
/
(
float
)
totalTime
);
//
progressBarImg.fillAmount = 1 - (currentCarTime / (float)totalTime);
fruitTimeTv
.
text
=
((
1
-
(
currentCarTime
/
(
float
)
totalTime
))
*
100
).
ToString
(
"f0"
)
+
"%"
;
//
fruitTimeTv.text = ((1 - (currentCarTime / (float)totalTime)) * 100).ToString("f0") + "%";
}
//
}
yield
return
new
WaitForSecondsRealtime
(
1f
);
//
yield return new WaitForSecondsRealtime(1f);
if
(
currentCarTime
<=
0
)
//
if (currentCarTime <= 0)
{
//
{
//倒计时完成
//
//倒计时完成
//关闭上一次倒计时
//
//关闭上一次倒计时
StopCoroutine
(
timeControl
);
//
StopCoroutine(timeControl);
//开启新一轮倒计时 倒计时结束 变换状态
//
//开启新一轮倒计时 倒计时结束 变换状态
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_CAR_LIST_DATA
);
//
EventCenter.Broadcast(MyEventType.UPDATE_CAR_LIST_DATA);
Guide
.
guide
.
onClickStep2
();
//
Guide.guide.onClickStep2();
break
;
//
break;
}
//
}
else
//
else
{
//
{
setPauseTime
(
currentCarTime
);
//
setPauseTime(currentCarTime);
if
(!
isPauseTime
)
//
if (!isPauseTime)
{
//
{
//currentCarTime--;
//
//currentCarTime--;
}
//
}
}
//
}
fruitTimeTv
.
text
=
UnityUtil
.
getCountdown
(
currentCarTime
);
//
fruitTimeTv.text = UnityUtil.getCountdown(currentCarTime);
//SaveData.GetIns().saveFlowerLastTime(transform.tag, coinTime);
//
//SaveData.GetIns().saveFlowerLastTime(transform.tag, coinTime);
}
//
}
}
//
}
//判断是否暂停
//判断是否暂停
private
void
setPauseTime
(
int
currentTime
)
private
void
setPauseTime
(
int
currentTime
)
{
{
...
...
Assets/Game/Main/Scripts/View/DialogControl.cs
View file @
5d745df5
...
@@ -543,8 +543,13 @@ public class DialogControl : MonoBehaviour
...
@@ -543,8 +543,13 @@ public class DialogControl : MonoBehaviour
EventUtils
.
OnEvent
(
"addDiamond_click"
,
"点击钻石加号"
);
EventUtils
.
OnEvent
(
"addDiamond_click"
,
"点击钻石加号"
);
HttpTool
.
Instance
.
_Get
(
"app/v2/cscmnq/diamond_by_video_status"
,
null
,
new
Action
<
DiamondStatusBean
>((
bean
)
=>
HttpTool
.
Instance
.
_Get
(
"app/v2/cscmnq/diamond_by_video_status"
,
null
,
new
Action
<
DiamondStatusBean
>((
bean
)
=>
{
{
<<<<<<<
HEAD
DiamondRewardNum
=
bean
.
rewardDiamondNum
;
DiamondRewardNum
=
bean
.
rewardDiamondNum
;
=======
DiamondplayNum
=
bean
.
playNum
;
DiamondRewardNum
=
bean
.
rewardDiamondNum
;
>>>>>>>
9
b00e1332e9bbf41d0221509f4e86bb98a4b5535
if
(
DiamondplayNum
>
0
)
if
(
DiamondplayNum
>
0
)
{
{
rdp
.
Show
(
bean
.
rewardDiamondNum
);
rdp
.
Show
(
bean
.
rewardDiamondNum
);
...
@@ -961,7 +966,7 @@ public class DialogControl : MonoBehaviour
...
@@ -961,7 +966,7 @@ public class DialogControl : MonoBehaviour
if
(
cb
)
if
(
cb
)
{
{
Debug
.
Log
(
"关闭宝箱视频"
);
Debug
.
Log
(
"关闭宝箱视频"
);
HttpTool
.
Instance
.
_Post
(
"app/v
1/wdlc/reward
/receive_box_reward"
,
null
,
new
Action
<
BoxReceiveBean
>((
bean
)
=>
HttpTool
.
Instance
.
_Post
(
"app/v
2/cscmnq
/receive_box_reward"
,
null
,
new
Action
<
BoxReceiveBean
>((
bean
)
=>
{
{
//OnOpenRewardDialog(bean);
//OnOpenRewardDialog(bean);
if
(
bean
.
currencyType
==
10
)
if
(
bean
.
currencyType
==
10
)
...
...
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
View file @
5d745df5
...
@@ -679,7 +679,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
...
@@ -679,7 +679,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
AudioUtils
.
ins
.
PlayBtnAudio
();
AudioUtils
.
ins
.
PlayBtnAudio
();
EventUtils
.
OnEvent
(
"yijianzhongzhi"
);
EventUtils
.
OnEvent
(
"yijianzhongzhi"
);
HttpTool
.
Instance
.
_Post
(
"app/v2/
wdlc
/seed_by_wd"
,
null
,
new
Action
<
OrderSeedData
>((
bean
)
=>
HttpTool
.
Instance
.
_Post
(
"app/v2/
cscmnq
/seed_by_wd"
,
null
,
new
Action
<
OrderSeedData
>((
bean
)
=>
{
{
//LandListInfo(bean.landList);
//LandListInfo(bean.landList);
// PlayerDataControl.Instance.VideoUnlockCarID = bean.lockNeedWatchVideoStartNum;
// PlayerDataControl.Instance.VideoUnlockCarID = bean.lockNeedWatchVideoStartNum;
...
...
Assets/Game/Main/Scripts/View/StickDialog.cs
View file @
5d745df5
...
@@ -67,7 +67,7 @@ public class StickDialog : MonoBehaviour
...
@@ -67,7 +67,7 @@ public class StickDialog : MonoBehaviour
{
{
parm
.
Clear
();
parm
.
Clear
();
parm
[
"landId"
]
=
cancelStickId
;
parm
[
"landId"
]
=
cancelStickId
;
HttpTool
.
Instance
.
_Post
(
"app/v
1/wdlc
/clear_bug"
,
parm
,
new
Action
<
CleanBugBean
>((
bean
)
=>
HttpTool
.
Instance
.
_Post
(
"app/v
2/cscmnq
/clear_bug"
,
parm
,
new
Action
<
CleanBugBean
>((
bean
)
=>
{
{
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_LAND_DATA
,
bean
.
landStatus
);
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_LAND_DATA
,
bean
.
landStatus
);
...
...
Assets/Game/Main/Scripts/dialog/LottlyControl.cs
View file @
5d745df5
...
@@ -188,7 +188,7 @@ public class LottlyControl : MonoBehaviour
...
@@ -188,7 +188,7 @@ public class LottlyControl : MonoBehaviour
{
{
setTurnable
(
bean
);
setTurnable
(
bean
);
//rewardType=
5
钻石, rewardType=10 现金
//rewardType=
20
钻石, rewardType=10 现金
//awardNum
//awardNum
Debug
.
Log
(
"结果数据"
+
bean
.
rewardType
+
bean
.
awardCash
);
Debug
.
Log
(
"结果数据"
+
bean
.
rewardType
+
bean
.
awardCash
);
type
=
bean
.
rewardType
;
type
=
bean
.
rewardType
;
...
@@ -215,7 +215,7 @@ public class LottlyControl : MonoBehaviour
...
@@ -215,7 +215,7 @@ public class LottlyControl : MonoBehaviour
isTuranable
=
false
;
isTuranable
=
false
;
Debug
.
unityLogger
.
Log
(
"ZhuanPanEvent 动画执行完毕"
);
Debug
.
unityLogger
.
Log
(
"ZhuanPanEvent 动画执行完毕"
);
EventCenter
.
Broadcast
(
MyEventType
.
RefreshLottlyData
);
EventCenter
.
Broadcast
(
MyEventType
.
RefreshLottlyData
);
if
(
type
==
5
)
if
(
type
==
20
)
{
{
//展示收获钻石弹窗
//展示收获钻石弹窗
GameObject
.
Find
(
"Dialog"
).
GetComponent
<
DialogControl
>().
showReceiveDiamondDialog
(
awardNum
.
ToString
());
GameObject
.
Find
(
"Dialog"
).
GetComponent
<
DialogControl
>().
showReceiveDiamondDialog
(
awardNum
.
ToString
());
...
...
Assets/Plugins/iOS/CustomUnityAppController.mm
0 → 100644
View file @
5d745df5
#import "UnityAppController.h"
#import "WXApi.h"
#import "BridageManager.h"
#import "UserData.h"
#import "KeychainItemManager.h"
#import "WKWebViewController.h"
@interface CustomAppController : UnityAppController < WXApiDelegate >
@end
IMPL_APP_CONTROLLER_SUBCLASS (CustomAppController)
@implementation CustomAppController
#if defined(__cplusplus)
extern "C" {
#endif
// 显示网页
void ShowIOSWebView(char *urlStr, char *titleStr)
{
// GetAppController()获取appController,相当于self
WKWebViewController *vc = [WKWebViewController new];
vc.url = [NSString stringWithUTF8String:urlStr];
vc.showNav = YES;
vc.webTitle = [NSString stringWithUTF8String:titleStr];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
// 点击按钮后跳转到iOS界面,设置界面为iOS界面
[GetAppController().window.rootViewController presentViewController:nav animated:YES completion:^{
UnityPause(true);
}];
}
// 显示无网络弹窗
void ShowIOSNoWebAlert()
{
UIAlertController *vc = [UIAlertController alertControllerWithTitle:@"无网络连接" message:@"请检查网络环境,并确认开启网络访问权限!" preferredStyle: UIAlertControllerStyleAlert];
UIAlertAction *alert = [UIAlertAction actionWithTitle:@"检查网络" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
}];
[vc addAction:alert];
// UIWindow *window = [UIApplication sharedApplication].keyWindow;
[GetAppController().window.rootViewController presentViewController:vc animated:YES completion:nil];
}
#if defined(__cplusplus)
}
#endif
-(void)bridageUnity
{
UserData *data = [[UserData alloc] init];
[data initPlist];
[KeychainItemManager readKeychainIDFA];
[[BridageManager shareManager] bridage];
}
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
[super application:application didFinishLaunchingWithOptions:launchOptions];
[self bridageUnity];
NSLog(@"走了1");
return YES;
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
[super application:app openURL:url options:options];
NSLog(@"走了2");
if ([WXApi handleOpenURL:url delegate:[BridageManager shareManager]])
{
return YES;
}
return YES;
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
NSLog(@"走了3");
if ([WXApi handleOpenUniversalLink:userActivity delegate:[BridageManager shareManager]])
{
return YES;
}
return YES;
}
@end
Assets/Plugins/iOS/CustomUnityAppController.mm.meta
0 → 100644
View file @
5d745df5
fileFormatVersion: 2
guid: 12e763f1de6c94cb3b95a2517ef41313
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Splash/Splash.cs
View file @
5d745df5
...
@@ -90,7 +90,7 @@ public class Splash : MonoBehaviour
...
@@ -90,7 +90,7 @@ public class Splash : MonoBehaviour
{
{
Constant
.
Instance
.
shubiao
=
false
;
Constant
.
Instance
.
shubiao
=
false
;
}
}
//
Constant.Instance.shubiao = true;
Constant
.
Instance
.
shubiao
=
true
;
novelInfo
();
novelInfo
();
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
{
...
...
Assets/Scripts/StartControl.cs
View file @
5d745df5
...
@@ -203,6 +203,9 @@ public class StartControl : MonoBehaviour
...
@@ -203,6 +203,9 @@ public class StartControl : MonoBehaviour
int
passTime
=
curTime
-
lastCloseTime
;
int
passTime
=
curTime
-
lastCloseTime
;
if
(
passTime
>
Constant
.
Instance
.
splash_time
&&
passTime
<
Constant
.
Instance
.
video_time
)
if
(
passTime
>
Constant
.
Instance
.
splash_time
&&
passTime
<
Constant
.
Instance
.
video_time
)
{
{
#if UNITY_IOS
ShowSplashAd
();
#else
if
(
AdUtils
.
IsShowRewardAd
)
if
(
AdUtils
.
IsShowRewardAd
)
{
{
AdUtils
.
IsShowRewardAd
=
false
;
AdUtils
.
IsShowRewardAd
=
false
;
...
@@ -211,9 +214,13 @@ public class StartControl : MonoBehaviour
...
@@ -211,9 +214,13 @@ public class StartControl : MonoBehaviour
{
{
ShowSplashAd
();
ShowSplashAd
();
}
}
#endif
}
}
else
if
(
passTime
>=
Constant
.
Instance
.
video_time
)
else
if
(
passTime
>=
Constant
.
Instance
.
video_time
)
{
{
#if UNITY_IOS
ShowRewardAd
();
#else
if
(
AdUtils
.
IsShowRewardAd
)
if
(
AdUtils
.
IsShowRewardAd
)
{
{
AdUtils
.
IsShowRewardAd
=
false
;
AdUtils
.
IsShowRewardAd
=
false
;
...
@@ -222,6 +229,7 @@ public class StartControl : MonoBehaviour
...
@@ -222,6 +229,7 @@ public class StartControl : MonoBehaviour
{
{
ShowRewardAd
();
ShowRewardAd
();
}
}
#endif
}
}
}
}
...
...
ProjectSettings/GraphicsSettings.asset
View file @
5d745df5
...
@@ -34,7 +34,6 @@ GraphicsSettings:
...
@@ -34,7 +34,6 @@ GraphicsSettings:
-
{
fileID
:
16000
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
16000
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
16001
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
16001
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
17000
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
17000
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
16003
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_PreloadedShaders
:
[]
m_PreloadedShaders
:
[]
m_SpritesDefaultMaterial
:
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
m_SpritesDefaultMaterial
:
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
type
:
0
}
...
...
ProjectSettings/PackageManagerSettings.asset
View file @
5d745df5
...
@@ -17,7 +17,7 @@ MonoBehaviour:
...
@@ -17,7 +17,7 @@ MonoBehaviour:
m_Registries
:
m_Registries
:
-
m_Id
:
main
-
m_Id
:
main
m_Name
:
m_Name
:
m_Url
:
https://packages.unity.c
n
m_Url
:
https://packages.unity.c
om
m_Scopes
:
[]
m_Scopes
:
[]
m_IsDefault
:
1
m_IsDefault
:
1
m_UserSelectedRegistryName
:
m_UserSelectedRegistryName
:
...
...
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