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
8676e81f
Commit
8676e81f
authored
May 07, 2021
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
种树赚钱弹窗数据填充
parent
6ed4134a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
435 additions
and
28 deletions
+435
-28
HttpTool.cs
Assets/AdSDK/NetWork/HTTP/HttpTool.cs
+1
-1
item_plant_make_money.prefab
Assets/Game/Main/Prefabs/item_plant_make_money.prefab
+346
-0
item_plant_make_money.prefab.meta
Assets/Game/Main/Prefabs/item_plant_make_money.prefab.meta
+7
-0
CrazyCar.unity
Assets/Game/Main/Scenes/CrazyCar.unity
+16
-16
PlantMakeMoneyItem.cs
Assets/Game/Main/Scripts/Item/PlantMakeMoneyItem.cs
+23
-0
PlantMakeMoneyItem.cs.meta
Assets/Game/Main/Scripts/Item/PlantMakeMoneyItem.cs.meta
+11
-0
WoodConfigList.cs
Assets/Game/Main/Scripts/Model/WoodConfigList.cs
+6
-0
WoodConfigList.cs.meta
Assets/Game/Main/Scripts/Model/WoodConfigList.cs.meta
+11
-0
PlantMakeMoney.cs
Assets/Game/Main/Scripts/View/PlantMakeMoney.cs
+14
-11
No files found.
Assets/AdSDK/NetWork/HTTP/HttpTool.cs
View file @
8676e81f
...
@@ -23,7 +23,7 @@ public class HttpTool : MonoBehaviour
...
@@ -23,7 +23,7 @@ public class HttpTool : MonoBehaviour
private
static
HttpTool
_instacne
=
null
;
private
static
HttpTool
_instacne
=
null
;
private
string
TEST_BASE_GAEM_URL
=
"http://feedapitest.zhangxinhulian.com/"
;
//测试游戏域名
private
string
TEST_BASE_GAEM_URL
=
"http://feedapitest
3
.zhangxinhulian.com/"
;
//测试游戏域名
private
string
TEST_BASE_AD_URL
=
"https://bstest.zhangxinhulian.com/"
;
//测试广告域名
private
string
TEST_BASE_AD_URL
=
"https://bstest.zhangxinhulian.com/"
;
//测试广告域名
private
string
TEST_BASE_EVENT_URL
=
"http://reporttest.zhangxinhulian.com/"
;
//测试上报域名
private
string
TEST_BASE_EVENT_URL
=
"http://reporttest.zhangxinhulian.com/"
;
//测试上报域名
...
...
Assets/Game/Main/Prefabs/item_plant_make_money.prefab
0 → 100644
View file @
8676e81f
This diff is collapsed.
Click to expand it.
Assets/Game/Main/Prefabs/item_plant_make_money.prefab.meta
0 → 100644
View file @
8676e81f
fileFormatVersion: 2
guid: c63feb90348df4797a142633c1e0f7f9
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scenes/CrazyCar.unity
View file @
8676e81f
...
@@ -14441,7 +14441,7 @@ RectTransform:
...
@@ -14441,7 +14441,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.00055163977}
m_AnchoredPosition: {x: 0, y: 0.00055163977}
m_SizeDelta: {x:
0
, y: 0}
m_SizeDelta: {x:
-698
, y: 0}
m_Pivot: {x: 0, y: 1}
m_Pivot: {x: 0, y: 1}
--- !u!114 &508766706
--- !u!114 &508766706
MonoBehaviour:
MonoBehaviour:
...
@@ -18581,7 +18581,8 @@ MonoBehaviour:
...
@@ -18581,7 +18581,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_EditorClassIdentifier:
BgImg: {fileID: 633442738}
BgImg: {fileID: 633442738}
contentParent: {fileID: 1753209877}
contentParent: {fileID: 1753209877}
harvestItemObj: {fileID: 0}
plantmakemoenyItem: {fileID: 5531816876642120073, guid: c63feb90348df4797a142633c1e0f7f9,
type: 3}
--- !u!1 &646497721
--- !u!1 &646497721
GameObject:
GameObject:
m_ObjectHideFlags: 0
m_ObjectHideFlags: 0
...
@@ -20003,7 +20004,7 @@ GameObject:
...
@@ -20003,7 +20004,7 @@ GameObject:
m_Icon: {fileID: 0}
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 0
m_IsActive:
1
m_IsActive:
0
--- !u!224 &703432076
--- !u!224 &703432076
RectTransform:
RectTransform:
m_ObjectHideFlags: 0
m_ObjectHideFlags: 0
...
@@ -28644,7 +28645,7 @@ RectTransform:
...
@@ -28644,7 +28645,7 @@ RectTransform:
m_RootOrder: 0
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x:
0, y: 0
}
m_AnchorMax: {x:
1, y: 1
}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0.5, y: 0.5}
...
@@ -46106,9 +46107,9 @@ RectTransform:
...
@@ -46106,9 +46107,9 @@ RectTransform:
m_RootOrder: 0
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x:
0, y: 0
}
m_AnchorMax: {x:
1, y: 1
}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x:
0
, y: 0}
m_SizeDelta: {x:
-17
, y: 0}
m_Pivot: {x: 0, y: 1}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1645377759
--- !u!114 &1645377759
MonoBehaviour:
MonoBehaviour:
...
@@ -49124,8 +49125,8 @@ GameObject:
...
@@ -49124,8 +49125,8 @@ GameObject:
serializedVersion: 6
serializedVersion: 6
m_Component:
m_Component:
- component: {fileID: 1753209880}
- component: {fileID: 1753209880}
- component: {fileID: 1753209879}
- component: {fileID: 1753209878}
- component: {fileID: 1753209878}
- component: {fileID: 1753209879}
m_Layer: 5
m_Layer: 5
m_Name: Content
m_Name: Content
m_TagString: Untagged
m_TagString: Untagged
...
@@ -49156,22 +49157,21 @@ MonoBehaviour:
...
@@ -49156,22 +49157,21 @@ MonoBehaviour:
m_GameObject: {fileID: 1753209877}
m_GameObject: {fileID: 1753209877}
m_Enabled: 1
m_Enabled: 1
m_EditorHideFlags: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid:
59f8146938fff824cb5fd77236b75775
, type: 3}
m_Script: {fileID: 11500000, guid:
8a8695521f0d02e499659fee002a26c2
, type: 3}
m_Name:
m_Name:
m_EditorClassIdentifier:
m_EditorClassIdentifier:
m_Padding:
m_Padding:
m_Left:
3
5
m_Left:
6
5
m_Right: 0
m_Right: 0
m_Top: 0
m_Top: 0
m_Bottom: 0
m_Bottom: 0
m_ChildAlignment: 0
m_ChildAlignment: 0
m_Spacing: 5
m_StartCorner: 0
m_ChildForceExpandWidth: 0
m_StartAxis: 0
m_ChildForceExpandHeight: 0
m_CellSize: {x: 100, y: 156}
m_ChildControlWidth: 1
m_Spacing: {x: 32, y: 40}
m_ChildControlHeight: 1
m_Constraint: 1
m_ChildScaleWidth: 0
m_ConstraintCount: 5
m_ChildScaleHeight: 0
--- !u!224 &1753209880
--- !u!224 &1753209880
RectTransform:
RectTransform:
m_ObjectHideFlags: 0
m_ObjectHideFlags: 0
Assets/Game/Main/Scripts/Item/PlantMakeMoneyItem.cs
0 → 100644
View file @
8676e81f
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
public
class
PlantMakeMoneyItem
:
MonoBehaviour
{
public
Text
tvname
;
public
Image
img_icon
;
public
Sprite
[]
labels
;
//菜的标签
private
WoodConfigList
item
;
public
void
setItemData
(
WoodConfigList
bean
)
{
item
=
bean
;
tvname
.
text
=
bean
.
name
;
img_icon
.
sprite
=
labels
[
bean
.
id
-
1
];
}
public
void
clickPlant
()
{
Debug
.
Log
(
"点击的Id"
+
item
.
id
+
item
.
name
);
}
}
Assets/Game/Main/Scripts/Item/PlantMakeMoneyItem.cs.meta
0 → 100644
View file @
8676e81f
fileFormatVersion: 2
guid: 85544bc0c74314c98865bc889cf42411
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scripts/Model/WoodConfigList.cs
0 → 100644
View file @
8676e81f
using
System
;
public
class
WoodConfigList
{
public
int
id
;
public
string
name
;
}
Assets/Game/Main/Scripts/Model/WoodConfigList.cs.meta
0 → 100644
View file @
8676e81f
fileFormatVersion: 2
guid: a6cc5b46e0a9d46fca973c6131214563
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scripts/View/PlantMakeMoney.cs
View file @
8676e81f
...
@@ -12,7 +12,7 @@ public class PlantMakeMoney : MonoBehaviour
...
@@ -12,7 +12,7 @@ public class PlantMakeMoney : MonoBehaviour
private
float
mDefaultPosY
;
private
float
mDefaultPosY
;
public
GameObject
contentParent
;
public
GameObject
contentParent
;
public
GameObject
harvestItemObj
;
public
GameObject
plantmakemoenyItem
;
private
void
Awake
()
private
void
Awake
()
{
{
// mPresenter = new ClockInPresenter(this);
// mPresenter = new ClockInPresenter(this);
...
@@ -23,7 +23,7 @@ public class PlantMakeMoney : MonoBehaviour
...
@@ -23,7 +23,7 @@ public class PlantMakeMoney : MonoBehaviour
private
void
OnUpdateTaskList
()
private
void
OnUpdateTaskList
()
{
{
get
Task
List
();
get
WoodCofig
List
();
}
}
private
void
OnDestroy
()
private
void
OnDestroy
()
...
@@ -35,16 +35,17 @@ public class PlantMakeMoney : MonoBehaviour
...
@@ -35,16 +35,17 @@ public class PlantMakeMoney : MonoBehaviour
private
void
Start
()
private
void
Start
()
{
{
mDefaultPosY
=
transform
.
localPosition
.
y
;
mDefaultPosY
=
transform
.
localPosition
.
y
;
get
Task
List
();
get
WoodCofig
List
();
// mPresenter.GetClockInTaskList();
// mPresenter.GetClockInTaskList();
}
}
private
void
get
Task
List
()
private
void
get
WoodCofig
List
()
{
{
Debug
.
Log
(
"获取任务列表"
);
Debug
.
Log
(
"获取任务列表"
);
HttpTool
.
Instance
.
_Get
(
"app/v
1/wdlc/task/diamond_task_list"
,
null
,
new
Action
<
TaskDiamondBean
>((
bean
)
=>
HttpTool
.
Instance
.
_Get
(
"app/v
2/wdlc/wood_config_list"
,
null
,
new
Action
<
List
<
WoodConfigList
>
>((
bean
)
=>
{
{
SetTaskListInfo
(
bean
);
//SetTaskListInfo(bean);
setData
(
bean
);
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
{
Debug
.
unityLogger
.
Log
(
"获取任务列表 请求失败"
+
code
+
errMsg
);
Debug
.
unityLogger
.
Log
(
"获取任务列表 请求失败"
+
code
+
errMsg
);
...
@@ -52,9 +53,9 @@ public class PlantMakeMoney : MonoBehaviour
...
@@ -52,9 +53,9 @@ public class PlantMakeMoney : MonoBehaviour
}
}
private
void
SetTaskListInfo
(
TaskDiamondBean
bean
)
private
void
setData
(
List
<
WoodConfigList
>
bean
)
{
{
if
(
bean
!=
null
)
if
(
bean
!=
null
&&
bean
.
Count
>
0
)
{
{
int
num
=
contentParent
.
transform
.
childCount
;
int
num
=
contentParent
.
transform
.
childCount
;
if
(
num
>
0
)
if
(
num
>
0
)
...
@@ -64,14 +65,16 @@ public class PlantMakeMoney : MonoBehaviour
...
@@ -64,14 +65,16 @@ public class PlantMakeMoney : MonoBehaviour
Destroy
(
contentParent
.
transform
.
GetChild
(
i
).
gameObject
);
Destroy
(
contentParent
.
transform
.
GetChild
(
i
).
gameObject
);
}
}
}
}
for
(
int
i
=
0
;
i
<
bean
.
taskList
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
bean
.
Count
;
i
++)
{
{
GameObject
itemObj
=
Instantiate
(
harvestItemObj
,
contentParent
.
transform
);
GameObject
itemObj
=
Instantiate
(
plantmakemoenyItem
,
contentParent
.
transform
);
itemObj
.
GetComponent
<
TaskItem
>().
setItemData
(
bean
.
taskList
[
i
]);
itemObj
.
GetComponent
<
PlantMakeMoneyItem
>().
setItemData
(
bean
[
i
]);
}
}
}
}
}
}
//打开打卡任务面板
//打开打卡任务面板
public
void
OnClickOpenHarvestInPanel
()
public
void
OnClickOpenHarvestInPanel
()
{
{
...
...
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