Commit a4d78bc0 authored by zhangzhe's avatar zhangzhe

1.0.7修改

parent 1453d971
......@@ -14,7 +14,11 @@ public class ConfigXcode
// 只处理IOS工程, pathToBuildProject会传入导出的ios工程的根目录
        if (buildTarget != BuildTarget.iOS)
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";
......@@ -27,7 +31,7 @@ public class ConfigXcode
// ----------------------------- 修改BITCODE设置的例子 -----------------------------
project.SetBuildProperty(mainTargetGuid, "ENABLE_BITCODE", "NO");
// ----------------------------- 添加framework -----------------------------
// ----------------------------- 设置framework -----------------------------
project.AddFrameworkToProject(frameworkTargetGuid, "AppTrackingTransparency.framework", false);
project.AddFrameworkToProject(frameworkTargetGuid, "libz.dylib", false);
project.AddFrameworkToProject(frameworkTargetGuid, "libsqlite3.tbd", false);
......
......@@ -12,6 +12,24 @@ PluginImporter:
isExplicitlyReferenced: 0
validateReferences: 1
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:
Any:
second:
......@@ -20,9 +38,44 @@ PluginImporter:
- first:
Editor: Editor
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
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:
assetBundleName:
assetBundleVariant:
......@@ -334,52 +334,57 @@ public class CarUIControl : MonoBehaviour
currentCarTime = (int)entity.landPlantData.growthLastSecond;
//设置暂停状态
setPauseTime(currentCarTime);
//关闭上一次倒计时
if (timeControl != null)
if (progressBarImg != null)
{
StopCoroutine(timeControl);
}
if (currentCarTime > 0)
{
timeControl = StartCoroutine(timeConteller());
progressBarImg.fillAmount = 1 - (currentCarTime / (float)totalTime);
fruitTimeTv.text = ((1 - (currentCarTime / (float)totalTime)) * 100).ToString("f0") + "%";
}
////关闭上一次倒计时
//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)
{
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 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)
{
......
......@@ -541,12 +541,8 @@ public class DialogControl : MonoBehaviour
EventUtils.OnEvent("addDiamond_click", "点击钻石加号");
HttpTool.Instance._Get("app/v2/cscmnq/diamond_by_video_status", null, new Action<DiamondStatusBean>((bean) =>
{
<<<<<<< HEAD
DiamondRewardNum = bean.rewardDiamondNum;
=======
DiamondplayNum = bean.playNum;
>>>>>>> 203a308827d9b9dae2a93e572f7d221941fe2445
DiamondRewardNum = bean.rewardDiamondNum;
if (DiamondplayNum > 0)
{
rdp.Show(bean.rewardDiamondNum);
......@@ -963,7 +959,7 @@ public class DialogControl : MonoBehaviour
if (cb)
{
Debug.Log("关闭宝箱视频");
HttpTool.Instance._Post("app/v1/wdlc/reward/receive_box_reward", null, new Action<BoxReceiveBean>((bean) =>
HttpTool.Instance._Post("app/v2/cscmnq/receive_box_reward", null, new Action<BoxReceiveBean>((bean) =>
{
//OnOpenRewardDialog(bean);
if (bean.currencyType == 10)
......
......@@ -679,7 +679,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
AudioUtils.ins.PlayBtnAudio();
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);
// PlayerDataControl.Instance.VideoUnlockCarID = bean.lockNeedWatchVideoStartNum;
......
......@@ -67,7 +67,7 @@ public class StickDialog : MonoBehaviour
{
parm.Clear();
parm["landId"] = cancelStickId;
HttpTool.Instance._Post("app/v1/wdlc/clear_bug", parm, new Action<CleanBugBean>((bean) =>
HttpTool.Instance._Post("app/v2/cscmnq/clear_bug", parm, new Action<CleanBugBean>((bean) =>
{
EventCenter.Broadcast(MyEventType.UPDATE_LAND_DATA, bean.landStatus);
......
......@@ -188,7 +188,7 @@ public class LottlyControl : MonoBehaviour
{
setTurnable(bean);
//rewardType=5 钻石, rewardType=10 现金
//rewardType=20 钻石, rewardType=10 现金
//awardNum
Debug.Log("结果数据"+bean.rewardType+bean.awardCash);
type = bean.rewardType;
......@@ -215,7 +215,7 @@ public class LottlyControl : MonoBehaviour
isTuranable = false;
Debug.unityLogger.Log("ZhuanPanEvent 动画执行完毕");
EventCenter.Broadcast(MyEventType.RefreshLottlyData);
if (type == 5)
if (type == 20)
{
//展示收获钻石弹窗
GameObject.Find("Dialog").GetComponent<DialogControl>().showReceiveDiamondDialog(awardNum.ToString());
......
#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
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:
......@@ -90,7 +90,7 @@ public class Splash : MonoBehaviour
{
Constant.Instance.shubiao = false;
}
//Constant.Instance.shubiao = true;
Constant.Instance.shubiao = true;
novelInfo();
}), new Action<string, string>((code, errMsg) =>
{
......
......@@ -34,7 +34,6 @@ GraphicsSettings:
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment