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
45003df7
Commit
45003df7
authored
Jun 11, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实物奖励
parent
704b020a
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
138 additions
and
18 deletions
+138
-18
Scripts.meta
Assets/AdSDK/AD/CSJ/PangleAdapterScripts/Scripts.meta
+8
-0
iOS.meta
Assets/AdSDK/AD/CSJ/PangleSDK/iOS.meta
+8
-0
NetWork.meta
Assets/AdSDK/NetWork.meta
+8
-0
AwardCard.prefab
Assets/Game/Main/Prefabs/AwardCard.prefab
+1
-1
RARankList.prefab
Assets/Game/Main/Prefabs/RARankList.prefab
+3
-3
AdUtils.cs
Assets/Game/Main/Scripts/Utils/AdUtils.cs
+2
-0
HomeInfoControl.cs
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
+22
-0
FlipAnimation.cs
Assets/Game/Main/Scripts/dialog/RealAwards/FlipAnimation.cs
+49
-0
RAInputPhone.cs
Assets/Game/Main/Scripts/dialog/RealAwards/RAInputPhone.cs
+2
-0
RealAwards.cs
Assets/Game/Main/Scripts/dialog/RealAwards/RealAwards.cs
+15
-0
RealAwardsCard.cs
Assets/Game/Main/Scripts/dialog/RealAwards/RealAwardsCard.cs
+6
-6
RealAwardsVM.cs
Assets/Game/Main/Scripts/dialog/RealAwards/RealAwardsVM.cs
+7
-1
packages-lock.json
Packages/packages-lock.json
+7
-7
No files found.
Assets/AdSDK/AD/CSJ/PangleAdapterScripts/Scripts.meta
0 → 100644
View file @
45003df7
fileFormatVersion: 2
guid: e8fc61bed8a2640c7a2c6d5a51574621
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/AdSDK/AD/CSJ/PangleSDK/iOS.meta
0 → 100644
View file @
45003df7
fileFormatVersion: 2
guid: 9b3f9e305d4804719b5f4505912accf2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/AdSDK/NetWork.meta
0 → 100644
View file @
45003df7
fileFormatVersion: 2
guid: a75f8ac9bc3f8414cb9b1aca48735084
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Prefabs/AwardCard.prefab
View file @
45003df7
...
...
@@ -58,7 +58,7 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
0
}
m_RaycastTarget
:
1
m_Maskable
:
1
m_OnCullStateChanged
:
...
...
Assets/Game/Main/Prefabs/RARankList.prefab
View file @
45003df7
...
...
@@ -880,7 +880,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
1495
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0
,
y
:
1
}
---
!u!114
&3807820572441849827
MonoBehaviour
:
...
...
@@ -1509,7 +1509,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
"
\u5F53\u524D\u6392\u540D\uFF1A
199
"
m_Text
:
"
\u5F53\u524D\u6392\u540D\uFF1A
"
---
!u!1
&3807820573071006504
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1846,7 +1846,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
"
\u59D3
23v
\u4E2A\u540D
"
m_Text
:
---
!u!1
&3807820573243681190
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Game/Main/Scripts/Utils/AdUtils.cs
View file @
45003df7
...
...
@@ -24,6 +24,8 @@ public class AdUtils
public
static
void
PlayRewardAd
(
string
actionName
,
Action
<
bool
>
callback
)
{
IsShowRewardAd
=
true
;
//GetAdCd(actionName, callback);
#if UNITY_EDITOR
// ReportVideo(slot);
...
...
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
View file @
45003df7
...
...
@@ -206,6 +206,8 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
//mPresenter.GetParkInfo();
mPresenter
.
GetHomeInfo
();
mPresenter
.
GetLandList
();
transform
.
Find
(
"Title/shiwujiangli"
).
gameObject
.
AddComponent
<
Button
>().
onClick
.
AddListener
(
DidSelectedShiwujiangli
);
}
private
void
refreshHomeInfo
()
{
...
...
@@ -646,4 +648,24 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
AudioUtils
.
ins
.
PlayBtnAudio
();
caomeiDialog
.
SetActive
(
true
);
}
/// <summary>
/// 实物奖励按钮点击事件
/// </summary>
public
void
DidSelectedShiwujiangli
()
{
if
(
RealAwardsVM
.
dataModel
!=
null
)
{
if
(
RealAwardsVM
.
didChooseAward
)
{
// 已经选择过奖品, 直接弹出排行榜
FindObjectOfType
<
DialogControl
>().
ShowRARankList
();
}
else
{
// 未选择奖品, 显示抽奖页
FindObjectOfType
<
DialogControl
>().
ShowRealAwards
();
}
}
}
}
Assets/Game/Main/Scripts/dialog/RealAwards/FlipAnimation.cs
View file @
45003df7
...
...
@@ -86,6 +86,26 @@ public class FlipAnimation : MonoBehaviour
StartCoroutine
(
ToFront
());
}
/// <summary>
/// 外部调用的转到背面无动画方法
/// </summary>
public
void
StartBackNoAnimator
()
{
if
(
isActive
)
return
;
StartCoroutine
(
ToBackNoAnimator
());
}
/// <summary>
/// 外部调用的转到正面无动画方法
/// </summary>
public
void
StartFrontNoAnimator
()
{
if
(
isActive
)
return
;
StartCoroutine
(
ToFrontNoAnimator
());
}
/// <summary>
/// 翻转到背面
/// </summary>
...
...
@@ -114,4 +134,33 @@ public class FlipAnimation : MonoBehaviour
mCardState
=
CardState
.
Front
;
isActive
=
false
;
}
/// <summary>
/// 翻转到背面(无动画)
/// </summary>
IEnumerator
ToBackNoAnimator
()
{
isActive
=
true
;
mFront
.
transform
.
DORotate
(
new
Vector3
(
0
,
90
,
0
),
0
);
for
(
float
i
=
mTime
;
i
>=
0
;
i
-=
Time
.
deltaTime
)
yield
return
0
;
mBack
.
transform
.
DORotate
(
new
Vector3
(
0
,
0
,
0
),
0
);
mCardState
=
CardState
.
Back
;
isActive
=
false
;
}
/// <summary>
/// 翻转到正面(无动画)
/// </summary>
IEnumerator
ToFrontNoAnimator
()
{
isActive
=
true
;
mBack
.
transform
.
DORotate
(
new
Vector3
(
0
,
90
,
0
),
0
);
for
(
float
i
=
mTime
;
i
>=
0
;
i
-=
Time
.
deltaTime
)
yield
return
0
;
mFront
.
transform
.
DORotate
(
new
Vector3
(
0
,
0
,
0
),
0
);
mCardState
=
CardState
.
Front
;
isActive
=
false
;
}
}
Assets/Game/Main/Scripts/dialog/RealAwards/RAInputPhone.cs
View file @
45003df7
...
...
@@ -28,6 +28,8 @@ public class RAInputPhone : MonoBehaviour
{
if
(
cb
)
{
RealAwardsVM
.
RequestInternetForChooseAward
(
RealAwardsVM
.
awardModel
.
id
);
FindObjectOfType
<
DialogControl
>().
CloseRAInputPhone
();
FindObjectOfType
<
DialogControl
>().
ShowRARankList
();
...
...
Assets/Game/Main/Scripts/dialog/RealAwards/RealAwards.cs
View file @
45003df7
...
...
@@ -23,6 +23,21 @@ public class RealAwards : MonoBehaviour
{
RealAwardsVM
.
RequestInternetForData
();
//// 把卡牌翻转到背面
//for (int i = 1; i <= 6; i++)
//{
// Transform AwardCard = transform.Find("BgImage/AwardCards/AwardCard" + i);
// if (AwardCard != null && AwardCard.gameObject.activeSelf)
// {
// FlipAnimation flipAnimation = AwardCard.GetComponent<FlipAnimation>();
// flipAnimation.StartFrontNoAnimator();
// }
//}
//ifPlayedAnimator = false;
RefreshData
();
}
...
...
Assets/Game/Main/Scripts/dialog/RealAwards/RealAwardsCard.cs
View file @
45003df7
...
...
@@ -38,8 +38,6 @@ public class RealAwardsCard : MonoBehaviour
/// <returns></returns>
private
IEnumerator
LoadAwardImage
(
string
url
)
{
AwardImage
.
color
=
new
Color
(
1
,
1
,
1
,
0
);
UnityWebRequest
www
=
UnityWebRequestTexture
.
GetTexture
(
url
);
yield
return
www
.
SendWebRequest
();
...
...
@@ -68,18 +66,16 @@ public class RealAwardsCard : MonoBehaviour
}
// 选择奖品后点击无效
if
(
RealAwardsVM
.
didChooseAward
)
if
(
RealAwardsVM
.
cannotChooseOthers
)
{
return
;
}
RealAwardsVM
.
didChooseAward
=
true
;
RealAwardsVM
.
cannotChooseOthers
=
true
;
// 把数据变成抽中的奖品的数据
SetUpSubviews
(
RealAwardsVM
.
awardModel
);
RealAwardsVM
.
RequestInternetForChooseAward
(
RealAwardsVM
.
awardModel
.
id
);
// 把卡牌翻到正面
FlipAnimation
flipAnimation
=
gameObject
.
GetComponent
<
FlipAnimation
>();
flipAnimation
.
StartFront
();
...
...
@@ -96,6 +92,10 @@ public class RealAwardsCard : MonoBehaviour
{
yield
return
new
WaitForSeconds
(
1
);
RealAwardsVM
.
cannotChooseOthers
=
false
;
gameObject
.
GetComponent
<
FlipAnimation
>().
StartBackNoAnimator
();
FindObjectOfType
<
DialogControl
>().
CloseRealAwards
();
FindObjectOfType
<
DialogControl
>().
ShowRealAwardsWinDialog
();
...
...
Assets/Game/Main/Scripts/dialog/RealAwards/RealAwardsVM.cs
View file @
45003df7
...
...
@@ -31,11 +31,15 @@ public class RealAwardsVM : SingletonMono<RealAwardsVM>
/// <summary>
/// 是否已经选择了奖品
/// 选择奖品后, 点击其他卡牌无效
/// 选择后, 下次直接弹出奖品页, 不显示抽奖页
/// </summary>
public
static
bool
didChooseAward
;
/// <summary>
/// 点击奖品后, 不可点击其他奖品
/// </summary>
public
static
bool
cannotChooseOthers
;
/// <summary>
/// 获取实物奖励数据, 包括我的奖品、奖品列表、排行榜、我的排行
/// </summary>
...
...
@@ -48,6 +52,8 @@ public class RealAwardsVM : SingletonMono<RealAwardsVM>
if
(
dataModel
.
award
!=
null
)
{
awardModel
=
dataModel
.
award
;
didChooseAward
=
true
;
}
else
{
...
...
Packages/packages-lock.json
View file @
45003df7
...
...
@@ -5,14 +5,14 @@
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
"com.unity.ext.nunit"
:
{
"version"
:
"1.0.6"
,
"depth"
:
1
,
"source"
:
"registry"
,
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
"com.unity.ide.rider"
:
{
"version"
:
"1.1.4"
,
...
...
@@ -21,14 +21,14 @@
"dependencies"
:
{
"com.unity.test-framework"
:
"1.1.1"
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
"com.unity.ide.vscode"
:
{
"version"
:
"1.2.3"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
"com.unity.test-framework"
:
{
"version"
:
"1.1.20"
,
...
...
@@ -39,7 +39,7 @@
"com.unity.modules.imgui"
:
"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"
:
{
"version"
:
"2.1.1"
,
...
...
@@ -48,14 +48,14 @@
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
"com.unity.timeline"
:
{
"version"
:
"1.2.17"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{},
"url"
:
"https://packages.unity.c
n
"
"url"
:
"https://packages.unity.c
om
"
},
"com.unity.ugui"
:
{
"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