Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
First_FKQCW
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
王雪伟
First_FKQCW
Commits
e528e166
Commit
e528e166
authored
May 13, 2021
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车列表
parent
22179876
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
16 deletions
+99
-16
Car.prefab
Assets/Game/Main/Prefabs/Car.prefab
+9
-5
CarContract.cs
Assets/Game/Main/Scripts/Contract/CarContract.cs
+7
-0
CarPresenter.cs
Assets/Game/Main/Scripts/Presenter/CarPresenter.cs
+18
-2
CarDataControl.cs
Assets/Game/Main/Scripts/View/CarDataControl.cs
+9
-0
CarUIControl.cs
Assets/Game/Main/Scripts/View/CarUIControl.cs
+11
-7
EveryDayControl.cs
Assets/Game/Main/Scripts/View/EveryDayControl.cs
+10
-0
HomeInfoControl.cs
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
+35
-2
No files found.
Assets/Game/Main/Prefabs/Car.prefab
View file @
e528e166
...
@@ -285,7 +285,7 @@ CanvasGroup:
...
@@ -285,7 +285,7 @@ CanvasGroup:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
455528767290619782
}
m_GameObject
:
{
fileID
:
455528767290619782
}
m_Enabled
:
1
m_Enabled
:
1
m_Alpha
:
1
m_Alpha
:
0
m_Interactable
:
1
m_Interactable
:
1
m_BlocksRaycasts
:
1
m_BlocksRaycasts
:
1
m_IgnoreParentGroups
:
0
m_IgnoreParentGroups
:
0
...
@@ -1310,9 +1310,13 @@ MonoBehaviour:
...
@@ -1310,9 +1310,13 @@ MonoBehaviour:
floatStickObj
:
{
fileID
:
912378304521807189
}
floatStickObj
:
{
fileID
:
912378304521807189
}
floatUpdateObj
:
{
fileID
:
762901296262371212
}
floatUpdateObj
:
{
fileID
:
762901296262371212
}
wait_car_lv
:
{
fileID
:
7044497534119971449
}
wait_car_lv
:
{
fileID
:
7044497534119971449
}
wait_car_name
:
{
fileID
:
8713304315439543895
}
get_car_lv
:
{
fileID
:
6673880531657116118
}
get_car_lv
:
{
fileID
:
6673880531657116118
}
get_car_name
:
{
fileID
:
2802716176765414323
}
update_car_lv
:
{
fileID
:
4727704433475320167
}
update_car_lv
:
{
fileID
:
4727704433475320167
}
level_coin
:
{
fileID
:
5117247163371686327
}
level_coin
:
{
fileID
:
5117247163371686327
}
update_car_name
:
{
fileID
:
8220562401280959265
}
proction
:
{
fileID
:
613104889841395424
}
mTimerCG
:
{
fileID
:
1483011184502997944
}
mTimerCG
:
{
fileID
:
1483011184502997944
}
FlyCoinCar
:
{
fileID
:
455528768893061780
}
FlyCoinCar
:
{
fileID
:
455528768893061780
}
FlyCoinObj
:
{
fileID
:
6190847088453777850
}
FlyCoinObj
:
{
fileID
:
6190847088453777850
}
...
@@ -2020,7 +2024,7 @@ MonoBehaviour:
...
@@ -2020,7 +2024,7 @@ MonoBehaviour:
m_PersistentCalls
:
m_PersistentCalls
:
m_Calls
:
m_Calls
:
-
m_Target
:
{
fileID
:
455528768202490609
}
-
m_Target
:
{
fileID
:
455528768202490609
}
m_MethodName
:
OnClick
Speed
Car
m_MethodName
:
OnClick
Update
Car
m_Mode
:
1
m_Mode
:
1
m_Arguments
:
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgument
:
{
fileID
:
0
}
...
@@ -2958,7 +2962,7 @@ GameObject:
...
@@ -2958,7 +2962,7 @@ GameObject:
-
component
:
{
fileID
:
5066077494491596098
}
-
component
:
{
fileID
:
5066077494491596098
}
-
component
:
{
fileID
:
5117247163371686327
}
-
component
:
{
fileID
:
5117247163371686327
}
m_Layer
:
5
m_Layer
:
5
m_Name
:
Text
m_Name
:
coin
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
...
@@ -3036,7 +3040,7 @@ GameObject:
...
@@ -3036,7 +3040,7 @@ GameObject:
-
component
:
{
fileID
:
6312878048576377554
}
-
component
:
{
fileID
:
6312878048576377554
}
-
component
:
{
fileID
:
8220562401280959265
}
-
component
:
{
fileID
:
8220562401280959265
}
m_Layer
:
5
m_Layer
:
5
m_Name
:
Text
m_Name
:
name
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
...
@@ -3300,7 +3304,7 @@ GameObject:
...
@@ -3300,7 +3304,7 @@ GameObject:
-
component
:
{
fileID
:
1283727564970248323
}
-
component
:
{
fileID
:
1283727564970248323
}
-
component
:
{
fileID
:
4727704433475320167
}
-
component
:
{
fileID
:
4727704433475320167
}
m_Layer
:
5
m_Layer
:
5
m_Name
:
Text
m_Name
:
lv
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
...
...
Assets/Game/Main/Scripts/Contract/CarContract.cs
View file @
e528e166
...
@@ -29,11 +29,18 @@ public class CarContract
...
@@ -29,11 +29,18 @@ public class CarContract
/// <param name="parkingSpaceId"></param>
/// <param name="parkingSpaceId"></param>
void
GetPickInCar
(
int
parkingSpaceId
);
void
GetPickInCar
(
int
parkingSpaceId
);
/// <summary>
/// 升级车
/// </summary>
/// <param name="parkingSpaceId"></param>
void
GetUpdateCar
(
int
parkingSpaceId
);
/// <summary>
/// <summary>
/// 加速
/// 加速
/// </summary>
/// </summary>
/// <param name="parkingSpaceId"></param>
/// <param name="parkingSpaceId"></param>
void
GetAcceleratorCar
(
int
parkingSpaceId
,
bool
isVideo
);
void
GetAcceleratorCar
(
int
parkingSpaceId
,
bool
isVideo
);
}
}
}
}
Assets/Game/Main/Scripts/Presenter/CarPresenter.cs
View file @
e528e166
...
@@ -43,7 +43,7 @@ public class CarPresenter : CarContract.Presenter
...
@@ -43,7 +43,7 @@ public class CarPresenter : CarContract.Presenter
UnityEngine
.
Debug
.
unityLogger
.
Log
(
"加速剂不足 Error "
+
code
+
"errMsg"
+
errMsg
);
UnityEngine
.
Debug
.
unityLogger
.
Log
(
"加速剂不足 Error "
+
code
+
"errMsg"
+
errMsg
);
}));
}));
}
}
//停车
public
void
GetPickInCar
(
int
parkingSpaceId
)
public
void
GetPickInCar
(
int
parkingSpaceId
)
{
{
parm
.
Clear
();
parm
.
Clear
();
...
@@ -60,7 +60,7 @@ public class CarPresenter : CarContract.Presenter
...
@@ -60,7 +60,7 @@ public class CarPresenter : CarContract.Presenter
}));
}));
}
}
//取车
public
void
GetPickUpCar
(
int
parkingSpaceId
)
public
void
GetPickUpCar
(
int
parkingSpaceId
)
{
{
parm
.
Clear
();
parm
.
Clear
();
...
@@ -76,7 +76,21 @@ public class CarPresenter : CarContract.Presenter
...
@@ -76,7 +76,21 @@ public class CarPresenter : CarContract.Presenter
}));
}));
}
}
public
void
GetUpdateCar
(
int
parkingSpaceId
)
{
parm
.
Clear
();
parm
.
Add
(
"carId"
,
parkingSpaceId
);
HttpTool
.
Instance
.
_Post
(
"app/v1/game/fkqcw/parking/upgrade"
,
parm
,
new
Action
<
EmptyBean
>((
bean
)
=>
{
//Guide.guide.onClickStep3();
// mView.CarInfo(bean);
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_CAR_LIST_DATA
);
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
}));
}
public
void
GetUnLockCar
(
int
parkingSpaceId
)
public
void
GetUnLockCar
(
int
parkingSpaceId
)
{
{
//不需要看视频解锁
//不需要看视频解锁
...
@@ -125,4 +139,6 @@ public class CarPresenter : CarContract.Presenter
...
@@ -125,4 +139,6 @@ public class CarPresenter : CarContract.Presenter
}
}
}
}
Assets/Game/Main/Scripts/View/CarDataControl.cs
View file @
e528e166
...
@@ -111,6 +111,15 @@ public class CarDataControl : MonoBehaviour, CarContract.View
...
@@ -111,6 +111,15 @@ public class CarDataControl : MonoBehaviour, CarContract.View
mPresenter
.
GetPickInCar
(
carId
);
mPresenter
.
GetPickInCar
(
carId
);
}
}
/// <summary>
/// <summary>
/// 点击升级车
/// </summary>
public
void
OnClickUpdateCar
()
{
EventUtils
.
OnEvent
(
"update_click"
);
AudioUtils
.
ins
.
PlayBtnAudio
();
mPresenter
.
GetUpdateCar
(
carId
);
}
/// <summary>
/// 列表刷新数据收到的数据
/// 列表刷新数据收到的数据
/// </summary>
/// </summary>
/// <param name="arg"></param>
/// <param name="arg"></param>
...
...
Assets/Game/Main/Scripts/View/CarUIControl.cs
View file @
e528e166
...
@@ -20,10 +20,10 @@ public class CarUIControl : MonoBehaviour
...
@@ -20,10 +20,10 @@ public class CarUIControl : MonoBehaviour
//public GameObject floatStickTipsObj;//贴条提示
//public GameObject floatStickTipsObj;//贴条提示
public
GameObject
floatUpdateObj
;
//升级图标
public
GameObject
floatUpdateObj
;
//升级图标
public
Text
wait_car_lv
;
//停车时等级
public
Text
wait_car_lv
,
wait_car_name
;
//停车时等级
public
Text
get_car_lv
;
//取车时车等级
public
Text
get_car_lv
,
get_car_name
;
//取车时车等级
public
Text
update_car_lv
,
level_coin
;
//升级时等级和所需金币
public
Text
update_car_lv
,
level_coin
,
update_car_name
;
//升级时等级和所需金币
public
GameObject
proction
;
//保护罩
//倒计时CanvasGroup
//倒计时CanvasGroup
public
CanvasGroup
mTimerCG
;
public
CanvasGroup
mTimerCG
;
...
@@ -36,6 +36,7 @@ public class CarUIControl : MonoBehaviour
...
@@ -36,6 +36,7 @@ public class CarUIControl : MonoBehaviour
private
CarTypeImg
mCarImg
;
private
CarTypeImg
mCarImg
;
private
ParkingSpace
mCarData
;
private
ParkingSpace
mCarData
;
private
Coroutine
flyCoinTimeControl
;
private
Coroutine
flyCoinTimeControl
;
private
void
Awake
()
private
void
Awake
()
{
{
mCarImg
=
GetComponent
<
CarTypeImg
>();
mCarImg
=
GetComponent
<
CarTypeImg
>();
...
@@ -52,13 +53,16 @@ public class CarUIControl : MonoBehaviour
...
@@ -52,13 +53,16 @@ public class CarUIControl : MonoBehaviour
if
(
car
.
unlockCarName
!=
null
)
if
(
car
.
unlockCarName
!=
null
)
{
{
CarName
.
text
=
car
.
unlockCarName
;
CarName
.
text
=
car
.
unlockCarName
;
wait_car_name
.
text
=
car
.
unlockCarName
;
get_car_name
.
text
=
car
.
unlockCarName
;
update_car_name
.
text
=
car
.
unlockCarName
;
}
}
if
(
car
.
carDataDTO
!=
null
)
if
(
car
.
carDataDTO
!=
null
)
{
{
wait_car_lv
.
text
=
"
l
v"
+
car
.
carDataDTO
.
level
;
wait_car_lv
.
text
=
"
L
v"
+
car
.
carDataDTO
.
level
;
get_car_lv
.
text
=
"
l
v"
+
car
.
carDataDTO
.
level
;
get_car_lv
.
text
=
"
L
v"
+
car
.
carDataDTO
.
level
;
update_car_lv
.
text
=
"
l
v"
+
car
.
carDataDTO
.
level
;
update_car_lv
.
text
=
"
L
v"
+
car
.
carDataDTO
.
level
;
level_coin
.
text
=
car
.
carDataDTO
.
levelCoin
.
ToString
();
level_coin
.
text
=
car
.
carDataDTO
.
levelCoin
.
ToString
();
}
}
...
...
Assets/Game/Main/Scripts/View/EveryDayControl.cs
View file @
e528e166
...
@@ -19,6 +19,7 @@ public class EveryDayControl : MonoBehaviour
...
@@ -19,6 +19,7 @@ public class EveryDayControl : MonoBehaviour
public
Text
topComplateTv
;
//还剩余几颗
public
Text
topComplateTv
;
//还剩余几颗
public
Sprite
[]
btnSpriteArray
;
//提现按钮的背景
public
Sprite
[]
btnSpriteArray
;
//提现按钮的背景
public
GameObject
withdrawpage
;
void
Start
()
void
Start
()
{
{
getHeartList
();
getHeartList
();
...
@@ -126,5 +127,14 @@ public class EveryDayControl : MonoBehaviour
...
@@ -126,5 +127,14 @@ public class EveryDayControl : MonoBehaviour
}
}
}
}
/// <summary>
/// 关闭页面
/// </summary>
public
void
closeWithdrawalEveryDay
()
{
AudioUtils
.
ins
.
PlayBtnAudio
();
withdrawpage
.
SetActive
(
false
);
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_CAR_LIST_DATA
);
}
}
}
Assets/Game/Main/Scripts/View/HomeInfoControl.cs
View file @
e528e166
...
@@ -7,7 +7,7 @@ using UnityEngine.UI;
...
@@ -7,7 +7,7 @@ using UnityEngine.UI;
public
class
HomeInfoControl
:
MonoBehaviour
,
HomeContract
.
View
public
class
HomeInfoControl
:
MonoBehaviour
,
HomeContract
.
View
{
{
private
HomePresenter
mPresenter
;
private
HomePresenter
mPresenter
;
public
Text
CoinNumTV
,
StickTimerTV
,
DriverTimerTV
,
DoubleTimerTV
,
AllSpeedTimerTV
;
public
Text
CoinNumTV
,
StickTimerTV
,
DriverTimerTV
,
DoubleTimerTV
,
AllSpeedTimerTV
,
proTimerTv
;
//主页底部贴条倒计时
//主页底部贴条倒计时
//主页底部贴条文字
//主页底部贴条文字
//主页底部司机倒计时文字
//主页底部司机倒计时文字
...
@@ -16,6 +16,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
...
@@ -16,6 +16,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
public
Text
tvrewardCoinEveryMinute
,
tvrewardCashEveryMinute
;
public
Text
tvrewardCoinEveryMinute
,
tvrewardCashEveryMinute
;
public
Text
cashNumTv
,
levelTv
;
public
Text
cashNumTv
,
levelTv
;
public
GameObject
procetTimeObj
;
public
GameObject
procetTimeObj
;
public
GameObject
EveryDayWithDraw
;
private
void
Awake
()
private
void
Awake
()
{
{
mPresenter
=
new
HomePresenter
(
this
);
mPresenter
=
new
HomePresenter
(
this
);
...
@@ -112,7 +113,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
...
@@ -112,7 +113,7 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
//防护罩倒计时
//防护罩倒计时
private
int
protectionTime
;
private
int
protectionTime
;
private
Coroutine
protionControl
;
private
Coroutine
protionControl
;
p
rivate
void
setProction
(
int
time
)
p
ublic
void
setProction
(
int
time
)
{
{
protectionTime
=
time
;
protectionTime
=
time
;
if
(
protionControl
!=
null
)
if
(
protionControl
!=
null
)
...
@@ -121,10 +122,37 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
...
@@ -121,10 +122,37 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
}
}
if
(
protectionTime
>
0
)
if
(
protectionTime
>
0
)
{
{
procetTimeObj
.
SetActive
(
true
);
proTimerTv
.
text
=
UnityUtil
.
getCountdown
(
protectionTime
);
protionControl
=
StartCoroutine
(
IEProctionIimer
());
}
}
else
{
procetTimeObj
.
SetActive
(
false
);
}
}
}
private
IEnumerator
IEProctionIimer
()
{
while
(
protectionTime
>=
0
)
{
yield
return
new
WaitForSeconds
(
1f
);
if
(
protectionTime
<=
0
)
{
procetTimeObj
.
SetActive
(
false
);
StopCoroutine
(
protionControl
);
break
;
}
else
{
protectionTime
--;
proTimerTv
.
text
=
UnityUtil
.
getCountdown
(
protectionTime
);
}
}
}
private
int
StickCurrentTime
;
private
int
StickCurrentTime
;
private
Coroutine
StickTimeControl
;
private
Coroutine
StickTimeControl
;
/// <summary>
/// <summary>
...
@@ -335,4 +363,9 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
...
@@ -335,4 +363,9 @@ public class HomeInfoControl : MonoBehaviour, HomeContract.View
OnUpdateCarListData
();
OnUpdateCarListData
();
}
}
}
}
public
void
onClickEveryDayWithDraw
()
{
AudioUtils
.
ins
.
PlayBtnAudio
();
EveryDayWithDraw
.
SetActive
(
true
);
}
}
}
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