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
a4d78bc0
Commit
a4d78bc0
authored
Jun 30, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.7修改
parent
1453d971
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
248 additions
and
56 deletions
+248
-56
ConfigXcode.cs
Assets/Editor/ConfigXcode.cs
+6
-2
Bugly.framework.meta
Assets/Editor/XUPorter/Mods/Bugly/Bugly.framework.meta
+54
-1
CarUIControl.cs
Assets/Game/Main/Scripts/View/CarUIControl.cs
+46
-41
DialogControl.cs
Assets/Game/Main/Scripts/View/DialogControl.cs
+2
-6
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
GraphicsSettings.asset
ProjectSettings/GraphicsSettings.asset
+0
-1
No files found.
Assets/Editor/ConfigXcode.cs
View file @
a4d78bc0
...
@@ -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 @
a4d78bc0
...
@@ -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: x86_64
- 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/View/CarUIControl.cs
View file @
a4d78bc0
...
@@ -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
(
timeControl
!=
null
)
{
StopCoroutine
(
timeControl
);
}
if
(
currentCarTime
>
0
)
{
timeControl
=
StartCoroutine
(
timeConteller
());
}
}
private
IEnumerator
timeConteller
()
{
yield
return
null
;
fruitTimeTv
.
text
=
UnityUtil
.
getCountdown
(
currentCarTime
);
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
);
////关闭上一次倒计时
if
(
currentCarTime
<=
0
)
//if (timeControl != null)
{
//{
//倒计时完成
// StopCoroutine(timeControl);
//关闭上一次倒计时
//}
StopCoroutine
(
timeControl
);
//if (currentCarTime > 0)
//开启新一轮倒计时 倒计时结束 变换状态
//{
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_CAR_LIST_DATA
);
// timeControl = StartCoroutine(timeConteller());
Guide
.
guide
.
onClickStep2
();
//}
break
;
}
else
{
setPauseTime
(
currentCarTime
);
if
(!
isPauseTime
)
{
//currentCarTime--;
}
}
fruitTimeTv
.
text
=
UnityUtil
.
getCountdown
(
currentCarTime
);
//SaveData.GetIns().saveFlowerLastTime(transform.tag, coinTime);
}
}
}
//private IEnumerator timeConteller()
//{
// yield return null;
// fruitTimeTv.text = UnityUtil.getCountdown(currentCarTime);
// while (currentCarTime >= 0)
// {
// if (progressBarImg != null)
// {
// progressBarImg.fillAmount = 1 - (currentCarTime / (float)totalTime);
// fruitTimeTv.text = ((1 - (currentCarTime / (float)totalTime)) * 100).ToString("f0") + "%";
// }
// yield return new WaitForSecondsRealtime(1f);
// if (currentCarTime <= 0)
// {
// //倒计时完成
// //关闭上一次倒计时
// StopCoroutine(timeControl);
// //开启新一轮倒计时 倒计时结束 变换状态
// EventCenter.Broadcast(MyEventType.UPDATE_CAR_LIST_DATA);
// Guide.guide.onClickStep2();
// break;
// }
// else
// {
// setPauseTime(currentCarTime);
// if (!isPauseTime)
// {
// //currentCarTime--;
// }
// }
// fruitTimeTv.text = UnityUtil.getCountdown(currentCarTime);
// //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 @
a4d78bc0
...
@@ -541,12 +541,8 @@ public class DialogControl : MonoBehaviour
...
@@ -541,12 +541,8 @@ 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
;
=======
DiamondplayNum
=
bean
.
playNum
;
DiamondplayNum
=
bean
.
playNum
;
>>>>>>>
203
a308827d9b9dae2a93e572f7d221941fe2445
DiamondRewardNum
=
bean
.
rewardDiamondNum
;
if
(
DiamondplayNum
>
0
)
if
(
DiamondplayNum
>
0
)
{
{
rdp
.
Show
(
bean
.
rewardDiamondNum
);
rdp
.
Show
(
bean
.
rewardDiamondNum
);
...
@@ -963,7 +959,7 @@ public class DialogControl : MonoBehaviour
...
@@ -963,7 +959,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 @
a4d78bc0
...
@@ -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 @
a4d78bc0
...
@@ -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 @
a4d78bc0
...
@@ -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 @
a4d78bc0
#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 @
a4d78bc0
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 @
a4d78bc0
...
@@ -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
)
=>
{
{
...
...
ProjectSettings/GraphicsSettings.asset
View file @
a4d78bc0
...
@@ -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
}
...
...
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