Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
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
王雪伟
LuckyFarm
Commits
d327cbc0
Commit
d327cbc0
authored
Jan 04, 2021
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
芭芭农场1.2.0上线代码
parent
1ceaee9d
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
67 additions
and
36 deletions
+67
-36
GameActivity.kt
app/src/main/java/com/ym/game/GameActivity.kt
+53
-29
MainDialog.kt
app/src/main/java/com/ym/game/view/MainDialog.kt
+8
-2
icon_speed_all_no_look.png
app/src/main/res/drawable-xhdpi/icon_speed_all_no_look.png
+0
-0
icon_speed_all_no_look_press.png
.../main/res/drawable-xhdpi/icon_speed_all_no_look_press.png
+0
-0
select_all_speed_no_look.xml
app/src/main/res/drawable/select_all_speed_no_look.xml
+5
-0
dialog_cloud_speed.xml
app/src/main/res/layout/dialog_cloud_speed.xml
+1
-5
Assembly-CSharp.dll
game/src/main/assets/bin/Data/Managed/Assembly-CSharp.dll
+0
-0
Unity.Analytics.DataPrivacy.dll
...n/assets/bin/Data/Managed/Unity.Analytics.DataPrivacy.dll
+0
-0
Unity.TextMeshPro.dll
game/src/main/assets/bin/Data/Managed/Unity.TextMeshPro.dll
+0
-0
globalgamemanagers
game/src/main/assets/bin/Data/globalgamemanagers
+0
-0
level1
game/src/main/assets/bin/Data/level1
+0
-0
No files found.
app/src/main/java/com/ym/game/GameActivity.kt
View file @
d327cbc0
...
@@ -633,6 +633,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
...
@@ -633,6 +633,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
}
}
})
})
}
}
//解锁地块本地同步服务端 解锁地块传1 种植种子传2 收获果实传3 解锁倒计时4
//解锁地块本地同步服务端 解锁地块传1 种植种子传2 收获果实传3 解锁倒计时4
fun
getUnlockLandNew2
(
id
:
Int
,
type
:
Int
,
time
:
Int
)
{
fun
getUnlockLandNew2
(
id
:
Int
,
type
:
Int
,
time
:
Int
)
{
GameApiClient
.
gameApi
.
getlockLand
(
id
)
GameApiClient
.
gameApi
.
getlockLand
(
id
)
...
@@ -1108,13 +1109,16 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
...
@@ -1108,13 +1109,16 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
fun
showCloudDialog
(
speedtime
:
Int
,
sppedtimes
:
Int
,
type
:
Int
)
{
fun
showCloudDialog
(
speedtime
:
Int
,
sppedtimes
:
Int
,
type
:
Int
)
{
MainLooper
.
get
()
?.
post
(
Runnable
{
MainLooper
.
get
()
?.
post
(
Runnable
{
// CashExchangeDialog.showCashExchage(this, this)
// CashExchangeDialog.showCashExchage(this, this)
MainDialog
.
showDialogCloud
(
this
,
speedtime
,
sppedtimes
,
View
.
OnClickListener
{
MainDialog
.
showDialogCloud
(
this
,
speedtime
,
sppedtimes
,
type
,
View
.
OnClickListener
{
if
(
type
==
1
)
{
AdUtils
.
playRewardAd
(
AdUtils
.
playRewardAd
(
this
@GameActivity
,
this
@GameActivity
,
"cloud_acceleration_click"
,
"cloud_acceleration_click"
,
object
:
IAdVideoListener
{
object
:
IAdVideoListener
{
override
fun
onAdClose
()
{
override
fun
onAdClose
()
{
GameApiClient
.
gameApi
.
getCloudSpeed
()
GameApiClient
.
gameApi
.
getCloudSpeed
()
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
StatusEntity
>()
{
.
subscribe
(
object
:
BaseObserver
<
StatusEntity
>()
{
...
@@ -1139,7 +1143,27 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
...
@@ -1139,7 +1143,27 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
}
}
})
})
}
else
{
GameApiClient
.
gameApi
.
getCloudSpeed
()
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
StatusEntity
>()
{
override
fun
onSuccess
(
result
:
StatusEntity
?)
{
// callback?.onCloudSpeedSuccess(true, Utils.obj2Str(result))
callUnity
(
"Form_land"
,
"showCloudSpeedAnim"
,
""
)
getListLandNew
(
2
)
}
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?
)
{
//callback?.onCloudSpeedSuccess(false, errorMsg + "")
}
})
})
}
}
)
})
})
}
}
...
...
app/src/main/java/com/ym/game/view/MainDialog.kt
View file @
d327cbc0
...
@@ -606,6 +606,7 @@ object MainDialog {
...
@@ -606,6 +606,7 @@ object MainDialog {
activity
:
Activity
?,
activity
:
Activity
?,
speedtime
:
Int
,
speedtime
:
Int
,
speedtimes
:
Int
,
speedtimes
:
Int
,
type
:
Int
,
onClickListener
:
View
.
OnClickListener
onClickListener
:
View
.
OnClickListener
)
{
)
{
if
(
activity
==
null
)
return
if
(
activity
==
null
)
return
...
@@ -619,6 +620,7 @@ object MainDialog {
...
@@ -619,6 +620,7 @@ object MainDialog {
)
)
EventUtils
.
onEvent
(
"show_cloud_speed_up_dialog"
,
"云朵加速弹窗"
)
EventUtils
.
onEvent
(
"show_cloud_speed_up_dialog"
,
"云朵加速弹窗"
)
val
layoutAd
=
mDialogView
?.
findViewById
<
FrameLayout
>(
R
.
id
.
layout_get_drop_ad
)
val
layoutAd
=
mDialogView
?.
findViewById
<
FrameLayout
>(
R
.
id
.
layout_get_drop_ad
)
val
id_img_all_speed
=
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
id_img_all_speed
)
AdUtils
.
showFeedAd
(
activity
,
"cloud_speed_bigimage"
,
layoutAd
)
AdUtils
.
showFeedAd
(
activity
,
"cloud_speed_bigimage"
,
layoutAd
)
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_speed_time
)
?.
text
=
"所有土地获得${speedtime}分钟加速"
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_speed_time
)
?.
text
=
"所有土地获得${speedtime}分钟加速"
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_cloud_speed_num
)
?.
text
=
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_cloud_speed_num
)
?.
text
=
...
@@ -626,8 +628,12 @@ object MainDialog {
...
@@ -626,8 +628,12 @@ object MainDialog {
mDialogView
.
findViewById
<
ImageView
>(
R
.
id
.
id_img_close_cloud_speed
).
setOnClickListener
{
mDialogView
.
findViewById
<
ImageView
>(
R
.
id
.
id_img_close_cloud_speed
).
setOnClickListener
{
mDialog
.
dismiss
()
mDialog
.
dismiss
()
}
}
if
(
type
==
1
){
mDialogView
.
findViewById
<
ImageView
>(
R
.
id
.
id_img_all_speed
).
setOnClickListener
{
id_img_all_speed
.
setBackgroundResource
(
R
.
drawable
.
select_all_speed
)
}
else
{
id_img_all_speed
.
setImageResource
(
R
.
drawable
.
select_all_speed_no_look
)
}
id_img_all_speed
.
setOnClickListener
{
EventUtils
.
onEvent
(
"click_cloud_speed_up_video_btn"
,
"云朵加速视频点击"
)
EventUtils
.
onEvent
(
"click_cloud_speed_up_video_btn"
,
"云朵加速视频点击"
)
onClickListener
.
onClick
(
it
)
onClickListener
.
onClick
(
it
)
mDialog
.
dismiss
()
mDialog
.
dismiss
()
...
...
app/src/main/res/drawable-xhdpi/icon_speed_all_no_look.png
0 → 100644
View file @
d327cbc0
28.9 KB
app/src/main/res/drawable-xhdpi/icon_speed_all_no_look_press.png
0 → 100644
View file @
d327cbc0
23.9 KB
app/src/main/res/drawable/select_all_speed_no_look.xml
0 → 100644
View file @
d327cbc0
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@drawable/icon_speed_all_no_look"
android:state_pressed=
"false"
/>
<item
android:drawable=
"@drawable/icon_speed_all_no_look_press"
android:state_pressed=
"true"
/>
</selector>
\ No newline at end of file
app/src/main/res/layout/dialog_cloud_speed.xml
View file @
d327cbc0
...
@@ -9,16 +9,13 @@
...
@@ -9,16 +9,13 @@
<RelativeLayout
<RelativeLayout
android:layout_width=
"345.5dp"
android:layout_width=
"345.5dp"
android:layout_height=
"358dp"
android:layout_height=
"358dp"
>
>
<ImageView
<ImageView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@mipmap/icon_bg_shifei"
/>
android:background=
"@mipmap/icon_bg_shifei"
/>
<ImageView
<ImageView
android:id=
"@+id/id_img_close_cloud_speed"
android:id=
"@+id/id_img_close_cloud_speed"
android:layout_width=
"52dp"
android:layout_width=
"52dp"
...
@@ -26,7 +23,6 @@
...
@@ -26,7 +23,6 @@
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_marginTop=
"65dp"
/>
android:layout_marginTop=
"65dp"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/id_ll_content"
android:id=
"@+id/id_ll_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -64,7 +60,7 @@
...
@@ -64,7 +60,7 @@
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"@dimen/dp_44"
android:layout_marginBottom=
"@dimen/dp_44"
android:src=
"@drawable/select_all_speed"
/>
/>
<TextView
<TextView
android:id=
"@+id/id_cloud_speed_num"
android:id=
"@+id/id_cloud_speed_num"
...
...
game/src/main/assets/bin/Data/Managed/Assembly-CSharp.dll
View file @
d327cbc0
No preview for this file type
game/src/main/assets/bin/Data/Managed/Unity.Analytics.DataPrivacy.dll
View file @
d327cbc0
No preview for this file type
game/src/main/assets/bin/Data/Managed/Unity.TextMeshPro.dll
View file @
d327cbc0
No preview for this file type
game/src/main/assets/bin/Data/globalgamemanagers
View file @
d327cbc0
No preview for this file type
game/src/main/assets/bin/Data/level1
View file @
d327cbc0
No preview for this file type
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