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
5b0d9dbf
Commit
5b0d9dbf
authored
Jul 01, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
9b00e133
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
4 deletions
+82
-4
CarPresenter.cs
Assets/Game/Main/Scripts/Presenter/CarPresenter.cs
+5
-4
FastPlanting.cs
Assets/Game/Main/Scripts/View/FastPlanting.cs
+66
-0
FastPlanting.cs.meta
Assets/Game/Main/Scripts/View/FastPlanting.cs.meta
+11
-0
No files found.
Assets/Game/Main/Scripts/Presenter/CarPresenter.cs
View file @
5b0d9dbf
...
...
@@ -131,7 +131,7 @@ public class CarPresenter : CarContract.Presenter
#endif
Guide
.
guide
.
onClickStep3
();
//EventUtils.OnEvent("newUser_cashOut", "当日新用户完成引导提现");
EventCenter
.
Broadcast
(
MyEventType
.
FlyRedPack
,
landId
);
EventCenter
.
Broadcast
(
MyEventType
.
FlyRedPack
,
landId
);
// EventCenter.Broadcast(MyEventType.FlyGuoshi, landId);
mView
.
CarInfo
(
bean
.
landStatusDTO
);
EventCenter
.
Broadcast
(
MyEventType
.
ShowCashTrips
,
bean
.
harvestPlantPrice
.
ToString
());
...
...
@@ -141,6 +141,7 @@ public class CarPresenter : CarContract.Presenter
{
GameObject
.
Find
(
"Dialog"
).
GetComponent
<
DialogControl
>().
ShowJingxiDialog
();
}
LeeMainController
.
Instance
.
UpdateTitleBG2Info
();
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
...
...
Assets/Game/Main/Scripts/View/FastPlanting.cs
0 → 100644
View file @
5b0d9dbf
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
/// <summary>
/// 首页点击任务快捷种植
/// </summary>
public
class
FastPlanting
:
SingletonMono
<
FastPlanting
>
{
public
List
<
LandListData
>
landListDatas
=
new
List
<
LandListData
>();
/// <summary>
/// 在第一个可用的地块上种植蔬菜
/// </summary>
/// <param name="plantId">要种植的蔬菜id</param>
public
void
Planting
(
int
plantId
)
{
// 是否有未解锁的菜地
bool
ifLocking
=
false
;
// 是否可以种植
bool
ifCanPlanting
=
false
;
foreach
(
var
item
in
landListDatas
)
{
if
(
item
.
status
==
1
)
{
ifCanPlanting
=
true
;
Dictionary
<
string
,
object
>
parameters
=
new
Dictionary
<
string
,
object
>();
parameters
[
"landId"
]
=
item
.
landId
;
parameters
[
"plantId"
]
=
plantId
;
HttpTool
.
Instance
.
_Post
(
"app/v2/cscmnq/seed"
,
parameters
,
new
Action
<
LandListData
>((
bean
)
=>
{
FindObjectOfType
<
HomeInfoControl
>().
OnUpdateCarListData
();
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
}));
return
;
}
if
(
item
.
status
==
0
)
{
ifLocking
=
true
;
}
}
if
(!
ifCanPlanting
)
{
if
(
ifLocking
)
{
ToastPlugin
.
ToastHelper
.
ShowToast
(
"没有地方种菜了,快去解锁土地吧"
);
}
else
{
ToastPlugin
.
ToastHelper
.
ShowToast
(
"最多只能同时种植6颗蔬菜哦"
);
}
}
}
}
Assets/Game/Main/Scripts/View/FastPlanting.cs.meta
0 → 100644
View file @
5b0d9dbf
fileFormatVersion: 2
guid: c649e2248d43e47e99dda0da4b673d83
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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