├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── wuyr
│ │ └── catchpiggy
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ ├── ic_guide_c1.jpg
│ │ ├── ic_guide_c2.jpg
│ │ ├── ic_guide_c3.jpg
│ │ ├── ic_guide_p1.png
│ │ ├── ic_guide_p2.jpg
│ │ └── ic_guide_p3.jpg
│ ├── java
│ │ └── com
│ │ │ └── wuyr
│ │ │ └── catchpiggy
│ │ │ ├── Application.java
│ │ │ ├── activities
│ │ │ ├── BaseActivity.java
│ │ │ └── MainActivity.java
│ │ │ ├── customize
│ │ │ ├── Keyframes.java
│ │ │ ├── MyDrawable.java
│ │ │ ├── MyLayoutParams.java
│ │ │ ├── MyPath.java
│ │ │ ├── MyValueAnimator.java
│ │ │ ├── PathAnimation.java
│ │ │ ├── PathKeyframes.java
│ │ │ ├── PathKeyframesSupport.java
│ │ │ ├── Pig.java
│ │ │ ├── PropOffsetHelper.java
│ │ │ └── views
│ │ │ │ ├── AnimationButton.java
│ │ │ │ ├── ClassicMode.java
│ │ │ │ ├── ClassicModeView.java
│ │ │ │ ├── HeartView.java
│ │ │ │ ├── HomeView.java
│ │ │ │ ├── Item.java
│ │ │ │ ├── LevelSelect.java
│ │ │ │ ├── LevelSelectView.java
│ │ │ │ ├── LoadingView.java
│ │ │ │ ├── PigstyMode.java
│ │ │ │ └── RandomPiggies.java
│ │ │ ├── models
│ │ │ ├── MissionData.java
│ │ │ ├── PositionData.java
│ │ │ ├── PropData.java
│ │ │ ├── WayData.java
│ │ │ └── WayData2.java
│ │ │ └── utils
│ │ │ ├── BitmapUtil.java
│ │ │ ├── ComputeWayUtil.java
│ │ │ ├── LevelUtil.java
│ │ │ ├── LogUtil.java
│ │ │ ├── ShareUtil.java
│ │ │ ├── ThreadPool.java
│ │ │ └── ValueAnimatorUtil.java
│ └── res
│ │ ├── drawable
│ │ ├── anim_drop_left.xml
│ │ ├── anim_drop_right.xml
│ │ ├── anim_run_left.xml
│ │ ├── anim_run_left2.xml
│ │ ├── anim_run_left3.xml
│ │ ├── anim_run_right.xml
│ │ ├── anim_run_right2.xml
│ │ └── anim_run_right3.xml
│ │ ├── layout
│ │ ├── act_main_view.xml
│ │ ├── dialog_exit_view.xml
│ │ ├── dialog_game_over_view.xml
│ │ ├── dialog_guide_view.xml
│ │ ├── dialog_heart_is_empty_view.xml
│ │ ├── dialog_pigsty_mode_mission_view.xml
│ │ ├── temp.xml
│ │ ├── view_classic_mode.xml
│ │ ├── view_home.xml
│ │ └── view_level_select.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_board.9.png
│ │ ├── ic_car_body.png
│ │ ├── ic_car_head_0.png
│ │ ├── ic_car_head_1.png
│ │ ├── ic_car_head_2.png
│ │ ├── ic_car_head_3.png
│ │ ├── ic_drag.png
│ │ ├── ic_drag_disable.png
│ │ ├── ic_drag_press.png
│ │ ├── ic_drop_left_0.png
│ │ ├── ic_drop_left_1.png
│ │ ├── ic_drop_left_2.png
│ │ ├── ic_drop_right_0.png
│ │ ├── ic_drop_right_1.png
│ │ ├── ic_drop_right_2.png
│ │ ├── ic_exit.png
│ │ ├── ic_frame.9.png
│ │ ├── ic_game_background.png
│ │ ├── ic_guide.png
│ │ ├── ic_heart_fill.png
│ │ ├── ic_heart_stroke.png
│ │ ├── ic_launcher.png
│ │ ├── ic_level_select_bg.png
│ │ ├── ic_logo.png
│ │ ├── ic_mute.png
│ │ ├── ic_navigation.png
│ │ ├── ic_navigation_disable.png
│ │ ├── ic_navigation_press.png
│ │ ├── ic_occupied_left_0.png
│ │ ├── ic_occupied_left_1.png
│ │ ├── ic_occupied_left_2.png
│ │ ├── ic_occupied_left_3.png
│ │ ├── ic_occupied_left_4.png
│ │ ├── ic_occupied_left_5.png
│ │ ├── ic_occupied_left_6.png
│ │ ├── ic_occupied_left_7.png
│ │ ├── ic_occupied_left_8.png
│ │ ├── ic_occupied_right_0.png
│ │ ├── ic_occupied_right_1.png
│ │ ├── ic_occupied_right_2.png
│ │ ├── ic_occupied_right_3.png
│ │ ├── ic_occupied_right_4.png
│ │ ├── ic_occupied_right_5.png
│ │ ├── ic_occupied_right_6.png
│ │ ├── ic_occupied_right_7.png
│ │ ├── ic_occupied_right_8.png
│ │ ├── ic_prop.png
│ │ ├── ic_refresh.png
│ │ ├── ic_refresh_disable.png
│ │ ├── ic_selected.png
│ │ ├── ic_share_to_moments.png
│ │ ├── ic_share_to_qq.png
│ │ ├── ic_share_to_qzone.png
│ │ ├── ic_share_to_wechat.png
│ │ ├── ic_sound.png
│ │ ├── ic_undo.png
│ │ ├── ic_undo_disable.png
│ │ └── ic_unselected.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_board.9.png
│ │ ├── ic_car_body.png
│ │ ├── ic_car_head_0.png
│ │ ├── ic_car_head_1.png
│ │ ├── ic_car_head_2.png
│ │ ├── ic_car_head_3.png
│ │ ├── ic_drag.png
│ │ ├── ic_drag_disable.png
│ │ ├── ic_drag_press.png
│ │ ├── ic_drop_left_0.png
│ │ ├── ic_drop_left_1.png
│ │ ├── ic_drop_left_2.png
│ │ ├── ic_drop_right_0.png
│ │ ├── ic_drop_right_1.png
│ │ ├── ic_drop_right_2.png
│ │ ├── ic_exit.png
│ │ ├── ic_frame.9.png
│ │ ├── ic_game_background.png
│ │ ├── ic_guide.png
│ │ ├── ic_heart_fill.png
│ │ ├── ic_heart_stroke.png
│ │ ├── ic_launcher.png
│ │ ├── ic_level_select_bg.png
│ │ ├── ic_logo.png
│ │ ├── ic_mute.png
│ │ ├── ic_navigation.png
│ │ ├── ic_navigation_disable.png
│ │ ├── ic_navigation_press.png
│ │ ├── ic_occupied_left_0.png
│ │ ├── ic_occupied_left_1.png
│ │ ├── ic_occupied_left_2.png
│ │ ├── ic_occupied_left_3.png
│ │ ├── ic_occupied_left_4.png
│ │ ├── ic_occupied_left_5.png
│ │ ├── ic_occupied_left_6.png
│ │ ├── ic_occupied_left_7.png
│ │ ├── ic_occupied_left_8.png
│ │ ├── ic_occupied_right_0.png
│ │ ├── ic_occupied_right_1.png
│ │ ├── ic_occupied_right_2.png
│ │ ├── ic_occupied_right_3.png
│ │ ├── ic_occupied_right_4.png
│ │ ├── ic_occupied_right_5.png
│ │ ├── ic_occupied_right_6.png
│ │ ├── ic_occupied_right_7.png
│ │ ├── ic_occupied_right_8.png
│ │ ├── ic_prop.png
│ │ ├── ic_refresh.png
│ │ ├── ic_refresh_disable.png
│ │ ├── ic_selected.png
│ │ ├── ic_share_to_moments.png
│ │ ├── ic_share_to_qq.png
│ │ ├── ic_share_to_qzone.png
│ │ ├── ic_share_to_wechat.png
│ │ ├── ic_sound.png
│ │ ├── ic_undo.png
│ │ ├── ic_undo_disable.png
│ │ └── ic_unselected.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_board.9.png
│ │ ├── ic_car_body.png
│ │ ├── ic_car_head_0.png
│ │ ├── ic_car_head_1.png
│ │ ├── ic_car_head_2.png
│ │ ├── ic_car_head_3.png
│ │ ├── ic_drag.png
│ │ ├── ic_drag_disable.png
│ │ ├── ic_drag_press.png
│ │ ├── ic_drop_left_0.png
│ │ ├── ic_drop_left_1.png
│ │ ├── ic_drop_left_2.png
│ │ ├── ic_drop_right_0.png
│ │ ├── ic_drop_right_1.png
│ │ ├── ic_drop_right_2.png
│ │ ├── ic_exit.png
│ │ ├── ic_frame.9.png
│ │ ├── ic_game_background.png
│ │ ├── ic_guide.png
│ │ ├── ic_heart_fill.png
│ │ ├── ic_heart_stroke.png
│ │ ├── ic_launcher.png
│ │ ├── ic_level_select_bg.png
│ │ ├── ic_logo.png
│ │ ├── ic_mute.png
│ │ ├── ic_navigation.png
│ │ ├── ic_navigation_disable.png
│ │ ├── ic_navigation_press.png
│ │ ├── ic_occupied_left_0.png
│ │ ├── ic_occupied_left_1.png
│ │ ├── ic_occupied_left_2.png
│ │ ├── ic_occupied_left_3.png
│ │ ├── ic_occupied_left_4.png
│ │ ├── ic_occupied_left_5.png
│ │ ├── ic_occupied_left_6.png
│ │ ├── ic_occupied_left_7.png
│ │ ├── ic_occupied_left_8.png
│ │ ├── ic_occupied_right_0.png
│ │ ├── ic_occupied_right_1.png
│ │ ├── ic_occupied_right_2.png
│ │ ├── ic_occupied_right_3.png
│ │ ├── ic_occupied_right_4.png
│ │ ├── ic_occupied_right_5.png
│ │ ├── ic_occupied_right_6.png
│ │ ├── ic_occupied_right_7.png
│ │ ├── ic_occupied_right_8.png
│ │ ├── ic_prop.png
│ │ ├── ic_refresh.png
│ │ ├── ic_refresh_disable.png
│ │ ├── ic_selected.png
│ │ ├── ic_share_to_moments.png
│ │ ├── ic_share_to_qq.png
│ │ ├── ic_share_to_qzone.png
│ │ ├── ic_share_to_wechat.png
│ │ ├── ic_sound.png
│ │ ├── ic_undo.png
│ │ ├── ic_undo_disable.png
│ │ └── ic_unselected.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_board.9.png
│ │ ├── ic_car_body.png
│ │ ├── ic_car_head_0.png
│ │ ├── ic_car_head_1.png
│ │ ├── ic_car_head_2.png
│ │ ├── ic_car_head_3.png
│ │ ├── ic_drag.png
│ │ ├── ic_drag_disable.png
│ │ ├── ic_drag_press.png
│ │ ├── ic_drop_left_0.png
│ │ ├── ic_drop_left_1.png
│ │ ├── ic_drop_left_2.png
│ │ ├── ic_drop_right_0.png
│ │ ├── ic_drop_right_1.png
│ │ ├── ic_drop_right_2.png
│ │ ├── ic_exit.png
│ │ ├── ic_frame.9.png
│ │ ├── ic_game_background.png
│ │ ├── ic_guide.png
│ │ ├── ic_heart_fill.png
│ │ ├── ic_heart_stroke.png
│ │ ├── ic_launcher.png
│ │ ├── ic_level_select_bg.png
│ │ ├── ic_logo.png
│ │ ├── ic_mute.png
│ │ ├── ic_navigation.png
│ │ ├── ic_navigation_disable.png
│ │ ├── ic_navigation_press.png
│ │ ├── ic_occupied_left_0.png
│ │ ├── ic_occupied_left_1.png
│ │ ├── ic_occupied_left_2.png
│ │ ├── ic_occupied_left_3.png
│ │ ├── ic_occupied_left_4.png
│ │ ├── ic_occupied_left_5.png
│ │ ├── ic_occupied_left_6.png
│ │ ├── ic_occupied_left_7.png
│ │ ├── ic_occupied_left_8.png
│ │ ├── ic_occupied_right_0.png
│ │ ├── ic_occupied_right_1.png
│ │ ├── ic_occupied_right_2.png
│ │ ├── ic_occupied_right_3.png
│ │ ├── ic_occupied_right_4.png
│ │ ├── ic_occupied_right_5.png
│ │ ├── ic_occupied_right_6.png
│ │ ├── ic_occupied_right_7.png
│ │ ├── ic_occupied_right_8.png
│ │ ├── ic_prop.png
│ │ ├── ic_refresh.png
│ │ ├── ic_refresh_disable.png
│ │ ├── ic_selected.png
│ │ ├── ic_share_to_moments.png
│ │ ├── ic_share_to_qq.png
│ │ ├── ic_share_to_qzone.png
│ │ ├── ic_share_to_wechat.png
│ │ ├── ic_sound.png
│ │ ├── ic_undo.png
│ │ ├── ic_undo_disable.png
│ │ └── ic_unselected.png
│ │ ├── raw
│ │ └── background_music.ogg
│ │ ├── values-en-rUS
│ │ └── strings.xml
│ │ ├── values-hdpi
│ │ └── dimens.xml
│ │ ├── values-mdpi
│ │ └── dimens.xml
│ │ ├── values-xhdpi
│ │ └── dimens.xml
│ │ ├── values-xxhdpi
│ │ └── dimens.xml
│ │ ├── values-xxxhdpi
│ │ └── dimens.xml
│ │ ├── values-zh-rCN
│ │ └── strings.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── wuyr
│ └── catchpiggy
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── preview1.gif
├── preview2.gif
├── preview3.gif
├── preview4.gif
├── preview5.gif
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.ap_
3 |
4 | # Files for the ART/Dalvik VM
5 | *.dex
6 |
7 | # Java class files
8 | *.class
9 |
10 | # Generated files
11 | bin/
12 | gen/
13 | out/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
25 | # Log Files
26 | *.log
27 |
28 | # Android Studio Navigation editor temp files
29 | .navigation/
30 |
31 | # Android Studio captures folder
32 | captures/
33 |
34 | # Intellij
35 | *.iml
36 | .idea/workspace.xml
37 | .idea/tasks.xml
38 | .idea/gradle.xml
39 | .idea/dictionaries
40 | .idea/libraries
41 |
42 | # Keystore files
43 | *.jks
44 |
45 | # External native build folder generated in Android Studio 2.2 and later
46 | .externalNativeBuild
47 |
48 | # Google Services (e.g. APIs or Firebase)
49 | google-services.json
50 |
51 | # Freeline
52 | freeline.py
53 | freeline/
54 | freeline_project_description.json
55 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
16 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 捉小猪
2 | ## 捉小猪是一款基于SurfaceView的Android休闲小游戏.
3 | ## 游戏主页:https://wuyr.github.io/
4 | ## 详细见: http://blog.csdn.net/u011387817/article/details/79439383
5 |
6 |
7 | ## 预览图:
8 |   
9 |
10 |
11 | ## 思路:
12 | ### 我们可以把每一个树桩, 小猪, 车厢都看成是一个Drawable, 这个Drawable里面保存了x, y坐标, 我们的SurfaceView在draw的时候, 就把这些Drawable draw出来.
13 | ### 我们的SurfaceView里面有一个Rect二维数组, 用来存放这些矩形, 小猪离开手指之后, 就开始从小猪当前所在的矩形,用广度优先遍历, 找到一条最短的路径(比如: [5,5 5,4 5,3 5,2 5,1 5,0]这样的), 然后再根据这条路径在Rect数组中找到对应的矩形, 最后根据这些对应的矩形的坐标来确定出Path. 哈哈, 有了Path小猪就可以跑了.
14 | 
15 | 
16 |
17 | ### 待改进的地方: 亡猪补牢模式:弹框需改成SurfaceView直接draw.(现在是dialog)
18 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | // 添加插件
3 | apply plugin: "com.mob.sdk"
4 |
5 | // 在MobSDK的扩展中注册ShareSDK的相关信息
6 | MobSDK {
7 | appKey "23557c69a0de4"
8 | appSecret "1b92a94a1fa59ccf0c9a58865c928d7c"
9 |
10 | ShareSDK {
11 | devInfo {
12 | Wechat {
13 | appId "wxa3af0d5548bcb07a"
14 | appSecret "261bf364c76853d96086d524449254a6"
15 | bypassApproval false
16 | shareByAppClient true
17 | enable true
18 | }
19 | WechatMoments {
20 | appId "wxa3af0d5548bcb07a"
21 | appSecret "261bf364c76853d96086d524449254a6"
22 | bypassApproval false
23 | shareByAppClient true
24 | enable true
25 | }
26 | QQ {
27 | appId "1106640558"
28 | appKey "GkYcFq1RgewnwQKi"
29 | bypassApproval false
30 | shareByAppClient true
31 | enable true
32 | }
33 | QZone {
34 | appId "1106640558"
35 | appKey "GkYcFq1RgewnwQKi"
36 | bypassApproval false
37 | shareByAppClient true
38 | enable true
39 | }
40 | }
41 | }
42 | }
43 | android {
44 | compileSdkVersion 26
45 | buildToolsVersion '26.0.2'
46 | defaultConfig {
47 | applicationId "com.wuyr.catchpiggy"
48 | minSdkVersion 16
49 | targetSdkVersion 26
50 | versionCode 2
51 | versionName "1.1"
52 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
53 | }
54 | buildTypes {
55 | release {
56 | minifyEnabled false
57 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
58 | }
59 | }
60 | compileOptions {
61 | targetCompatibility 1.8
62 | sourceCompatibility 1.8
63 | }
64 | }
65 |
66 | dependencies {
67 | compile fileTree(include: ['*.jar'], dir: 'libs')
68 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
69 | exclude group: 'com.android.support', module: 'support-annotations'
70 | })
71 | compile 'com.android.support:appcompat-v7:26.0.2'
72 | testCompile 'junit:junit:4.12'
73 | compile 'com.tencent.bugly:crashreport:latest.release'
74 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/wuyr/catchpiggy/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.wuyr.catchpiggy", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/assets/ic_guide_c1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/assets/ic_guide_c1.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/ic_guide_c2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/assets/ic_guide_c2.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/ic_guide_c3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/assets/ic_guide_c3.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/ic_guide_p1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/assets/ic_guide_p1.png
--------------------------------------------------------------------------------
/app/src/main/assets/ic_guide_p2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/assets/ic_guide_p2.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/ic_guide_p3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/assets/ic_guide_p3.jpg
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/activities/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.activities;
2 |
3 | import android.content.pm.PackageManager;
4 | import android.graphics.Color;
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.support.annotation.IntDef;
8 | import android.support.annotation.NonNull;
9 | import android.support.annotation.Nullable;
10 | import android.support.v4.app.ActivityCompat;
11 | import android.support.v7.app.AppCompatActivity;
12 | import android.view.View;
13 | import android.view.Window;
14 | import android.view.WindowManager;
15 |
16 | import java.lang.annotation.Retention;
17 | import java.lang.annotation.RetentionPolicy;
18 | import java.util.HashMap;
19 | import java.util.Map;
20 |
21 | /**
22 | * Created by wuyr on 18-1-23 上午9:48.
23 | */
24 |
25 | public abstract class BaseActivity extends AppCompatActivity {
26 |
27 | private static Map mAliveActivities;
28 |
29 | @Override
30 | protected void onCreate(@Nullable Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 |
33 | if (mAliveActivities == null) {
34 | mAliveActivities = new HashMap<>();
35 | }
36 | mAliveActivities.put(this.getClass().getSimpleName(), this);
37 |
38 | setContentView(getLayoutId());
39 | mode2();
40 | initView();
41 | }
42 |
43 | private void mode2() {
44 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
45 | // getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
46 | // getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
47 | Window window = getWindow();
48 | // Translucent status bar
49 | window.setFlags(
50 | WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
51 | WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
52 | // Translucent navigation bar
53 | // window.setFlags(
54 | // WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
55 | // WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
56 | window.getDecorView().setSystemUiVisibility(
57 | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
58 | // | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
59 | // | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
60 | // | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
61 | // | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
62 | | View.SYSTEM_UI_FLAG_IMMERSIVE
63 | | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
64 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
65 | window.setStatusBarColor(Color.TRANSPARENT);
66 | window.setNavigationBarColor(Color.TRANSPARENT);
67 | }
68 | }
69 | }
70 |
71 | public void back(View view) {
72 | finish();
73 | }
74 |
75 | protected abstract int getLayoutId();
76 |
77 | protected abstract void initView();
78 |
79 | protected abstract boolean isStatusBarNeedImmerse();
80 |
81 | @Override
82 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
83 | if (mOnRequestPermissionsResultListener != null) {
84 | if (permissions.length != grantResults.length) {
85 | mOnRequestPermissionsResultListener.onFailure();
86 | } else {
87 | if (checkIsAllPermissionAgreed(grantResults)) {
88 | mOnRequestPermissionsResultListener.onSuccess();
89 | } else {
90 | mOnRequestPermissionsResultListener.onFailure();
91 | }
92 | }
93 | }
94 | }
95 |
96 | private boolean checkIsAllPermissionAgreed(int[] permissions) {
97 | boolean isAllPermissionAgreed = true;
98 | if (permissions.length == 0) {
99 | isAllPermissionAgreed = false;
100 | } else {
101 | for (int tmp : permissions) {
102 | if (tmp != PackageManager.PERMISSION_GRANTED) {
103 | isAllPermissionAgreed = false;
104 | break;
105 | }
106 | }
107 | }
108 | return isAllPermissionAgreed;
109 | }
110 |
111 | private OnRequestPermissionsResultListener mOnRequestPermissionsResultListener;
112 |
113 | public void verifyPermissions(OnRequestPermissionsResultListener listener, String... permissions) {
114 | mOnRequestPermissionsResultListener = listener;
115 | if (checkPermissionGroup(permissions)) {
116 | listener.onSuccess();
117 | } else {
118 | ActivityCompat.requestPermissions(this, permissions, 0);
119 | }
120 | }
121 |
122 | private boolean checkPermissionGroup(String... permissions) {
123 | boolean isHasAllPermissions = true;
124 | for (String tmp : permissions) {
125 | if (ActivityCompat.checkSelfPermission(this, tmp) != PackageManager.PERMISSION_GRANTED) {
126 | isHasAllPermissions = false;
127 | break;
128 | }
129 | }
130 | return isHasAllPermissions;
131 | }
132 |
133 | protected boolean isNeedRequestPermissions() {
134 | return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
135 | }
136 |
137 | @IntDef({MODE_LIGHT, MODE_DARK})
138 | @Retention(RetentionPolicy.SOURCE)
139 | private @interface Mode {
140 | }
141 |
142 | protected static final int MODE_LIGHT = 1280, MODE_DARK = 9216;
143 |
144 | protected void setStatusBarTextColor(@Mode int mode) {
145 | if (isNeedRequestPermissions()) {
146 | getWindow().getDecorView().setSystemUiVisibility(mode);
147 | }
148 | }
149 |
150 | @Override
151 | protected void onDestroy() {
152 | super.onDestroy();
153 | if (mAliveActivities != null) {
154 | mAliveActivities.remove(this.getClass().getSimpleName());
155 | if (mAliveActivities.isEmpty()) {
156 | mAliveActivities = null;
157 | }
158 | }
159 | }
160 |
161 | public interface OnRequestPermissionsResultListener {
162 | void onSuccess();
163 |
164 | void onFailure();
165 | }
166 | }
167 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/Keyframes.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.graphics.PointF;
4 |
5 | import java.util.ArrayDeque;
6 | import java.util.Collections;
7 | import java.util.List;
8 | import java.util.Queue;
9 |
10 | /**
11 | * Created by wuyr on 17-11-22 下午8:56.
12 | */
13 |
14 | /**
15 | * 处理路径动画的
16 | */
17 | abstract class Keyframes {
18 |
19 | MyPath mPath;
20 | PointF mTempPointF;
21 |
22 | Keyframes(MyPath path) {
23 | if (path == null || path.isEmpty()) {
24 | throw new IllegalArgumentException("The path must not be null or empty");
25 | }
26 | mTempPointF = new PointF();
27 | init(path);
28 | }
29 |
30 | void reverse() {
31 | List data = mPath.getData();
32 | MyPath path = new MyPath();
33 | Collections.reverse(data);
34 | path.moveTo(data.get(0).x, data.get(0).y);
35 | Queue queue = new ArrayDeque<>(data);
36 | while (!queue.isEmpty()) {
37 | PointF item = queue.poll();
38 | if (!queue.isEmpty()) {
39 | PointF item2 = queue.poll();
40 | path.quadTo(item.x, item.y, item2.x, item2.y);
41 | } else {
42 | path.lineTo(item.x, item.y);
43 | }
44 | }
45 | init(path);
46 | }
47 |
48 | abstract PointF getValue(float fraction);
49 |
50 | abstract void init(MyPath path);
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/MyDrawable.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.Canvas;
5 | import android.graphics.ColorFilter;
6 | import android.graphics.Paint;
7 | import android.graphics.PixelFormat;
8 | import android.graphics.drawable.Drawable;
9 | import android.support.annotation.NonNull;
10 |
11 | import com.wuyr.catchpiggy.utils.ThreadPool;
12 |
13 | import java.util.concurrent.Future;
14 | import java.util.concurrent.Semaphore;
15 |
16 | /**
17 | * Created by wuyr on 17-11-21 下午8:03.
18 | */
19 |
20 | /**
21 | * 自定义的Drawable,类似于AnimationDrawable
22 | */
23 | public class MyDrawable extends Drawable implements Cloneable {
24 |
25 | private final int mDelay;//帧延时
26 | private final byte[] mLock;//控制线程暂停的锁
27 | private Semaphore mSemaphore;//来用控制线程更新问题
28 | private Bitmap[] mBitmaps;//帧
29 | private Paint mPaint;
30 | private int mCurrentIndex;//当前帧索引
31 | private float x, y;//当前坐标
32 | private Future mTask;//帧动画播放的任务
33 | private volatile boolean isPaused;//已暂停
34 |
35 | public MyDrawable(int delay, Bitmap... bitmaps) {
36 | mSemaphore = new Semaphore(1);
37 | mBitmaps = bitmaps;
38 | mDelay = delay;
39 | mPaint = new Paint();
40 | mPaint.setAntiAlias(true);
41 | mLock = new byte[0];
42 | }
43 |
44 | public void start() {
45 | stop();
46 | mTask = ThreadPool.getInstance().execute(() -> {
47 | while (true) {
48 | synchronized (mLock) {
49 | while (isPaused) {
50 | try {
51 | mLock.wait();
52 | } catch (InterruptedException e) {
53 | return;
54 | }
55 | }
56 | }
57 | try {
58 | Thread.sleep(mDelay);
59 | } catch (InterruptedException e) {
60 | return;
61 | }
62 | try {
63 | mSemaphore.acquire();
64 | } catch (InterruptedException e) {
65 | return;
66 | }
67 | mCurrentIndex++;
68 | if (mCurrentIndex == mBitmaps.length) {
69 | mCurrentIndex = 0;
70 | }
71 | mSemaphore.release();
72 | }
73 | });
74 | }
75 |
76 | void pause() {
77 | isPaused = true;
78 | }
79 |
80 | void resume() {
81 | isPaused = false;
82 | synchronized (mLock) {
83 | mLock.notifyAll();
84 | }
85 | }
86 |
87 | private void stop() {
88 | if (mTask != null) {
89 | mTask.cancel(true);
90 | mTask = null;
91 | mCurrentIndex = 0;
92 | }
93 | }
94 |
95 | @Override
96 | public void draw(@NonNull Canvas canvas) {
97 | try {
98 | mSemaphore.acquire();
99 | } catch (InterruptedException e) {
100 | return;
101 | }
102 | canvas.drawBitmap(mBitmaps[mCurrentIndex], x, y, mPaint);
103 | mSemaphore.release();
104 | }
105 |
106 | public void release() {
107 | stop();
108 | if (mBitmaps != null) {
109 | for (Bitmap bitmap : mBitmaps) {
110 | if (bitmap != null && !bitmap.isRecycled()) {
111 | bitmap.recycle();
112 | }
113 | }
114 | }
115 | mBitmaps = null;
116 | mPaint = null;
117 | mTask = null;
118 | }
119 |
120 | public float getX() {
121 | return x;
122 | }
123 |
124 | public void setX(float x) {
125 | this.x = x;
126 | }
127 |
128 | public float getY() {
129 | return y;
130 | }
131 |
132 | public void setY(float y) {
133 | this.y = y;
134 | }
135 |
136 | public Bitmap getBitmap() {
137 | Bitmap result = null;
138 | if (mBitmaps != null && mBitmaps.length > 0) {
139 | result = mBitmaps[0];
140 | }
141 | return result;
142 | }
143 |
144 | @Override
145 | public int getIntrinsicWidth() {
146 | if (mBitmaps.length == 0) {
147 | return 0;
148 | }
149 | return mBitmaps[0].getWidth();
150 | }
151 |
152 | @Override
153 | public int getIntrinsicHeight() {
154 | if (mBitmaps.length == 0) {
155 | return 0;
156 | }
157 | return mBitmaps[0].getHeight();
158 | }
159 |
160 | @Override
161 | public void setAlpha(int alpha) {
162 | mPaint.setAlpha(alpha);
163 | }
164 |
165 | @Override
166 | public void setColorFilter(ColorFilter cf) {
167 | mPaint.setColorFilter(cf);
168 | }
169 |
170 | @Override
171 | public int getOpacity() {
172 | return PixelFormat.TRANSLUCENT;
173 | }
174 |
175 | @SuppressWarnings("MethodDoesntCallSuperMethod")
176 | public MyDrawable clone() {
177 | return new MyDrawable(0, mBitmaps[0]);
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/MyLayoutParams.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.view.ViewGroup;
4 |
5 | /**
6 | * Created by wuyr on 17-10-30 下午6:13.
7 | */
8 | public class MyLayoutParams extends ViewGroup.LayoutParams implements Cloneable {
9 | public int x;
10 | public int y;
11 | public int verticalPos, horizontalPos;
12 | public int index;
13 | public boolean isLeft, isDrag;
14 | public float scale;
15 |
16 | public MyLayoutParams(int width, int height) {
17 | super(width, height);
18 | }
19 |
20 | @Override
21 | public MyLayoutParams clone() {
22 | MyLayoutParams layoutParams = null;
23 | try {
24 | layoutParams = (MyLayoutParams) super.clone();
25 | } catch (CloneNotSupportedException e) {
26 | e.printStackTrace();
27 | }
28 | if (layoutParams == null) {
29 | layoutParams = new MyLayoutParams(width, height);
30 | } else {
31 | layoutParams.width = width;
32 | layoutParams.height = height;
33 | }
34 | layoutParams.x = x;
35 | layoutParams.y = y;
36 | layoutParams.verticalPos = verticalPos;
37 | layoutParams.horizontalPos = horizontalPos;
38 | layoutParams.index = index;
39 | layoutParams.isLeft = isLeft;
40 | layoutParams.isDrag = isDrag;
41 | layoutParams.scale = scale;
42 | return layoutParams;
43 | }
44 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/MyPath.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.graphics.Path;
4 | import android.graphics.PointF;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | /**
10 | * Created by wuyr on 17-11-29 上午3:50.
11 | */
12 |
13 | /**
14 | * 就加了一个List用来保存路径的数据
15 | */
16 | public class MyPath extends Path {
17 |
18 | private List data;
19 |
20 | public MyPath() {
21 | super();
22 | data = new ArrayList<>();
23 | }
24 |
25 | @Override
26 | public void moveTo(float x, float y) {
27 | super.moveTo(x, y);
28 | data.add(new PointF(x, y));
29 | }
30 |
31 | @Override
32 | public void lineTo(float x, float y) {
33 | super.lineTo(x, y);
34 | data.add(new PointF(x, y));
35 | }
36 |
37 | @Override
38 | public void quadTo(float x1, float y1, float x2, float y2) {
39 | super.quadTo(x1, y1, x2, y2);
40 | data.add(new PointF(x1, y1));
41 | data.add(new PointF(x2, y2));
42 | }
43 |
44 | public List getData() {
45 | return data;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/MyValueAnimator.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.os.SystemClock;
4 |
5 | import com.wuyr.catchpiggy.utils.ThreadPool;
6 |
7 | /**
8 | * Created by wuyr on 17-11-27 上午1:57.
9 | */
10 |
11 | /**
12 | * 自定义的属性动画类(类似于ValueAnimator)
13 | */
14 | public class MyValueAnimator {
15 | private long duration;
16 | private Object[] mTargets;//参与改变属性的对象
17 | private OnAnimatorEndListener mOnAnimatorEndListener;//动画播放完
18 | private OnAnimatorMiddleListener mOnAnimatorMiddleListener;//动画播放到一半
19 | private volatile boolean isAnimationStopped;//已停止
20 | private float fromX, fromY, xPart, yPart;
21 | private boolean isRunOnCurrentThread, isOnAnimatorMiddleListenerCalled;//动画播放到一半的接口已回调
22 | private OnAnimatorUpdateListener mOnAnimatorUpdateListener;//动画更新回调
23 |
24 | private MyValueAnimator(float fromX, float toX, float fromY, float toY, Object... targets) {
25 | mTargets = targets;
26 | this.fromX = fromX;
27 | this.fromY = fromY;
28 | xPart = toX - fromX;
29 | yPart = toY - fromY;
30 | }
31 |
32 | public static MyValueAnimator create(float fromX, float toX, float fromY, float toY, Object... targets) {
33 | return new MyValueAnimator(fromX, toX, fromY, toY, targets);
34 | }
35 |
36 | public void start() {
37 | stop();
38 | if (duration > 0) {
39 | //是本线程动画,就直接开始,否则另开新线程
40 | if (isRunOnCurrentThread) {
41 | startAnimation();
42 | } else {
43 | ThreadPool.getInstance().execute(this::startAnimation);
44 | }
45 | }
46 | }
47 |
48 | private void startAnimation() {
49 | isAnimationStopped = false;
50 | final long startTime = SystemClock.uptimeMillis();
51 | long currentPlayedDuration;//当前动画已经播放的时长
52 | while ((currentPlayedDuration = SystemClock.uptimeMillis() - startTime) < duration) {
53 | if (isAnimationStopped) {
54 | break;
55 | }
56 | //根据当前动画已经播放的时长和总动画时长计算出当前动画的播放进度
57 | float progress = (float) currentPlayedDuration / (float) duration;
58 | if (!isOnAnimatorMiddleListenerCalled && mOnAnimatorMiddleListener != null && progress >= .5F) {
59 | isOnAnimatorMiddleListenerCalled = true;
60 | mOnAnimatorMiddleListener.onAnimationMiddle();
61 | }
62 | if (mOnAnimatorUpdateListener != null) {
63 | mOnAnimatorUpdateListener.onUpdate(progress);
64 | } else {
65 | update(progress);
66 | }
67 | }
68 | if (mOnAnimatorEndListener != null) {
69 | mOnAnimatorEndListener.onAnimationEnd();
70 | }
71 | }
72 |
73 | /**
74 | * 在当前线程中执行动画
75 | */
76 | public MyValueAnimator setRunOnCurrentThread() {
77 | this.isRunOnCurrentThread = true;
78 | return this;
79 | }
80 |
81 | public void stop() {
82 | isAnimationStopped = true;
83 | }
84 |
85 | public boolean isAnimationPlaying() {
86 | return !isAnimationStopped;
87 | }
88 |
89 | public MyValueAnimator setDuration(long duration) {
90 | this.duration = duration;
91 | return this;
92 | }
93 |
94 | public MyValueAnimator setOnAnimatorEndListener(OnAnimatorEndListener listener) {
95 | this.mOnAnimatorEndListener = listener;
96 | return this;
97 | }
98 |
99 | public MyValueAnimator setOnAnimatorMiddleListener(OnAnimatorMiddleListener mOnAnimatorMiddleListener) {
100 | this.mOnAnimatorMiddleListener = mOnAnimatorMiddleListener;
101 | return this;
102 | }
103 |
104 | public MyValueAnimator setOnAnimatorUpdateListener(OnAnimatorUpdateListener listener) {
105 | mOnAnimatorUpdateListener = listener;
106 | return this;
107 | }
108 |
109 | /**
110 | 更新对象的x,y值
111 | */
112 | private void update(float progress) {
113 | if (isAnimationStopped) {
114 | return;
115 | }
116 | float x = fromX + xPart * progress;
117 | float y = fromY + yPart * progress;
118 | if (mTargets != null) {
119 | for (Object tmp : mTargets) {
120 | if (tmp instanceof Pig) {
121 | Pig pig = (Pig) tmp;
122 | pig.setX(x);
123 | pig.setY(y);
124 | } else if (tmp instanceof MyDrawable) {
125 | MyDrawable myDrawable = (MyDrawable) tmp;
126 | myDrawable.setX(x);
127 | myDrawable.setY(y);
128 | }
129 | }
130 | }
131 | }
132 |
133 | public interface OnAnimatorUpdateListener {
134 | void onUpdate(float progress);
135 | }
136 |
137 | public interface OnAnimatorEndListener {
138 | void onAnimationEnd();
139 | }
140 |
141 | public interface OnAnimatorMiddleListener {
142 | void onAnimationMiddle();
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/PathAnimation.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.graphics.PointF;
4 | import android.os.Build;
5 | import android.os.SystemClock;
6 |
7 | import com.wuyr.catchpiggy.utils.ThreadPool;
8 |
9 | /**
10 | * Created by wuyr on 17-11-22 下午5:02.
11 | */
12 |
13 | /**
14 | * 自己封装的路径动画类
15 | */
16 | public class PathAnimation {
17 |
18 | private Keyframes mPathKeyframes;//关键帧
19 | private long mAnimationDuration;//动画时长
20 | private OnAnimationUpdateListener mOnAnimationUpdateListener;//动画更新监听
21 | private AnimationListener mAnimationListener;//动画事件监听
22 | private volatile boolean isAnimationRepeat, //反复播放的动画
23 | isAnimationStopped,//已停止
24 | isAnimationCanceled, //已取消 (停止和取消的区别: 取消是在动画播放完之前主动取消的, 停止是动画播放完,自动停止的)
25 | isAnimationEndListenerCalled;//动画已取消的监听已经回调
26 |
27 | PathAnimation(MyPath path) {
28 | updatePath(path);
29 | }
30 |
31 | public PathAnimation setDuration(long duration) {
32 | mAnimationDuration = duration;
33 | return this;
34 | }
35 |
36 | void updatePath(MyPath path) {
37 | //根据系统版本选择更合适的关键帧类
38 | mPathKeyframes = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ? new PathKeyframes(path) : new PathKeyframesSupport(path);
39 | }
40 |
41 | OnAnimationUpdateListener getUpdateListener() {
42 | return mOnAnimationUpdateListener;
43 | }
44 |
45 | void setUpdateListener(OnAnimationUpdateListener listener) {
46 | mOnAnimationUpdateListener = listener;
47 | }
48 |
49 | /**
50 | * 设置动画是否重复播放
51 | */
52 | public PathAnimation setRepeat(boolean isAnimationRepeat) {
53 | this.isAnimationRepeat = isAnimationRepeat;
54 | return this;
55 | }
56 |
57 | boolean isAnimationRepeat() {
58 | return isAnimationRepeat;
59 | }
60 |
61 | AnimationListener getAnimationListener() {
62 | return mAnimationListener;
63 | }
64 |
65 | void setAnimationListener(AnimationListener listener) {
66 | mAnimationListener = listener;
67 | }
68 |
69 | void start() {
70 | if (mAnimationDuration > 0) {
71 | ThreadPool.getInstance().execute(() -> {
72 | isAnimationStopped = false;
73 | isAnimationCanceled = false;
74 | isAnimationEndListenerCalled = false;
75 | final long startTime = SystemClock.uptimeMillis();
76 | long currentPlayedDuration;//当前动画已经播放的时长
77 | if (mAnimationListener != null) {
78 | mAnimationListener.onAnimationStart();
79 | }
80 | while ((currentPlayedDuration = SystemClock.uptimeMillis() - startTime) < mAnimationDuration) {
81 | //如果动画被打断则跳出循环
82 | if (isAnimationInterrupted()) {
83 | break;
84 | }
85 | //根据当前动画已经播放的时长和总动画时长计算出当前动画的播放进度
86 | float progress = (float) currentPlayedDuration / (float) mAnimationDuration;
87 | if (mOnAnimationUpdateListener != null) {
88 | if (!isAnimationInterrupted()) {
89 | mOnAnimationUpdateListener.onUpdate(progress, mPathKeyframes.getValue(progress));
90 | }
91 | }
92 | }
93 | if (isAnimationRepeat && !isAnimationInterrupted()) {
94 | //如果是设置了重复并且还没有被取消,则重复播放动画
95 | mPathKeyframes.reverse();
96 | if (mAnimationListener != null) {
97 | mAnimationListener.onAnimationRepeat();
98 | }
99 | start();
100 | } else {
101 | isAnimationStopped = true;
102 | if (mAnimationListener != null) {
103 | //判断应该回调哪一个接口
104 | if (isAnimationCanceled) {
105 | mAnimationListener.onAnimationCanceled();
106 | } else {
107 | mAnimationListener.onAnimationEnd();
108 | }
109 | }
110 | //标记接口已回调
111 | isAnimationEndListenerCalled = true;
112 | }
113 | });
114 | }
115 | }
116 |
117 | /**
118 | 会阻塞,直到动画真正停止才返回
119 | */
120 | private void waitStopped() {
121 | isAnimationStopped = true;
122 | //noinspection StatementWithEmptyBody
123 | while (!isAnimationEndListenerCalled) {
124 | }
125 | }
126 |
127 | /**
128 | 会阻塞,直到动画真正取消才返回
129 | */
130 | private void waitCancel(){
131 | isAnimationCanceled = true;
132 | //noinspection StatementWithEmptyBody
133 | while (!isAnimationEndListenerCalled) {
134 | }
135 | }
136 |
137 | void stop() {
138 | waitStopped();
139 | }
140 |
141 | void cancel() {
142 | waitCancel();
143 | }
144 |
145 | /**
146 | 动画被打断
147 | */
148 | private boolean isAnimationInterrupted() {
149 | return isAnimationCanceled || isAnimationStopped;
150 | }
151 |
152 | public interface OnAnimationUpdateListener {
153 | void onUpdate(float currentProgress, PointF position);
154 | }
155 |
156 | public interface AnimationListener {
157 | void onAnimationStart();//动画开始
158 |
159 | void onAnimationEnd();//动画结束
160 |
161 | void onAnimationCanceled();//动画取消
162 |
163 | void onAnimationRepeat();//动画重复播放
164 | }
165 | }
166 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/PathKeyframes.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.graphics.PointF;
5 |
6 | /**
7 | * Created by wuyr on 17-11-22 上午12:45.
8 | */
9 |
10 | /**
11 | * 关键帧,参考自SDK
12 | */
13 | class PathKeyframes extends Keyframes {
14 | private static final int FRACTION_OFFSET = 0;
15 | private static final int X_OFFSET = 1;
16 | private static final int Y_OFFSET = 2;
17 | private static final int NUM_COMPONENTS = 3;
18 |
19 | private float[] mKeyframeData;
20 |
21 | PathKeyframes(MyPath path) {
22 | super(path);
23 | }
24 |
25 | private static float interpolate(float fraction, float startValue, float endValue) {
26 | float diff = endValue - startValue;
27 | return startValue + (diff * fraction);
28 | }
29 |
30 | @SuppressLint("NewApi")
31 | @Override
32 | void init(MyPath path) {
33 | mPath = path;
34 | mKeyframeData = path.approximate(.5F);
35 | }
36 |
37 | @Override
38 | PointF getValue(float fraction) {
39 | int numPoints = mKeyframeData.length / 3;
40 | if (fraction < 0) {
41 | return interpolateInRange(fraction, 0, 1);
42 | } else if (fraction > 1) {
43 | return interpolateInRange(fraction, numPoints - 2, numPoints - 1);
44 | } else if (fraction == 0) {
45 | return pointForIndex(0);
46 | } else if (fraction == 1) {
47 | return pointForIndex(numPoints - 1);
48 | } else {
49 | // Binary search for the correct section
50 | int low = 0;
51 | int high = numPoints - 1;
52 |
53 | while (low <= high) {
54 | int mid = (low + high) / 2;
55 | float midFraction = mKeyframeData[(mid * NUM_COMPONENTS) + FRACTION_OFFSET];
56 |
57 | if (fraction < midFraction) {
58 | high = mid - 1;
59 | } else if (fraction > midFraction) {
60 | low = mid + 1;
61 | } else {
62 | return pointForIndex(mid);
63 | }
64 | }
65 |
66 | // now high is below the fraction and low is above the fraction
67 | return interpolateInRange(fraction, high, low);
68 | }
69 | }
70 |
71 | private PointF interpolateInRange(float fraction, int startIndex, int endIndex) {
72 | int startBase = (startIndex * NUM_COMPONENTS);
73 | int endBase = (endIndex * NUM_COMPONENTS);
74 |
75 | float startFraction = mKeyframeData[startBase + FRACTION_OFFSET];
76 | float endFraction = mKeyframeData[endBase + FRACTION_OFFSET];
77 |
78 | float intervalFraction = (fraction - startFraction) / (endFraction - startFraction);
79 |
80 | float startX = mKeyframeData[startBase + X_OFFSET];
81 | float endX = mKeyframeData[endBase + X_OFFSET];
82 | float startY = mKeyframeData[startBase + Y_OFFSET];
83 | float endY = mKeyframeData[endBase + Y_OFFSET];
84 |
85 | float x = interpolate(intervalFraction, startX, endX);
86 | float y = interpolate(intervalFraction, startY, endY);
87 |
88 | mTempPointF.set(x, y);
89 | return mTempPointF;
90 | }
91 |
92 | private PointF pointForIndex(int index) {
93 | int base = (index * NUM_COMPONENTS);
94 | int xOffset = base + X_OFFSET;
95 | int yOffset = base + Y_OFFSET;
96 | mTempPointF.set(mKeyframeData[xOffset], mKeyframeData[yOffset]);
97 | return mTempPointF;
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/PathKeyframesSupport.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.graphics.PathMeasure;
4 | import android.graphics.PointF;
5 |
6 | import java.util.Collections;
7 |
8 | /**
9 | * Created by wuyr on 17-11-22 上午12:45.
10 | */
11 |
12 | /**
13 | * 关键帧,参考自SDK
14 | */
15 | class PathKeyframesSupport extends Keyframes {
16 |
17 | private static final float PRECISION = 0.5f;
18 | private float[] mX;
19 | private float[] mY;
20 | private int numPoints;
21 | private boolean isFirstReverse;
22 |
23 | PathKeyframesSupport(MyPath path) {
24 | super(path);
25 | isFirstReverse = true;
26 | }
27 |
28 | @Override
29 | void init(MyPath path) {
30 | final PathMeasure pathMeasure = new PathMeasure(path, false);
31 | final float pathLength = pathMeasure.getLength();
32 | numPoints = (int) (pathLength / PRECISION) + 1;
33 | mX = new float[numPoints];
34 | mY = new float[numPoints];
35 | final float[] position = new float[2];
36 | for (int i = 0; i < numPoints; ++i) {
37 | final float distance = (i * pathLength) / (numPoints - 1);
38 | pathMeasure.getPosTan(distance, position, null /* tangent */);
39 | mX[i] = position[0];
40 | mY[i] = position[1];
41 | }
42 | mPath = path;
43 | }
44 |
45 | @Override
46 | PointF getValue(float fraction) {
47 | int index = (int) (numPoints * fraction);
48 | mTempPointF.set(mX[index], mY[index]);
49 | return mTempPointF;
50 | }
51 |
52 | @Override
53 | void reverse() {
54 | if (isFirstReverse) {
55 | super.reverse();
56 | isFirstReverse = false;
57 | } else {
58 | Collections.reverse(mPath.getData());
59 | float[] temp = new float[mX.length];
60 | for (int i = 0; i < mX.length; i++) {
61 | temp[i] = mX[mX.length - i - 1];
62 | }
63 | mX = temp;
64 |
65 | float[] temp2 = new float[mY.length];
66 | for (int i = 0; i < mY.length; i++) {
67 | temp2[i] = mY[mY.length - i - 1];
68 | }
69 | mY = temp2;
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/PropOffsetHelper.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.Canvas;
5 | import android.os.SystemClock;
6 |
7 | import com.wuyr.catchpiggy.models.PropData;
8 | import com.wuyr.catchpiggy.utils.LogUtil;
9 | import com.wuyr.catchpiggy.utils.ThreadPool;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 | import java.util.concurrent.Future;
14 |
15 | /**
16 | * Created by wuyr on 17-12-8 上午2:50.
17 | */
18 |
19 | /**
20 | * 修猪圈模式中的树头(未放置)位置更新辅助类
21 | */
22 | public class PropOffsetHelper {
23 |
24 | private float mPropOffsetSpeed;//树头的移动速度
25 | private MyDrawable mPropDrawable;//树头的图片
26 | private List mProps;//全部树头的数据
27 | private List mLeavedProps;//已放置的树头(索引)
28 | private float mStartX, mStartY;//树头一开始的位置
29 | private int mPropSize;//树头尺寸
30 | private Future mUpdateTask;//更新位置的线程
31 | private float mLeftOffset;//左边的偏移量
32 | private volatile boolean isNeed;//是否需要更新位置
33 | private long mLastStopTime;//上一次暂停的时间
34 |
35 | public PropOffsetHelper(Bitmap propBitmap, int width, int height, int propSize) {
36 | mPropDrawable = new MyDrawable(0, propBitmap);
37 | mProps = new ArrayList<>();
38 | mLeftOffset = (propSize - mPropDrawable.getIntrinsicWidth()) / 2;
39 | mStartX = width + mLeftOffset;
40 | mStartY = height - mPropDrawable.getIntrinsicHeight();
41 | mPropSize = propSize;
42 | mLeavedProps = new ArrayList<>();
43 | long propOffsetAnimationDuration = 4000L;
44 | mPropOffsetSpeed = mStartX / propOffsetAnimationDuration;
45 | }
46 |
47 | public MyDrawable getPropDrawable(int index) {
48 | return mProps.get(index).drawable;
49 | }
50 |
51 | /**
52 | * 判断该索引的树头是否已经放置
53 | */
54 | public boolean isPropLeaved(int index) {
55 | return mLeavedProps.contains(index);
56 | }
57 |
58 | /**
59 | * 获取已放置的树头数量
60 | */
61 | public int getLeavedPropCount() {
62 | return mLeavedProps.size();
63 | }
64 |
65 | /**
66 | * 添加一个树头
67 | */
68 | public void addProp() {
69 | PropData data = new PropData(mPropDrawable.clone());
70 | data.setY(mStartY);
71 | data.setX(mStartX);
72 | mProps.add(data);
73 | LogUtil.print("添加了一个prop");
74 | //LogUtil.print(mProps.size());
75 | }
76 |
77 | public void setX(int index, float x) {
78 | mProps.get(index).setX(x);
79 | }
80 |
81 | public void setY(int index, float y) {
82 | mProps.get(index).setY(y);
83 | }
84 |
85 | /**
86 | * 有树头脱队
87 | */
88 | public void propLeaved(int index) {
89 | mLeavedProps.add(index);
90 | LogUtil.print("出队pos:" + index);
91 | }
92 |
93 | /**
94 | * 画队列中的(未放置的)树头
95 | */
96 | public void drawInQueueProps(Canvas canvas) {
97 | for (int i = 0; i < mProps.size(); i++) {
98 | if (!mLeavedProps.contains(i)) {
99 | mProps.get(i).draw(canvas);
100 | }
101 | }
102 | }
103 |
104 | /**
105 | * 画已放置的树头
106 | */
107 | public void drawLeavedProps(Canvas canvas) {
108 | for (int i = 0; i < mLeavedProps.size(); i++) {
109 | mProps.get(mLeavedProps.get(i)).draw(canvas);
110 | }
111 | }
112 |
113 | public int size() {
114 | return mProps.size();
115 | }
116 |
117 | //树头高度
118 | public int getPropHeight() {
119 | return mPropDrawable.getIntrinsicHeight();
120 | }
121 |
122 | //树头宽度
123 | public int getPropWidth() {
124 | return mPropDrawable.getIntrinsicWidth();
125 | }
126 |
127 | /**
128 | * 停止生成
129 | */
130 | public void stop() {
131 | isNeed = false;
132 | if (mUpdateTask != null) {
133 | mUpdateTask.cancel(true);
134 | mUpdateTask = null;
135 | }
136 | mLastStopTime = SystemClock.uptimeMillis();
137 | }
138 |
139 | //获取队列中的(未放置的)树头数量
140 | public int getQueueSize() {
141 | return mProps.size() - mLeavedProps.size();
142 | }
143 |
144 | /**
145 | * 开始更新树桩的位置
146 | */
147 | public void startComputeOffset() {
148 | updatePropGenerateTime();
149 | isNeed = true;
150 | //更新树头位置线程
151 | mUpdateTask = ThreadPool.getInstance().execute(() -> {
152 | boolean isFinished;//树头是否已经到对应的位置
153 | float distance,//需要偏移的路程
154 | offset;//本次更新的偏移量
155 | int hitOffsetCount;//排在该树头前面的,并且已经离队的(已放置),需要忽略距离
156 | long intervalTime,//上次更新与现在的间隔时间
157 | updateTime;//今次更新时间
158 | while (isNeed) {
159 | for (int i = 0; i < mProps.size(); i++) {
160 | PropData prop = mProps.get(i);
161 | //已离队的不需要更新位置
162 | if (mLeavedProps.contains(i)) {
163 | continue;
164 | }
165 | //计算出总距离
166 | distance = i * mPropSize + mLeftOffset;
167 | //离队树桩数量
168 | hitOffsetCount = 0;
169 | for (int j = 0; j < mLeavedProps.size(); j++) {
170 | //检查是否有离队的树头
171 | if (mLeavedProps.get(j) < i) {
172 | hitOffsetCount++;
173 | }
174 | }
175 | //减去已离队的树桩占用的位置,得出真实的位置
176 | distance -= mPropSize * hitOffsetCount;
177 | //树桩的x轴小于或等于实际的偏移距离,则认为已经偏移完成,不需要继续更新位置
178 | isFinished = prop.getX() <= distance;
179 | updateTime = SystemClock.uptimeMillis();
180 | if (!isFinished) {
181 | //计算间隔时间
182 | intervalTime = updateTime - prop.lastUpdateTime;
183 | //路程 = 时间 * 速度
184 | offset = intervalTime * mPropOffsetSpeed;
185 | //更新x轴位置
186 | prop.setX(prop.getX() - offset);
187 | }
188 | //刷新上一次的更新时间
189 | prop.lastUpdateTime = updateTime;
190 | }
191 | }
192 | });
193 | }
194 |
195 | /**
196 | * 更新线程停止后又重新开始,需要加上停止的这段时间
197 | */
198 | private void updatePropGenerateTime() {
199 | if (mLastStopTime > 0) {
200 | //总停止时间 = 当前时间 - 上次更新时间
201 | long totalStoppedTime = SystemClock.uptimeMillis() - mLastStopTime;
202 | mLastStopTime = 0;
203 | for (int i = 0; i < mProps.size(); i++) {
204 | //加上这段时间
205 | mProps.get(i).lastUpdateTime += totalStoppedTime;
206 | }
207 | }
208 | }
209 |
210 | public void release() {
211 | stop();
212 | if (mPropDrawable != null) {
213 | mPropDrawable.release();
214 | mPropDrawable = null;
215 | }
216 | if (mProps != null) {
217 | for (PropData propData : mProps) {
218 | if (propData != null) {
219 | propData.release();
220 | }
221 | }
222 | }
223 | mProps = null;
224 | mLeavedProps = null;
225 | }
226 | }
227 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/views/AnimationButton.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize.views;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.Nullable;
5 | import android.util.AttributeSet;
6 | import android.view.MotionEvent;
7 | import android.view.animation.Animation;
8 | import android.view.animation.ScaleAnimation;
9 |
10 | /**
11 | * Created by wuyr on 17-12-25 下午9:43.
12 | */
13 |
14 | /**
15 | * 一个扩展自TextView的控件,加了自动播放点击动画
16 | */
17 | public class AnimationButton extends android.support.v7.widget.AppCompatTextView {
18 |
19 | public AnimationButton(Context context) {
20 | super(context);
21 | }
22 |
23 | public AnimationButton(Context context, @Nullable AttributeSet attrs) {
24 | super(context, attrs);
25 | }
26 |
27 | public AnimationButton(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
28 | super(context, attrs, defStyleAttr);
29 | }
30 |
31 | @Override
32 | public boolean onTouchEvent(MotionEvent event) {
33 | if (isEnabled()) {
34 | switch (event.getAction()) {
35 | case MotionEvent.ACTION_DOWN:
36 | startAnimation(getActionDownAnimation());
37 | break;
38 | case MotionEvent.ACTION_CANCEL:
39 | startAnimation(getActionUpAnimation());
40 | break;
41 | case MotionEvent.ACTION_UP:
42 | Animation animation = getActionUpAnimation();
43 | animation.setAnimationListener(new Animation.AnimationListener() {
44 | @Override
45 | public void onAnimationStart(Animation animation) {
46 |
47 | }
48 |
49 | @Override
50 | public void onAnimationEnd(Animation animation) {
51 | performClick();
52 | }
53 |
54 | @Override
55 | public void onAnimationRepeat(Animation animation) {
56 |
57 | }
58 | });
59 | startAnimation(animation);
60 | break;
61 | }
62 | return true;
63 | }
64 | return false;
65 | }
66 |
67 | private Animation getActionDownAnimation() {
68 | ScaleAnimation animation = new ScaleAnimation(1, .9F, 1, .9F, Animation.RELATIVE_TO_SELF, .5F, Animation.RELATIVE_TO_SELF, .5F);
69 | animation.setDuration(150);
70 | animation.setFillAfter(true);
71 | return animation;
72 | }
73 |
74 | private Animation getActionUpAnimation() {
75 | ScaleAnimation animation = new ScaleAnimation(.9F, 1, .9F, 1, Animation.RELATIVE_TO_SELF, .5F, Animation.RELATIVE_TO_SELF, .5F);
76 | animation.setDuration(70);
77 | return animation;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/views/HeartView.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.ViewGroup;
6 | import android.widget.ImageView;
7 |
8 | import com.wuyr.catchpiggy.R;
9 | import com.wuyr.catchpiggy.customize.MyDrawable;
10 | import com.wuyr.catchpiggy.utils.BitmapUtil;
11 |
12 | /**
13 | * Created by wuyr on 18-1-4 下午10:05.
14 | */
15 |
16 | /**
17 | * 5个心的ViewGroup
18 | */
19 | public class HeartView extends ViewGroup {
20 |
21 | private MyDrawable mHeartFill, mHeartStroke;//一个实心,一个空心
22 | private ImageView[] mItems;//用来显示心
23 | private int mItemSize, mItemMargin;
24 | private int mCurrentValidHeartCount;
25 |
26 | public HeartView(Context context) {
27 | this(context, null);
28 | }
29 |
30 | public HeartView(Context context, AttributeSet attrs) {
31 | this(context, attrs, 0);
32 | }
33 |
34 | public HeartView(Context context, AttributeSet attrs, int defStyleAttr) {
35 | super(context, attrs, defStyleAttr);
36 | mItems = new ImageView[5];//5个心
37 | mItemSize = (int) getResources().getDimension(R.dimen.xhpx_76);
38 | mHeartFill = new MyDrawable(0, BitmapUtil.getBitmapFromResource(getContext(), R.mipmap.ic_heart_fill));
39 | mHeartStroke = new MyDrawable(0, BitmapUtil.getBitmapFromResource(getContext(), R.mipmap.ic_heart_stroke));
40 | mItemMargin = (int) getResources().getDimension(R.dimen.xhpx_6);
41 | for (int i = 0; i < mItems.length; i++) {
42 | ImageView temp = new ImageView(getContext());
43 | mItems[i] = temp;
44 | addView(temp);
45 | }
46 | }
47 |
48 | /**
49 | * 设置可用的心数量
50 | */
51 | public void setValidHeartCount(int count) {
52 | if (count > mItems.length) {
53 | count = mItems.length;
54 | } else if (count < 0) {
55 | count = 0;
56 | }
57 | mCurrentValidHeartCount = count;
58 | for (int i = 0; i < mItems.length; i++) {
59 | mItems[i].setImageDrawable(i < count ? mHeartFill : mHeartStroke);
60 | }
61 | }
62 |
63 | public int getCurrentValidHeartCount() {
64 | return mCurrentValidHeartCount;
65 | }
66 |
67 | @Override
68 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
69 | measureChildren(widthMeasureSpec, heightMeasureSpec);
70 | setMeasuredDimension(mItemSize * mItems.length + (mItems.length - 1) * mItemMargin, mItemSize);
71 | }
72 |
73 | @Override
74 | protected void onLayout(boolean changed, int l, int t, int r, int b) {
75 | int currentWidth;
76 | int currentMargin;
77 | //5个心 水平排列
78 | for (int i = 0; i < mItems.length; i++) {
79 | currentWidth = i * mItemSize;
80 | currentMargin = i * mItemMargin;
81 | currentWidth += currentMargin;
82 | mItems[i].layout(currentWidth, 0, currentWidth + mItemSize, mItemSize);
83 | }
84 | }
85 |
86 | public void release() {
87 | if (mItems != null) {
88 | for (ImageView tmp : mItems) {
89 | if (tmp != null) {
90 | tmp.setImageDrawable(null);
91 | }
92 | }
93 | mItems = null;
94 | }
95 | mHeartFill.release();
96 | mHeartStroke.release();
97 | mHeartFill = null;
98 | mHeartStroke = null;
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/views/HomeView.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.LayoutInflater;
6 | import android.widget.RelativeLayout;
7 |
8 | import com.wuyr.catchpiggy.R;
9 |
10 | /**
11 | * Created by wuyr on 17-12-24 下午11:24.
12 | */
13 |
14 | /**
15 | * 主页
16 | */
17 | public class HomeView extends RelativeLayout {
18 |
19 | public boolean isMute;//静音
20 | private OnButtonClickListener mOnButtonClickListener;
21 |
22 | public HomeView(Context context) {
23 | this(context, null);
24 | }
25 |
26 | public HomeView(Context context, AttributeSet attrs) {
27 | this(context, attrs, 0);
28 | }
29 |
30 | public HomeView(Context context, AttributeSet attrs, int defStyleAttr) {
31 | super(context, attrs, defStyleAttr);
32 | init();
33 | }
34 |
35 | private void init() {
36 | LayoutInflater.from(getContext()).inflate(R.layout.view_home, this, true);
37 | OnClickListener onClickListener = v -> {
38 | if (mOnButtonClickListener != null) {
39 | switch (v.getId()) {
40 | case R.id.fix_pigsty_mode_btn:
41 | mOnButtonClickListener.onPigstyModeButtonClicked();
42 | break;
43 | case R.id.classic_mode_btn:
44 | mOnButtonClickListener.onClassicModeButtonClicked();
45 | break;
46 | case R.id.exit_btn:
47 | mOnButtonClickListener.onExitButtonClicked();
48 | break;
49 | case R.id.sound_btn:
50 | v.setBackgroundResource((isMute = mOnButtonClickListener.onSoundButtonClicked()) ? R.mipmap.ic_mute : R.mipmap.ic_sound);
51 | break;
52 | default:
53 | break;
54 | }
55 | }
56 | };
57 | findViewById(R.id.fix_pigsty_mode_btn).setOnClickListener(onClickListener);
58 | findViewById(R.id.classic_mode_btn).setOnClickListener(onClickListener);
59 | findViewById(R.id.exit_btn).setOnClickListener(onClickListener);
60 | findViewById(R.id.sound_btn).setOnClickListener(onClickListener);
61 | }
62 |
63 | public void startShow() {
64 | //使用post是为了确保已经初始化完成
65 | post(() -> ((RandomPiggies) findViewById(R.id.random_piggies)).startShow());
66 | }
67 |
68 | /**
69 | * 停止生成随机的小猪跑过动画
70 | */
71 | public void stopShow() {
72 | ((RandomPiggies) findViewById(R.id.random_piggies)).stopShow();
73 | }
74 |
75 | public void setOnButtonClickListener(OnButtonClickListener onButtonClickListener) {
76 | mOnButtonClickListener = onButtonClickListener;
77 | }
78 |
79 | public void release() {
80 | stopShow();
81 | if (mOnButtonClickListener != null) {
82 | mOnButtonClickListener = null;
83 | }
84 | }
85 |
86 | /**
87 | 各个按钮的点击事件回调
88 | */
89 | public interface OnButtonClickListener {
90 | void onPigstyModeButtonClicked();
91 |
92 | void onClassicModeButtonClicked();
93 |
94 | boolean onSoundButtonClicked();
95 |
96 | void onExitButtonClicked();
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/views/LevelSelect.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize.views;
2 |
3 | import android.content.Context;
4 | import android.graphics.Color;
5 | import android.graphics.Typeface;
6 | import android.util.AttributeSet;
7 | import android.util.TypedValue;
8 | import android.view.Gravity;
9 | import android.view.ViewGroup;
10 |
11 | import com.wuyr.catchpiggy.R;
12 | import com.wuyr.catchpiggy.customize.MyDrawable;
13 | import com.wuyr.catchpiggy.utils.BitmapUtil;
14 |
15 | /**
16 | * Created by wuyr on 17-12-31 下午8:13.
17 | */
18 |
19 | /**
20 | * 关卡列表
21 | */
22 | public class LevelSelect extends ViewGroup {
23 |
24 | private AnimationButton mItems[];//关卡按钮实例
25 | private MyDrawable mItemDrawable, mItemDrawableDisable;//未通过的关卡不能点击
26 | private int mItemSize;//按钮的尺寸
27 | private int mMaxCount;//最大关卡数
28 | private OnLevelSelectedListener mOnLevelSelectedListener;//关卡点击回调
29 |
30 | public LevelSelect(Context context) {
31 | this(context, null);
32 | }
33 |
34 | public LevelSelect(Context context, AttributeSet attrs) {
35 | this(context, attrs, 0);
36 | }
37 |
38 | public LevelSelect(Context context, AttributeSet attrs, int defStyleAttr) {
39 | super(context, attrs, defStyleAttr);
40 | mItemSize = (int) getResources().getDimension(R.dimen.xhpx_128);
41 | mItemDrawable = new MyDrawable(0, BitmapUtil.getBitmapFromResource(getContext(), R.mipmap.ic_level_select_bg));
42 | mItemDrawableDisable = new MyDrawable(0, BitmapUtil.toGray(mItemDrawable.getBitmap()));
43 | }
44 |
45 | public void setValidItemCount(int count) {
46 | if (count > mMaxCount) {
47 | count = mMaxCount;
48 | }
49 | //可以玩的关卡就显示数字和接受点击事件
50 | if (mItems != null) {
51 | for (int i = 0; i < count; i++) {
52 | AnimationButton item = mItems[i];
53 | item.setText(String.valueOf(i + 1));
54 | item.setBackground(mItemDrawable);
55 | item.setEnabled(true);
56 | }
57 | }
58 | }
59 |
60 | public void setMaxItemCount(int count) {
61 | //already initialed
62 | if (getChildCount() > 0) {
63 | removeAllViews();
64 | }
65 | mMaxCount = count;
66 | mItems = new AnimationButton[count];
67 | float textSize = getResources().getDimension(R.dimen.xhpx_48);
68 | OnClickListener onClickListener = v -> {
69 | if (mOnLevelSelectedListener != null) {
70 | mOnLevelSelectedListener.onSelected((int) v.getTag());
71 | }
72 | };
73 | //初始化关卡按钮
74 | for (int i = 0; i < count; i++) {
75 | AnimationButton temp = new AnimationButton(getContext());
76 | temp.setBackground(mItemDrawableDisable);
77 | temp.setTag(i + 1);
78 | temp.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
79 | temp.setTextColor(Color.WHITE);
80 | temp.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD_ITALIC));
81 | temp.setGravity(Gravity.CENTER);
82 | temp.setOnClickListener(onClickListener);
83 | temp.setEnabled(false);
84 | mItems[i] = temp;
85 | addView(temp);
86 | }
87 | }
88 |
89 | @Override
90 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
91 | int width = mItemSize * 5, height = 0;
92 | if (mItems != null) {
93 | int heightCount = mItems.length / 5;
94 | if (mItems.length % 5 > 0) {
95 | heightCount++;
96 | }
97 | height = mItemSize * heightCount;
98 | }
99 | measureChildren(widthMeasureSpec, heightMeasureSpec);
100 | setMeasuredDimension(width, height);
101 | }
102 |
103 | @Override
104 | protected void onLayout(boolean changed, int l, int t, int r, int b) {
105 | //排序关卡按钮,每行5个
106 | if (mItems != null) {
107 | int maxWidth = mItemSize * 4;
108 | int currentWidth;
109 | int currentHeight = -mItemSize;
110 | for (int i = 0; i < mItems.length; i++) {
111 | if (mItems[i] != null) {
112 | currentWidth = i * mItemSize;
113 | if (currentWidth >= maxWidth) {
114 | currentWidth = i % 5 * mItemSize;
115 | }
116 | if (i % 5 == 0) {
117 | currentHeight += mItemSize;
118 | }
119 | int left, top, right, bottom;
120 | left = currentWidth;
121 | right = currentWidth + mItemSize;
122 | top = currentHeight;
123 | bottom = currentHeight + mItemSize;
124 | mItems[i].layout(left, top, right, bottom);
125 | }
126 | }
127 | }
128 | }
129 |
130 | public void release() {
131 | if (mItems != null) {
132 | for (AnimationButton tmp : mItems) {
133 | if (tmp != null) {
134 | tmp.setBackground(null);
135 | tmp.setOnClickListener(null);
136 | }
137 | }
138 | mItems = null;
139 | }
140 | mItemDrawable.release();
141 | mItemDrawableDisable.release();
142 | mOnLevelSelectedListener = null;
143 | }
144 |
145 | public void setOnLevelSelectedListener(OnLevelSelectedListener levelSelectedListener) {
146 | mOnLevelSelectedListener = levelSelectedListener;
147 | }
148 |
149 | public interface OnLevelSelectedListener {
150 | void onSelected(int level);
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/customize/views/LoadingView.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.customize.views;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Color;
6 | import android.graphics.Paint;
7 | import android.graphics.PixelFormat;
8 | import android.graphics.PorterDuff;
9 | import android.support.annotation.Nullable;
10 | import android.util.AttributeSet;
11 | import android.view.SurfaceHolder;
12 | import android.view.SurfaceView;
13 |
14 | import com.wuyr.catchpiggy.R;
15 | import com.wuyr.catchpiggy.customize.MyValueAnimator;
16 | import com.wuyr.catchpiggy.utils.ThreadPool;
17 |
18 | /**
19 | * Created by wuyr on 17-12-24 下午9:51.
20 | */
21 |
22 | /**
23 | * 界面之间跳转的过度动画
24 | */
25 | public class LoadingView extends SurfaceView implements Runnable {
26 |
27 | public boolean isOpen, isLoading, isProcessing;
28 | private Paint mPaint;
29 | //中心点的坐标和当前圆的半径
30 | private int mCenterX, mCenterY, mCurrentRadius;
31 | private int mMaxRadius;//圆的半径
32 | private SurfaceHolder mSurfaceHolder;
33 |
34 | public LoadingView(Context context) {
35 | this(context, null);
36 | }
37 |
38 | public LoadingView(Context context, @Nullable AttributeSet attrs) {
39 | this(context, attrs, 0);
40 | }
41 |
42 | public LoadingView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
43 | super(context, attrs, defStyleAttr);
44 | mPaint = new Paint();
45 | mPaint.setColor(getResources().getColor(R.color.colorLoadingViewBackground));
46 | mPaint.setAntiAlias(true);
47 | setVisibility(INVISIBLE);
48 | setZOrderOnTop(true);
49 | mSurfaceHolder = getHolder();
50 | mSurfaceHolder.setFormat(PixelFormat.TRANSLUCENT);
51 | }
52 |
53 | public void startLoad(OnAnimationFinishListener listener) {
54 | if (listener == null) {
55 | return;
56 | }
57 | isLoading = isOpen = isProcessing = true;
58 | startAnimation(() -> post(() -> {
59 | listener.onAnimationFinish();
60 | finishLoad();
61 | }));
62 | }
63 |
64 | private void finishLoad() {
65 | isOpen = false;
66 | startAnimation(() -> post(() -> {
67 | setVisibility(INVISIBLE);
68 | isLoading = isProcessing = false;
69 | }));
70 | }
71 |
72 | /**
73 | * 播放动画
74 | */
75 | private void startAnimation(MyValueAnimator.OnAnimatorEndListener onAnimatorEndListener) {
76 | setVisibility(VISIBLE);
77 | ThreadPool.getInstance().execute(this);
78 | MyValueAnimator.create(0, 0, 0, 0).setDuration(350L).setOnAnimatorUpdateListener(progress -> {
79 | if (!isOpen) {
80 | progress = 1F - progress;
81 | }
82 | //更新圆的半径
83 | mCurrentRadius = (int) (mMaxRadius * progress);
84 | }).setOnAnimatorEndListener(onAnimatorEndListener).start();
85 | }
86 |
87 | @Override
88 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
89 | super.onSizeChanged(w, h, oldw, oldh);
90 | mCenterX = w / 2;
91 | mCenterY = h / 2;
92 | //圆的最大半径取手机屏幕对角线的一半
93 | mMaxRadius = (int) Math.sqrt(Math.pow(mCenterX, 2) + Math.pow(mCenterY, 2));
94 | }
95 |
96 | @Override
97 | public void run() {
98 | while (isProcessing) {
99 | Canvas canvas = mSurfaceHolder.lockCanvas();
100 | if (canvas == null) {
101 | return;
102 | }
103 | canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
104 | //画圆
105 | canvas.drawCircle(mCenterX, mCenterY, mCurrentRadius, mPaint);
106 | mSurfaceHolder.unlockCanvasAndPost(canvas);
107 | }
108 | }
109 |
110 | public interface OnAnimationFinishListener {
111 | void onAnimationFinish();
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/models/MissionData.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.models;
2 |
3 | import android.content.Context;
4 |
5 | import com.wuyr.catchpiggy.R;
6 |
7 | import java.util.Locale;
8 |
9 | /**
10 | * Created by wuyr on 17-12-28 下午7:33.
11 | */
12 |
13 | public class MissionData {
14 | public long speed;//小猪速度
15 | public long propDelay;//树头出现的隔间时间
16 | public int mustCaughtCount;//必须要捉到的小猪个数
17 |
18 | public String toString(Context context, int currentLevel) {
19 | String format = context.getString(R.string.pigsty_mode_mission_message_format);
20 | if (currentLevel < 0) {
21 | format = format.split("\n\n")[1];
22 | return String.format(Locale.getDefault(), format, mustCaughtCount);
23 | }
24 | return String.format(Locale.getDefault(), format, currentLevel, mustCaughtCount);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/models/PositionData.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.models;
2 |
3 | /**
4 | * Created by wuyr on 17-10-16 下午11:55.
5 | */
6 |
7 | public class PositionData {
8 | public float startX;
9 | public float startY;
10 | public float endX;
11 | public float endY;
12 |
13 | @Override
14 | public String toString() {
15 | return startX + "," + startY + "," + endX + "," + endY;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/models/PropData.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.models;
2 |
3 | import android.graphics.Canvas;
4 | import android.os.SystemClock;
5 |
6 | import com.wuyr.catchpiggy.customize.MyDrawable;
7 |
8 | import java.util.Locale;
9 |
10 | /**
11 | * Created by wuyr on 17-12-4 上午2:14.
12 | */
13 |
14 | public class PropData {
15 | public MyDrawable drawable;
16 | public long lastUpdateTime;
17 |
18 | public PropData(MyDrawable drawable) {
19 | this.drawable = drawable;
20 | lastUpdateTime = SystemClock.uptimeMillis();
21 | }
22 |
23 | public void draw(Canvas canvas) {
24 | drawable.draw(canvas);
25 | }
26 |
27 | public float getX() {
28 | return drawable.getX();
29 | }
30 |
31 | public void setX(float x) {
32 | drawable.setX(x);
33 | }
34 |
35 | public float getY() {
36 | return drawable.getY();
37 | }
38 |
39 | public void setY(float y) {
40 | drawable.setY(y);
41 | }
42 |
43 | public void release() {
44 | if (drawable != null) {
45 | drawable.release();
46 | }
47 | }
48 |
49 | @Override
50 | public String toString() {
51 | return String.format(Locale.getDefault(), "%f, %f", drawable.getX(), drawable.getY());
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/models/WayData.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.models;
2 |
3 | /**
4 | * Created by wuyr on 17-10-16 下午11:56.
5 | */
6 |
7 | public class WayData {
8 | public int count;//方向上空闲状态的格子数
9 | public boolean isBlock;//中间是否有障碍
10 | public int x, y;//位置
11 |
12 | public WayData(int count, boolean isBlock, int x, int y) {
13 | this.count = count;
14 | this.isBlock = isBlock;
15 | this.x = x;
16 | this.y = y;
17 | }
18 |
19 | public WayData(int x, int y) {
20 | this.x = x;
21 | this.y = y;
22 | }
23 |
24 | @Override
25 | public boolean equals(Object obj) {
26 | return obj instanceof WayData ? x == ((WayData) obj).x && y == ((WayData) obj).y : this == obj;
27 | }
28 |
29 | @Override
30 | public String toString() {
31 | // return "x: " + x + "\ty: " + y;
32 | return y + "," + x;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/models/WayData2.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.models;
2 |
3 | import com.wuyr.catchpiggy.customize.views.Item;
4 |
5 | /**
6 | * Created by wuyr on 17-10-16 下午11:57.
7 | */
8 |
9 | public class WayData2 extends WayData{
10 | public Item item;
11 |
12 | public WayData2(Item item, int count, boolean isBlock) {
13 | super(count, isBlock, 0, 0);
14 | this.item = item;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | return "isBlock: " + isBlock + "\tcount: " + count;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/utils/BitmapUtil.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.graphics.Color;
7 | import android.graphics.Matrix;
8 | import android.graphics.drawable.BitmapDrawable;
9 | import android.support.annotation.DrawableRes;
10 |
11 | /**
12 | * Created by wuyr on 17-11-11 下午3:55.
13 | */
14 |
15 | public class BitmapUtil {
16 |
17 | /**
18 | * 缩放Bitmap
19 | */
20 | public static Bitmap scaleBitmap(Bitmap target, int w, int h) {
21 | int width = target.getWidth();
22 | int height = target.getHeight();
23 | Matrix matrix = new Matrix();
24 | matrix.postScale(((float) w / width), ((float) h / height));
25 | return Bitmap.createBitmap(target, 0, 0, width, height, matrix, true);
26 | }
27 |
28 | /**
29 | * 缩放drawable
30 | */
31 | public static BitmapDrawable scaleDrawable(BitmapDrawable drawable, int w, int h) {
32 | Bitmap oldBitmap = drawable.getBitmap();
33 | int width = oldBitmap.getWidth();
34 | int height = oldBitmap.getHeight();
35 | Matrix matrix = new Matrix();
36 | float scaleWidth = ((float) w / width);
37 | float scaleHeight = ((float) h / height);
38 | matrix.postScale(scaleWidth, scaleHeight);
39 | Bitmap newBitmap = Bitmap.createBitmap(oldBitmap, 0, 0, width, height, matrix, true);
40 | return new BitmapDrawable(null, newBitmap);
41 | }
42 |
43 | public static Bitmap getBitmapFromResource(Context context, @DrawableRes int id) {
44 | return BitmapFactory.decodeResource(context.getResources(), id);
45 | }
46 |
47 | /**
48 | 去色
49 | */
50 | public static Bitmap toGray(Bitmap target) {
51 | Bitmap temp = target.copy(Bitmap.Config.ARGB_8888, true);
52 | int width = temp.getWidth(), height = temp.getHeight();
53 | int[] targetPixels = new int[width * height];
54 | //获取bitmap所有像素点
55 | temp.getPixels(targetPixels, 0, width, 0, 0, width, height);
56 | int index = 0;
57 | int pixelColor;
58 | int a, r, g, b;
59 | for (int y = 0; y < height; y++) {
60 | for (int x = 0; x < width; x++) {
61 | //获取rgb色值并与目标颜色相比较
62 | pixelColor = targetPixels[index];
63 | a = Color.alpha(pixelColor);
64 | r = Color.red(pixelColor);
65 | g = Color.green(pixelColor);
66 | b = Color.blue(pixelColor);
67 | int gray = (r + g + b) / 3;
68 | targetPixels[index] = Color.argb(a, gray, gray, gray);
69 | ++index;
70 | }
71 | }
72 | temp.setPixels(targetPixels, 0, width, 0, 0, width, height);
73 | return temp;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/utils/LogUtil.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.utils;
2 |
3 | import android.support.annotation.IntDef;
4 | import android.util.Log;
5 |
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 |
9 | /**
10 | * Created by wuyr on 6/8/16 6:54 PM.
11 | */
12 | @SuppressWarnings({"unused", "WeakerAccess", "SameParameterValue"})
13 | public class LogUtil {
14 |
15 | public static final int VERBOSE = 1, DEBUG = 2, INFO = 3, WARN = 4, ERROR = 5;
16 | private static boolean isDebugOn, isShowClassName;
17 | private static int debugLevel = DEBUG;
18 |
19 | public static void setDebugOn(boolean isDebugOn) {
20 | LogUtil.isDebugOn = isDebugOn;
21 | LogUtil.isShowClassName = true;
22 | }
23 |
24 | public static void setIsShowClassName(boolean isShowClassName) {
25 | LogUtil.isShowClassName = isShowClassName;
26 | }
27 |
28 | public static void setDebugLevel(@DEBUG_LEVEL int l) {
29 | debugLevel = l;
30 | setDebugOn(true);
31 | }
32 |
33 | public static void print(Object s) {
34 | print(null, s);
35 | }
36 |
37 | public static void printf(String format, Object... args) {
38 | print(format, args);
39 | }
40 |
41 | private static void print(String format, Object... args) {
42 | if (isDebugOn) {
43 | if (args == null || args.length == 0) {
44 | return;
45 | }
46 | StackTraceElement element = Thread.currentThread().getStackTrace()[4];
47 | String tag = isShowClassName ? String.format("%s-->%s", element.getClassName(), element.getMethodName()) : element.getMethodName();
48 | String msg = format != null ? String.format(format, args) : String.valueOf(args[0]);
49 | switch (debugLevel) {
50 | case VERBOSE:
51 | Log.v(tag, msg);
52 | break;
53 | case DEBUG:
54 | Log.d(tag, msg);
55 | break;
56 | case INFO:
57 | Log.i(tag, msg);
58 | break;
59 | case WARN:
60 | Log.w(tag, msg);
61 | break;
62 | case ERROR:
63 | Log.e(tag, msg);
64 | break;
65 | default:
66 | break;
67 | }
68 | }
69 | }
70 |
71 | @IntDef({VERBOSE, DEBUG, INFO, WARN, ERROR})
72 | @Retention(RetentionPolicy.SOURCE)
73 | private @interface DEBUG_LEVEL {
74 | }
75 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/utils/ShareUtil.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.utils;
2 |
3 | import android.content.Context;
4 |
5 | import com.wuyr.catchpiggy.R;
6 |
7 | import cn.sharesdk.onekeyshare.OnekeyShare;
8 | import cn.sharesdk.tencent.qq.QQ;
9 | import cn.sharesdk.tencent.qzone.QZone;
10 | import cn.sharesdk.wechat.friends.Wechat;
11 | import cn.sharesdk.wechat.moments.WechatMoments;
12 |
13 | /**
14 | * Created by wuyr on 17-12-29 下午8:43.
15 | */
16 |
17 | public class ShareUtil {
18 |
19 | public static void shareToWeChat(Context context, boolean isRequestHelp, String message) {
20 | OnekeyShare onekeyShare = getData(context, isRequestHelp, message);
21 | onekeyShare.setPlatform(Wechat.NAME);
22 | onekeyShare.show(context);
23 | }
24 |
25 | public static void shareToWeChatMoments(Context context, boolean isRequestHelp, String message) {
26 | OnekeyShare onekeyShare = getData(context, isRequestHelp, message);
27 | onekeyShare.setPlatform(WechatMoments.NAME);
28 | onekeyShare.show(context);
29 | }
30 |
31 | public static void shareToQQ(Context context, boolean isRequestHelp, String message) {
32 | OnekeyShare onekeyShare = getData(context, isRequestHelp, message);
33 | onekeyShare.setPlatform(QQ.NAME);
34 | onekeyShare.show(context);
35 | }
36 |
37 | public static void shareToQZone(Context context, boolean isRequestHelp, String message) {
38 | OnekeyShare onekeyShare = getData(context, isRequestHelp, message);
39 | onekeyShare.setPlatform(QZone.NAME);
40 | onekeyShare.show(context);
41 | }
42 |
43 | private static OnekeyShare getData(Context context, boolean isRequestHelp, String message) {
44 | String url = "https://wuyr.github.io/";
45 | OnekeyShare onekeyShare = new OnekeyShare();
46 | onekeyShare.setImageUrl("https://wuyr.github.io/files/icon.png");
47 | onekeyShare.setTitle("来自捉小猪的分享");
48 | onekeyShare.setText(isRequestHelp ? context.getString(R.string.request_help_format) : message);
49 | onekeyShare.setSite(context.getResources().getString(R.string.app_name));
50 | onekeyShare.setTitleUrl(url);
51 | onekeyShare.setSiteUrl(url);
52 | onekeyShare.setUrl(url);
53 | return onekeyShare;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/utils/ThreadPool.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.utils;
2 |
3 | import java.util.concurrent.ExecutorService;
4 | import java.util.concurrent.Executors;
5 | import java.util.concurrent.Future;
6 |
7 | /**
8 | * Created by wuyr on 17-11-30 下午8:19.
9 | */
10 |
11 | /**
12 | * 单例的线程池
13 | */
14 | public class ThreadPool {
15 |
16 | private volatile static ThreadPool mInstance;
17 | private ExecutorService mThreadPool;
18 |
19 | private ThreadPool() {
20 | mThreadPool = Executors.newCachedThreadPool();
21 | }
22 |
23 | public static ThreadPool getInstance() {
24 | if (mInstance == null) {
25 | init();
26 | }
27 | return mInstance;
28 | }
29 |
30 | private static void init() {
31 | synchronized (ThreadPool.class) {
32 | if (mInstance == null) {
33 | mInstance = new ThreadPool();
34 | }
35 | }
36 | }
37 |
38 | public static void shutdown() {
39 | if (mInstance != null) {
40 | mInstance.mThreadPool.shutdownNow();
41 | mInstance = null;
42 | }
43 | }
44 |
45 | public Future> execute(Runnable command) {
46 | return mThreadPool.submit(command);
47 | }
48 |
49 | @Override
50 | public String toString() {
51 | return mThreadPool.toString();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wuyr/catchpiggy/utils/ValueAnimatorUtil.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy.utils;
2 |
3 | import android.animation.ValueAnimator;
4 | import android.support.annotation.NonNull;
5 |
6 | import java.lang.reflect.Field;
7 |
8 | /**
9 | * Created by wuyr on 17-11-11 下午11:59.
10 | */
11 |
12 | /**
13 | * 用来重置动画缩放时长的工具类
14 | */
15 | public class ValueAnimatorUtil {
16 |
17 | /**
18 | * 如果动画被禁用,则重置动画缩放时长
19 | */
20 | public static void resetDurationScaleIfDisable() {
21 | if (getDurationScale() == 0) {
22 | resetDurationScale();
23 | }
24 | }
25 |
26 | /**
27 | * 重置动画缩放时长
28 | */
29 | public static void resetDurationScale() {
30 | try {
31 | getField().setFloat(null, 1);
32 | } catch (Exception e) {
33 | e.printStackTrace();
34 | }
35 | }
36 |
37 | private static float getDurationScale() {
38 | try {
39 | return getField().getFloat(null);
40 | } catch (Exception e) {
41 | e.printStackTrace();
42 | return -1;
43 | }
44 | }
45 |
46 | @NonNull
47 | private static Field getField() throws NoSuchFieldException {
48 | Field field = ValueAnimator.class.getDeclaredField("sDurationScale");
49 | field.setAccessible(true);
50 | return field;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_drop_left.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_drop_right.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_run_left.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_run_left2.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_run_left3.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_run_right.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_run_right2.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/anim_run_right3.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/act_main_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_exit_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
20 |
21 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_game_over_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
20 |
21 |
36 |
37 |
42 |
43 |
50 |
51 |
58 |
59 |
66 |
67 |
72 |
73 |
74 |
79 |
80 |
95 |
96 |
109 |
110 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_guide_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
19 |
20 |
35 |
36 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_heart_is_empty_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
24 |
25 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_pigsty_mode_mission_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
20 |
21 |
26 |
27 |
42 |
43 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/temp.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
16 |
17 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_classic_mode.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
34 |
35 |
50 |
51 |
63 |
64 |
78 |
79 |
90 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
16 |
31 |
32 |
47 |
48 |
57 |
58 |
69 |
70 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_level_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
20 |
21 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_board.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_board.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_car_body.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_car_body.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_car_head_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_car_head_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_car_head_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_car_head_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_car_head_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_car_head_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_car_head_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_car_head_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drag.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drag_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drag_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drag_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drag_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drop_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drop_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drop_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drop_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drop_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drop_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drop_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drop_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drop_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drop_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_drop_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_drop_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_exit.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_frame.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_frame.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_game_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_game_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_guide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_guide.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_heart_fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_heart_fill.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_heart_stroke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_heart_stroke.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_level_select_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_level_select_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_mute.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_navigation_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_navigation_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_navigation_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_navigation_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_left_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_left_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_occupied_right_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_occupied_right_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_prop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_prop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_refresh.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_refresh_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_refresh_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_share_to_moments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_share_to_moments.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_share_to_qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_share_to_qq.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_share_to_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_share_to_qzone.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_share_to_wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_share_to_wechat.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_sound.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_sound.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_undo_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_undo_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-hdpi/ic_unselected.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_board.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_board.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_car_body.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_car_body.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_car_head_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_car_head_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_car_head_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_car_head_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_car_head_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_car_head_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_car_head_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_car_head_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drag.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drag_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drag_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drag_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drag_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drop_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drop_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drop_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drop_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drop_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drop_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drop_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drop_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drop_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drop_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_drop_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_drop_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_exit.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_frame.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_frame.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_game_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_game_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_guide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_guide.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_heart_fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_heart_fill.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_heart_stroke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_heart_stroke.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_level_select_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_level_select_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_mute.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_navigation_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_navigation_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_navigation_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_navigation_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_left_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_left_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_occupied_right_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_occupied_right_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_prop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_prop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_refresh.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_refresh_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_refresh_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_share_to_moments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_share_to_moments.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_share_to_qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_share_to_qq.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_share_to_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_share_to_qzone.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_share_to_wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_share_to_wechat.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_sound.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_sound.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_undo_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_undo_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xhdpi/ic_unselected.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_board.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_board.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_car_body.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_car_body.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_car_head_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_car_head_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_car_head_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_car_head_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_car_head_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_car_head_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_car_head_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_car_head_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drag.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drag_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drag_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drag_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drag_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drop_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drop_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drop_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drop_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drop_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drop_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drop_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drop_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drop_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drop_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_drop_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_drop_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_exit.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_frame.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_frame.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_game_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_game_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_guide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_guide.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_heart_fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_heart_fill.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_heart_stroke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_heart_stroke.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_level_select_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_level_select_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_mute.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_navigation_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_navigation_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_navigation_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_navigation_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_left_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_occupied_right_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_prop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_prop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_refresh.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_refresh_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_refresh_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_share_to_moments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_share_to_moments.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_share_to_qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_share_to_qq.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_share_to_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_share_to_qzone.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_share_to_wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_share_to_wechat.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_sound.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_sound.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_undo_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_undo_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxhdpi/ic_unselected.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_board.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_board.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_car_body.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_car_body.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_car_head_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_car_head_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_car_head_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_car_head_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_car_head_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_car_head_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_car_head_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_car_head_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drag.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drag_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drag_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drag_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drag_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drop_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drop_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drop_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drop_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drop_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drop_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drop_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drop_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drop_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drop_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_drop_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_drop_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_exit.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_frame.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_frame.9.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_game_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_game_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_guide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_guide.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_heart_fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_heart_fill.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_heart_stroke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_heart_stroke.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_level_select_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_level_select_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_mute.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_navigation_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_navigation_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_navigation_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_navigation_press.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_left_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_0.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_6.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_7.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_occupied_right_8.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_prop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_prop.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_refresh.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_refresh_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_refresh_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_share_to_moments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_share_to_moments.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_share_to_qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_share_to_qq.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_share_to_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_share_to_qzone.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_share_to_wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_share_to_wechat.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_sound.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_sound.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_undo_disable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_undo_disable.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/mipmap-xxxhdpi/ic_unselected.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/background_music.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/app/src/main/res/raw/background_music.ogg
--------------------------------------------------------------------------------
/app/src/main/res/values-en-rUS/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Catch Piggy
3 | Fix Pigsty Mode
4 | Classic Mode
5 | "Don't let the piggies run! Build a pigsty surrounded by them"
6 | Piggies has been caught! bus is coming!
7 | Oh dear! The piggies has run!
8 | Drag the piggies to the car
9 | Are you sure exit?
10 | yes
11 | no
12 | Level %d
13 | Continue game
14 | Back to menu
15 | Please do not reject the request
16 | Share the achievements:
17 | Again
18 | Next
19 | Ask friends for help:
20 | Menu
21 | Congratulations!\nTime consumed: %ds\nWoods consumed : %d
22 | Oh dear! almost caught it!\nDo it again!
23 | Level %d\n\nThe piglets need caught: %d
24 | Congratulations!\nTime consumed: %ds\nThe piglets caught by: %d\nWoods consumed: %d
25 | Oh dear! almost complete the mission!\nDo it again!\nThe piglets caught by: %d\nThe piglets need caught: %d
26 | Start
27 | Take a rest and come back again
28 | 哎呀!这关我过不了,太难了,能帮我过一下吗?
29 | 嘿!我第%d关只用了%d个木头就把小猪给圈住了,求超越!
30 | 嘿!我第%d关只用了%d个木头就把%d只小猪给捉住了,求超越!
31 | Next page
32 | Previous page
33 | Close
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 捉小猪
3 | 亡猪补牢
4 | 经典模式
5 | 不要让小猪们跑啦!建猪栏围住它们!
6 | 捉到小猪咯!车来啦!
7 | 哎呀!小猪全跑了!
8 | 把小猪拖到车上
9 | 确定要退出吗?
10 | 确定
11 | 取消
12 | 第%d关
13 | 继续游戏
14 | 返回主菜单
15 | 请不要拒绝权限
16 | 分享战绩到:
17 | 重来
18 | 下一关
19 | 向小伙伴们求助:
20 | 菜单
21 | 恭喜过关!\n共耗时: %d秒\n消耗木头: %d个
22 | 哎呀!差一点就捉住了!\n再接再厉!
23 | 第%d关\n\n需要捉到小猪: %d个
24 | 恭喜过关!\n共耗时: %d秒\n捉到的小猪: %d个\n消耗木头: %d个
25 | 哎呀!离完成任务还差一点点哦!\n再接再厉!\n已捉到的小猪: %d个\n需要捉到的小猪: %d个
26 | 开始
27 | 没心啦!休息一下再来吧
28 | 哎呀!这关我过不了,太难了,能帮我过一下吗?
29 | 嘿!我第%d关只用了%d个木头就把小猪给圈住了,求超越!
30 | 嘿!我第%d关只用了%d个木头就把%d只小猪给捉住了,求超越!
31 | 下一页
32 | 上一页
33 | 关闭
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4CAF50
4 | #1D5D48
5 | #ecd0d0
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 32dp
4 | 54dp
5 | 2dp
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Catch Piggy
3 | Fix Pigsty Mode
4 | Classic Mode
5 | "Don't let the piggies run! Build a pigsty surrounded by them"
6 | Piggies has been caught! bus is coming!
7 | Oh dear! The piggies has run!
8 | Drag the piggies to the car
9 | Are you sure exit?
10 | yes
11 | no
12 | Level %d
13 | Continue game
14 | Back to menu
15 | Please do not reject the request
16 | Share the achievements:
17 | Again
18 | Next
19 | Ask friends for help:
20 | Menu
21 | Congratulations!\nTime consumed: %ds\nWoods consumed : %d
22 | Oh dear! almost caught it!\nDo it again!
23 | Level %d\n\nThe piglets need caught: %d
24 | Congratulations!\nTime consumed: %ds\nThe piglets caught by: %d\nWoods consumed: %d
25 | Oh dear! almost complete the mission!\nDo it again!\nThe piglets caught by: %d\nThe piglets need caught: %d
26 | Start
27 | Take a rest and come back again
28 | 哎呀!这关我过不了,太难了,能帮我过一下吗?
29 | 嘿!我第%d关只用了%d个木头就把小猪给圈住了,求超越!
30 | 嘿!我第%d关只用了%d个木头就把%d只小猪给捉住了,求超越!
31 | Next page
32 | Previous page
33 | Close
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/test/java/com/wuyr/catchpiggy/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.wuyr.catchpiggy;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | // 添加MobSDK的maven地址
9 | maven {
10 | url "http://mvn.mob.com/android"
11 | }
12 | }
13 | dependencies {
14 | classpath 'com.android.tools.build:gradle:3.0.1'
15 | // 注册MobSDK
16 | classpath "com.mob.sdk:MobSDK:+"
17 |
18 | // NOTE: Do not place your application dependencies here; they belong
19 | // in the individual module build.gradle files
20 | }
21 | }
22 |
23 | allprojects {
24 | repositories {
25 | google()
26 | jcenter()
27 | }
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Dec 26 01:49:41 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/preview1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/preview1.gif
--------------------------------------------------------------------------------
/preview2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/preview2.gif
--------------------------------------------------------------------------------
/preview3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/preview3.gif
--------------------------------------------------------------------------------
/preview4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/preview4.gif
--------------------------------------------------------------------------------
/preview5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuyr/CatchPiggy/87399263a71728d19a19f6aa2b008e094470a2e0/preview5.gif
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------