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
13d56782
Commit
13d56782
authored
Jul 19, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iOS修改
parent
06541005
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
74 additions
and
41 deletions
+74
-41
CSJFeedUtil.cs
Assets/Base/AdSDK/AD/CSJ/CSJFeedUtil.cs
+38
-2
GDTFeedAdUtil.cs
Assets/Base/AdSDK/AD/GDT/GDTFeedAdUtil.cs
+1
-0
GDTInterstitialAdUtil.cs
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
+1
-0
UnifiedInterstitialAd.cs
...SDK/Scripts/iOS/InstitialVideoAd/UnifiedInterstitialAd.cs
+9
-0
NativeExpressAd.cs
...GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
+9
-0
WithdrawEveryDay.meta
Assets/Game/Main/Resource/ui/WithdrawEveryDay.meta
+0
-8
Guide.cs
Assets/Game/Main/Scripts/Utils/Guide.cs
+1
-0
DialogControl.cs
Assets/Game/Main/Scripts/View/DialogControl.cs
+1
-17
Splash.cs
Assets/Scripts/Splash/Splash.cs
+1
-1
packages-lock.json
Packages/packages-lock.json
+13
-13
No files found.
Assets/Base/AdSDK/AD/CSJ/CSJFeedUtil.cs
View file @
13d56782
...
@@ -84,10 +84,25 @@ public class CSJFeedUtil : MonoBehaviour
...
@@ -84,10 +84,25 @@ public class CSJFeedUtil : MonoBehaviour
lastCallBack
=
callback
;
lastCallBack
=
callback
;
Debug
.
Log
(
"设备机型: "
+
SystemInfo
.
deviceModel
);
#if UNITY_IOS
int
ImageAcceptedWidth
;
// Screen.width在iPhone8p上获取的不对
if
(
SystemInfo
.
deviceModel
==
"iPhone10,2"
||
SystemInfo
.
deviceModel
==
"iPhone10,5"
)
{
ImageAcceptedWidth
=
1242
;
}
else
{
ImageAcceptedWidth
=
Screen
.
width
;
}
#endif
var
adSlot
=
new
AdSlot
.
Builder
()
var
adSlot
=
new
AdSlot
.
Builder
()
#if UNITY_IOS
#if UNITY_IOS
.
SetCodeId
(
entity
.
codeId
)
.
SetCodeId
(
entity
.
codeId
)
.
SetImageAcceptedSize
(
Screen
.
w
idth
,
0
)
.
SetImageAcceptedSize
(
ImageAcceptedW
idth
,
0
)
#else
#else
.
SetCodeId
(
entity
.
codeId
)
.
SetCodeId
(
entity
.
codeId
)
////期望模板广告view的size,单位dp,//高度设置为0,则高度会自适应
////期望模板广告view的size,单位dp,//高度设置为0,则高度会自适应
...
@@ -125,8 +140,29 @@ public class CSJFeedUtil : MonoBehaviour
...
@@ -125,8 +140,29 @@ public class CSJFeedUtil : MonoBehaviour
{
{
feedAd
=
feedAdCacheList
.
Dequeue
();
feedAd
=
feedAdCacheList
.
Dequeue
();
#if UNITY_IOS
#if UNITY_IOS
int
width
;
// Screen.width在iPhone8p上获取的不对
if
(
SystemInfo
.
deviceModel
==
"iPhone10,2"
||
SystemInfo
.
deviceModel
==
"iPhone10,5"
)
{
width
=
1242
;
}
else
{
width
=
Screen
.
width
;
}
int
height
;
// Screen.height在iPhone8p上获取的不对
if
(
SystemInfo
.
deviceModel
==
"iPhone10,2"
||
SystemInfo
.
deviceModel
==
"iPhone10,5"
)
{
height
=
2208
;
}
else
{
height
=
Screen
.
height
;
}
float
x
=
0
;
float
x
=
0
;
float
y
=
Screen
.
height
-
(
Screen
.
width
*
275.5f
/
375
)
-
(
IsX
?
45
:
0
);
float
y
=
height
-
(
width
*
275.5f
/
375
)
-
(
IsX
?
45
:
0
);
//if (y == 0)
//if (y == 0)
//{
//{
// y = 100; // 防止Demo里刘海遮挡
// y = 100; // 防止Demo里刘海遮挡
...
...
Assets/Base/AdSDK/AD/GDT/GDTFeedAdUtil.cs
View file @
13d56782
...
@@ -42,6 +42,7 @@ public class GDTFeedAdUtil
...
@@ -42,6 +42,7 @@ public class GDTFeedAdUtil
NativeExpressAd
ad
=
new
NativeExpressAd
(
entity
.
codeId
,
GetAdSize
());
NativeExpressAd
ad
=
new
NativeExpressAd
(
entity
.
codeId
,
GetAdSize
());
nativeExpressAd
=
ad
;
nativeExpressAd
=
ad
;
ad
.
SetEnableDefaultAudioSessionSetting
(
false
);
ad
.
SetListener
(
new
FeedAdListener
(
entity
,
callback
));
ad
.
SetListener
(
new
FeedAdListener
(
entity
,
callback
));
ad
.
LoadAd
(
1
);
ad
.
LoadAd
(
1
);
}
}
...
...
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
View file @
13d56782
...
@@ -39,6 +39,7 @@ public class GDTInterstitialAdUtil
...
@@ -39,6 +39,7 @@ public class GDTInterstitialAdUtil
//string posId = Constants.intersititialNoVideoPosId;//不带视频的插屏广告测试Id
//string posId = Constants.intersititialNoVideoPosId;//不带视频的插屏广告测试Id
UnifiedInterstitialAd
ad
=
new
UnifiedInterstitialAd
(
entity
.
codeId
);
UnifiedInterstitialAd
ad
=
new
UnifiedInterstitialAd
(
entity
.
codeId
);
ad
.
SetEnableDefaultAudioSessionSetting
(
false
);
ad
.
SetListener
(
new
UnifiedInterstitialAdListener
(
entity
,
ad
,
null
,
callback
));
ad
.
SetListener
(
new
UnifiedInterstitialAdListener
(
entity
,
ad
,
null
,
callback
));
ad
.
LoadAd
();
ad
.
LoadAd
();
}
}
...
...
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/InstitialVideoAd/UnifiedInterstitialAd.cs
View file @
13d56782
...
@@ -678,6 +678,15 @@ namespace Tencent.GDT
...
@@ -678,6 +678,15 @@ namespace Tencent.GDT
}
}
});
});
}
}
[
DllImport
(
"__Internal"
)]
private
static
extern
void
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
);
public
void
SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
)
{
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
audioSessionSetting
);
}
}
}
#endif
#endif
}
}
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
View file @
13d56782
...
@@ -543,6 +543,15 @@ namespace Tencent.GDT
...
@@ -543,6 +543,15 @@ namespace Tencent.GDT
}
}
});
});
}
}
[
DllImport
(
"__Internal"
)]
private
static
extern
void
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
);
public
void
SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
)
{
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
audioSessionSetting
);
}
}
}
#endif
#endif
}
}
Assets/Game/Main/Resource/ui/WithdrawEveryDay.meta
deleted
100644 → 0
View file @
06541005
fileFormatVersion: 2
guid: c8769dd604faf4fb9b727d8d2fe57934
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scripts/Utils/Guide.cs
View file @
13d56782
...
@@ -100,6 +100,7 @@ public class Guide : MonoBehaviour
...
@@ -100,6 +100,7 @@ public class Guide : MonoBehaviour
}
}
PlayerDataControl
.
Instance
.
IsNewUser
=
isUser
;
PlayerDataControl
.
Instance
.
IsNewUser
=
isUser
;
PlayerPrefs
.
SetInt
(
"finishedStrongGuide"
,
isUser
?
0
:
1
);
isStartShow
=
true
;
isStartShow
=
true
;
IsNewUser
=
isUser
;
IsNewUser
=
isUser
;
DissmissGuide
(
false
);
DissmissGuide
(
false
);
...
...
Assets/Game/Main/Scripts/View/DialogControl.cs
View file @
13d56782
...
@@ -511,15 +511,7 @@ public class DialogControl : MonoBehaviour
...
@@ -511,15 +511,7 @@ public class DialogControl : MonoBehaviour
}
}
private
void
moveDiamondDialog
()
private
void
moveDiamondDialog
()
{
{
#if UNITY_IOS
diamondcontent
.
GetComponent
<
RectTransform
>().
anchorMin
=
new
Vector2
(
0.5f
,
0.5f
);
diamondcontent
.
GetComponent
<
RectTransform
>().
anchorMax
=
new
Vector2
(
0.5f
,
0.5f
);
diamondcontent
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
new
Vector3
(
0
,
100
,
0
);
diamondcontent
.
transform
.
parent
.
Find
(
"CloseImage"
).
gameObject
.
SetActive
(
false
);
#else
diamondcontent
.
transform
.
localPosition
+=
new
Vector3
(
0
,
340
,
0
);
diamondcontent
.
transform
.
localPosition
+=
new
Vector3
(
0
,
340
,
0
);
#endif
}
}
//关闭获取钻石弹窗
//关闭获取钻石弹窗
public
void
closeDiamondDialog
()
public
void
closeDiamondDialog
()
...
@@ -620,15 +612,7 @@ public class DialogControl : MonoBehaviour
...
@@ -620,15 +612,7 @@ public class DialogControl : MonoBehaviour
}
}
private
void
moveAllSpeedDialog
()
private
void
moveAllSpeedDialog
()
{
{
#if UNITY_IOS
allspeedcontent
.
GetComponent
<
RectTransform
>().
anchorMin
=
new
Vector2
(
0.5f
,
0.5f
);
allspeedcontent
.
GetComponent
<
RectTransform
>().
anchorMax
=
new
Vector2
(
0.5f
,
0.5f
);
allspeedcontent
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
new
Vector3
(
0
,
100
,
0
);
allspeedcontent
.
transform
.
parent
.
Find
(
"CloseImage"
).
gameObject
.
SetActive
(
false
);
#else
allspeedcontent
.
transform
.
localPosition
+=
new
Vector3
(
0
,
320
,
0
);
allspeedcontent
.
transform
.
localPosition
+=
new
Vector3
(
0
,
320
,
0
);
#endif
}
}
private
void
showAd
()
private
void
showAd
()
{
{
...
@@ -1513,7 +1497,7 @@ public class DialogControl : MonoBehaviour
...
@@ -1513,7 +1497,7 @@ public class DialogControl : MonoBehaviour
/// </summary>
/// </summary>
private
void
moveHarvestHongBao
()
private
void
moveHarvestHongBao
()
{
{
transform
.
Find
(
"HarvestHongBao/BgImage"
).
localPosition
=
new
Vector3
(
0
,
3
7
0
,
0
);
transform
.
Find
(
"HarvestHongBao/BgImage"
).
localPosition
=
new
Vector3
(
0
,
3
2
0
,
0
);
}
}
/// <summary>
/// <summary>
...
...
Assets/Scripts/Splash/Splash.cs
View file @
13d56782
...
@@ -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
)
=>
{
{
...
...
Packages/packages-lock.json
View file @
13d56782
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
"dependencies"
:
{
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
"com.unity.ugui"
:
"1.0.0"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.analytics"
:
{
"com.unity.analytics"
:
{
"version"
:
"3.3.5"
,
"version"
:
"3.3.5"
,
...
@@ -28,21 +28,21 @@
...
@@ -28,21 +28,21 @@
"dependencies"
:
{
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
"com.unity.ugui"
:
"1.0.0"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.collab-proxy"
:
{
"com.unity.collab-proxy"
:
{
"version"
:
"1.2.16"
,
"version"
:
"1.2.16"
,
"depth"
:
0
,
"depth"
:
0
,
"source"
:
"registry"
,
"source"
:
"registry"
,
"dependencies"
:
{},
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.ext.nunit"
:
{
"com.unity.ext.nunit"
:
{
"version"
:
"1.0.6"
,
"version"
:
"1.0.6"
,
"depth"
:
1
,
"depth"
:
1
,
"source"
:
"registry"
,
"source"
:
"registry"
,
"dependencies"
:
{},
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.ide.rider"
:
{
"com.unity.ide.rider"
:
{
"version"
:
"1.1.4"
,
"version"
:
"1.1.4"
,
...
@@ -51,14 +51,14 @@
...
@@ -51,14 +51,14 @@
"dependencies"
:
{
"dependencies"
:
{
"com.unity.test-framework"
:
"1.1.1"
"com.unity.test-framework"
:
"1.1.1"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.ide.vscode"
:
{
"com.unity.ide.vscode"
:
{
"version"
:
"1.2.3"
,
"version"
:
"1.2.3"
,
"depth"
:
0
,
"depth"
:
0
,
"source"
:
"registry"
,
"source"
:
"registry"
,
"dependencies"
:
{},
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.multiplayer-hlapi"
:
{
"com.unity.multiplayer-hlapi"
:
{
"version"
:
"1.0.8"
,
"version"
:
"1.0.8"
,
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
"dependencies"
:
{
"dependencies"
:
{
"nuget.mono-cecil"
:
"0.1.6-preview"
"nuget.mono-cecil"
:
"0.1.6-preview"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.purchasing"
:
{
"com.unity.purchasing"
:
{
"version"
:
"2.2.1"
,
"version"
:
"2.2.1"
,
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
"dependencies"
:
{
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
"com.unity.ugui"
:
"1.0.0"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.test-framework"
:
{
"com.unity.test-framework"
:
{
"version"
:
"1.1.20"
,
"version"
:
"1.1.20"
,
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
"com.unity.modules.imgui"
:
"1.0.0"
,
"com.unity.modules.imgui"
:
"1.0.0"
,
"com.unity.modules.jsonserialize"
:
"1.0.0"
"com.unity.modules.jsonserialize"
:
"1.0.0"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.textmeshpro"
:
{
"com.unity.textmeshpro"
:
{
"version"
:
"2.1.1"
,
"version"
:
"2.1.1"
,
...
@@ -96,14 +96,14 @@
...
@@ -96,14 +96,14 @@
"dependencies"
:
{
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
"com.unity.ugui"
:
"1.0.0"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.timeline"
:
{
"com.unity.timeline"
:
{
"version"
:
"1.2.17"
,
"version"
:
"1.2.17"
,
"depth"
:
0
,
"depth"
:
0
,
"source"
:
"registry"
,
"source"
:
"registry"
,
"dependencies"
:
{},
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.ugui"
:
{
"com.unity.ugui"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
...
@@ -122,14 +122,14 @@
...
@@ -122,14 +122,14 @@
"com.unity.modules.vr"
:
"1.0.0"
,
"com.unity.modules.vr"
:
"1.0.0"
,
"com.unity.modules.xr"
:
"1.0.0"
"com.unity.modules.xr"
:
"1.0.0"
},
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"nuget.mono-cecil"
:
{
"nuget.mono-cecil"
:
{
"version"
:
"0.1.6-preview"
,
"version"
:
"0.1.6-preview"
,
"depth"
:
1
,
"depth"
:
1
,
"source"
:
"registry"
,
"source"
:
"registry"
,
"dependencies"
:
{},
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
},
"com.unity.modules.ai"
:
{
"com.unity.modules.ai"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.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