Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
eggsxiaoxiaole
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
huangjunhui
eggsxiaoxiaole
Commits
fbe3f745
Commit
fbe3f745
authored
Aug 26, 2020
by
huangjunhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改音效图标
parent
ec85117c
Pipeline
#407
failed with stages
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
22 deletions
+49
-22
build.gradle
app/build.gradle
+1
-0
BaseApplication.kt
app/src/main/java/com/zxhl/game/ysdzz/BaseApplication.kt
+1
-1
GamePauseActivity.kt
...src/main/java/com/zxhl/game/ysdzz/ui/GamePauseActivity.kt
+15
-6
GameStopActivity.kt
app/src/main/java/com/zxhl/game/ysdzz/ui/GameStopActivity.kt
+15
-3
SplashActivity.java
app/src/main/java/com/zxhl/game/ysdzz/ui/SplashActivity.java
+0
-3
game_sound_x.png
app/src/main/res/drawable-xhdpi/game_sound_x.png
+0
-0
activit_game_pause.xml
app/src/main/res/layout/activit_game_pause.xml
+4
-4
activit_stop.xml
app/src/main/res/layout/activit_stop.xml
+7
-5
Constant.java
library/src/main/java/com/zxhl/library/Constant.java
+6
-0
No files found.
app/build.gradle
View file @
fbe3f745
...
@@ -97,6 +97,7 @@ android {
...
@@ -97,6 +97,7 @@ android {
productFlavors
{
productFlavors
{
guanwang
{}
guanwang
{}
oppo
{}
}
}
productFlavors
.
all
{
productFlavors
.
all
{
flavor
->
flavor
->
...
...
app/src/main/java/com/zxhl/game/ysdzz/BaseApplication.kt
View file @
fbe3f745
...
@@ -20,7 +20,7 @@ class BaseApplication : MultiDexApplication() {
...
@@ -20,7 +20,7 @@ class BaseApplication : MultiDexApplication() {
super
.
onCreate
()
super
.
onCreate
()
//第一步初始化 application
//第一步初始化 application
AppliContext
.
init
(
this
)
AppliContext
.
init
(
this
)
NetConfig
.
setBase_Url
(
NetConfig
.
Environment
.
DEV
)
// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
NetConfig
.
setBase_Url
(
NetConfig
.
Environment
.
PRODUCT
)
// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
Constant
.
appLs
=
"ae580c6225f546dc"
//appls
Constant
.
appLs
=
"ae580c6225f546dc"
//appls
//彩蛋消消乐 广告id
//彩蛋消消乐 广告id
...
...
app/src/main/java/com/zxhl/game/ysdzz/ui/GamePauseActivity.kt
View file @
fbe3f745
...
@@ -5,6 +5,7 @@ import android.widget.Toast
...
@@ -5,6 +5,7 @@ import android.widget.Toast
import
com.bytedance.sdk.openadsdk.TTNativeExpressAd
import
com.bytedance.sdk.openadsdk.TTNativeExpressAd
import
com.zxhl.game.ysdzz.ADConfig.AD_PAUSE_PAGE_IMAGE
import
com.zxhl.game.ysdzz.ADConfig.AD_PAUSE_PAGE_IMAGE
import
com.zxhl.game.ysdzz.R
import
com.zxhl.game.ysdzz.R
import
com.zxhl.library.Constant
import
com.zxhl.library.config.AdManager
import
com.zxhl.library.config.AdManager
import
com.zxhl.library.config.ZXADSizeConfig
import
com.zxhl.library.config.ZXADSizeConfig
import
com.zxhl.library.listener.ZXADExpressListener
import
com.zxhl.library.listener.ZXADExpressListener
...
@@ -22,8 +23,13 @@ class GamePauseActivity :BaseActivity() {
...
@@ -22,8 +23,13 @@ class GamePauseActivity :BaseActivity() {
//游戏对象
//游戏对象
private
var
GAME_OBJCT
:
String
=
"untiyToAndroid"
//游戏场景
private
var
GAME_OBJCT
:
String
=
"untiyToAndroid"
//游戏场景
private
var
START_GAME_OBJCT
:
String
=
"StartUntiyToAndroid"
//开始场景
private
var
START_GAME_OBJCT
:
String
=
"StartUntiyToAndroid"
//开始场景
var
isSoundPlay
=
true
override
fun
init
()
{
override
fun
init
()
{
if
(
Constant
.
isSoundPlay
){
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
stop_sound
)
}
else
{
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
game_sound_x
)
}
AdManager
.
loadFeedAd
(
AD_PAUSE_PAGE_IMAGE
,
this
,
ZXADSizeConfig
(
Utils
.
px2dip
(
PhoneUtils
.
getScreenWidth
(
this
).
toFloat
())
-
80
,
260
),
object
:
AdManager
.
loadFeedAd
(
AD_PAUSE_PAGE_IMAGE
,
this
,
ZXADSizeConfig
(
Utils
.
px2dip
(
PhoneUtils
.
getScreenWidth
(
this
).
toFloat
())
-
80
,
260
),
object
:
ZXADExpressListener
{
ZXADExpressListener
{
override
fun
onError
(
p1
:
String
?)
{}
override
fun
onError
(
p1
:
String
?)
{}
...
@@ -59,14 +65,17 @@ class GamePauseActivity :BaseActivity() {
...
@@ -59,14 +65,17 @@ class GamePauseActivity :BaseActivity() {
}
}
//声音的点击事件
//声音的点击事件
stop_retrun_sound
.
setOnClickListener
{
stop_retrun_sound
.
setOnClickListener
{
if
(
isSoundPlay
){
if
(
Constant
.
isSoundPlay
)
{
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
game_sound_x
)
callUnity
(
GAME_OBJCT
,
"closeBgMusic"
,
""
)
callUnity
(
GAME_OBJCT
,
"closeBgMusic"
,
""
)
Toast
.
makeText
(
this
,
"关闭声音"
,
Toast
.
LENGTH_LONG
).
show
()
Toast
.
makeText
(
this
,
"关闭声音"
,
Toast
.
LENGTH_LONG
).
show
()
}
else
{
Constant
.
isSoundPlay
=
false
}
else
{
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
stop_sound
)
callUnity
(
GAME_OBJCT
,
"openBgMusic"
,
""
)
callUnity
(
GAME_OBJCT
,
"openBgMusic"
,
""
)
Toast
.
makeText
(
this
,
"打开声音"
,
Toast
.
LENGTH_LONG
).
show
()
Toast
.
makeText
(
this
,
"打开声音"
,
Toast
.
LENGTH_LONG
).
show
()
Constant
.
isSoundPlay
=
true
}
}
isSoundPlay
=
!
isSoundPlay
}
}
...
...
app/src/main/java/com/zxhl/game/ysdzz/ui/GameStopActivity.kt
View file @
fbe3f745
...
@@ -4,9 +4,11 @@ import android.app.Activity
...
@@ -4,9 +4,11 @@ import android.app.Activity
import
android.content.Intent
import
android.content.Intent
import
android.widget.Toast
import
android.widget.Toast
import
com.bytedance.sdk.openadsdk.TTNativeExpressAd
import
com.bytedance.sdk.openadsdk.TTNativeExpressAd
import
com.tz.sdk.core.utils.SPUtil
import
com.zxhl.game.ysdzz.ADConfig
import
com.zxhl.game.ysdzz.ADConfig
import
com.zxhl.game.ysdzz.ADConfig.AD_CONTINUE_GAME_BIGIMAGE
import
com.zxhl.game.ysdzz.ADConfig.AD_CONTINUE_GAME_BIGIMAGE
import
com.zxhl.game.ysdzz.R
import
com.zxhl.game.ysdzz.R
import
com.zxhl.library.Constant
import
com.zxhl.library.config.AdManager
import
com.zxhl.library.config.AdManager
import
com.zxhl.library.config.ZXADRewardVideo
import
com.zxhl.library.config.ZXADRewardVideo
import
com.zxhl.library.config.ZXADSizeConfig
import
com.zxhl.library.config.ZXADSizeConfig
...
@@ -31,9 +33,16 @@ class GameStopActivity : BaseActivity() {
...
@@ -31,9 +33,16 @@ class GameStopActivity : BaseActivity() {
//游戏对象
//游戏对象
private
var
GAME_OBJCT
:
String
=
"untiyToAndroid"
//游戏场景
private
var
GAME_OBJCT
:
String
=
"untiyToAndroid"
//游戏场景
private
var
START_GAME_OBJCT
:
String
=
"StartUntiyToAndroid"
//开始场景
private
var
START_GAME_OBJCT
:
String
=
"StartUntiyToAndroid"
//开始场景
var
isSoundPlay
=
true
override
fun
init
()
{
override
fun
init
()
{
if
(
Constant
.
isSoundPlay
){
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
stop_sound
)
}
else
{
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
game_sound_x
)
}
var
stringExtra
=
intent
.
getStringExtra
(
"title"
)
var
stringExtra
=
intent
.
getStringExtra
(
"title"
)
stop_tv_title
.
text
=
"上次游戏消除了"
+
stringExtra
+
"分\n是否继续"
stop_tv_title
.
text
=
"上次游戏消除了"
+
stringExtra
+
"分\n是否继续"
...
@@ -136,14 +145,17 @@ class GameStopActivity : BaseActivity() {
...
@@ -136,14 +145,17 @@ class GameStopActivity : BaseActivity() {
//声音的点击事件
//声音的点击事件
stop_retrun_sound
.
setOnClickListener
{
stop_retrun_sound
.
setOnClickListener
{
if
(
isSoundPlay
)
{
if
(
Constant
.
isSoundPlay
)
{
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
game_sound_x
)
callUnity
(
GAME_OBJCT
,
"closeBgMusic"
,
""
)
callUnity
(
GAME_OBJCT
,
"closeBgMusic"
,
""
)
Toast
.
makeText
(
this
,
"关闭声音"
,
Toast
.
LENGTH_LONG
).
show
()
Toast
.
makeText
(
this
,
"关闭声音"
,
Toast
.
LENGTH_LONG
).
show
()
Constant
.
isSoundPlay
=
false
}
else
{
}
else
{
stop_retrun_sound
.
setImageResource
(
R
.
drawable
.
stop_sound
)
callUnity
(
GAME_OBJCT
,
"openBgMusic"
,
""
)
callUnity
(
GAME_OBJCT
,
"openBgMusic"
,
""
)
Toast
.
makeText
(
this
,
"打开声音"
,
Toast
.
LENGTH_LONG
).
show
()
Toast
.
makeText
(
this
,
"打开声音"
,
Toast
.
LENGTH_LONG
).
show
()
Constant
.
isSoundPlay
=
true
}
}
isSoundPlay
=
!
isSoundPlay
}
}
}
}
...
...
app/src/main/java/com/zxhl/game/ysdzz/ui/SplashActivity.java
View file @
fbe3f745
...
@@ -48,9 +48,6 @@ public class SplashActivity extends BaseActivity implements SplashContract.View
...
@@ -48,9 +48,6 @@ public class SplashActivity extends BaseActivity implements SplashContract.View
// = new Intent(this,GamePauseActivity.class);
// = new Intent(this,GamePauseActivity.class);
// startActivity(intent);
// startActivity(intent);
}
}
...
...
app/src/main/res/drawable-xhdpi/game_sound_x.png
0 → 100644
View file @
fbe3f745
39.2 KB
app/src/main/res/layout/activit_game_pause.xml
View file @
fbe3f745
...
@@ -74,16 +74,16 @@
...
@@ -74,16 +74,16 @@
<ImageView
<ImageView
android:id=
"@+id/stop_return_home"
android:id=
"@+id/stop_return_home"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
80dp
"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
80dp
"
android:layout_marginRight=
"60dp"
android:layout_marginRight=
"60dp"
android:padding=
"10dp"
android:padding=
"10dp"
android:src=
"@drawable/stop_home"
/>
android:src=
"@drawable/stop_home"
/>
<ImageView
<ImageView
android:id=
"@+id/stop_retrun_sound"
android:id=
"@+id/stop_retrun_sound"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
80dp
"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
80dp
"
android:padding=
"10dp"
android:padding=
"10dp"
android:layout_marginLeft=
"60dp"
android:layout_marginLeft=
"60dp"
android:src=
"@drawable/stop_sound"
/>
android:src=
"@drawable/stop_sound"
/>
...
...
app/src/main/res/layout/activit_stop.xml
View file @
fbe3f745
...
@@ -114,23 +114,25 @@
...
@@ -114,23 +114,25 @@
<ImageView
<ImageView
android:id=
"@+id/stop_return_home"
android:id=
"@+id/stop_return_home"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
80dp
"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
80dp
"
android:layout_marginRight=
"60dp"
android:layout_marginRight=
"60dp"
android:padding=
"10dp"
android:padding=
"10dp"
android:src=
"@drawable/stop_home"
/>
android:src=
"@drawable/stop_home"
/>
<ImageView
<ImageView
android:id=
"@+id/stop_retrun_sound"
android:id=
"@+id/stop_retrun_sound"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
80dp
"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
80dp
"
android:padding=
"10dp"
android:padding=
"10dp"
android:layout_marginLeft=
"60dp"
android:layout_marginLeft=
"60dp"
android:src=
"@drawable/stop_sound"
/>
android:src=
"@drawable/stop_sound"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
library/src/main/java/com/zxhl/library/Constant.java
View file @
fbe3f745
...
@@ -30,6 +30,12 @@ public class Constant {
...
@@ -30,6 +30,12 @@ public class Constant {
public
static
final
String
SHANYAN_KEY
=
"7QciptTf"
;
public
static
final
String
SHANYAN_KEY
=
"7QciptTf"
;
public
static
boolean
isSoundPlay
=
true
;
public
static
ArrayList
<
Integer
>
COMPLETE_RED_PACKET_LIST
=
new
ArrayList
<>();
public
static
ArrayList
<
Integer
>
COMPLETE_RED_PACKET_LIST
=
new
ArrayList
<>();
public
static
int
EASY_GAME_NUM
=
2
;
public
static
int
EASY_GAME_NUM
=
2
;
...
...
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