├── .gitignore
├── LICENSE
├── PaperCraftPublic.iml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-rules.pro
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ └── fonts
│ │ │ └── Roboto-Light.ttf
│ │ ├── java
│ │ └── cordproject
│ │ │ └── lol
│ │ │ └── papercraft
│ │ │ ├── MainActivity.java
│ │ │ ├── PaperCraftApplication.java
│ │ │ ├── controller
│ │ │ ├── Controller.java
│ │ │ ├── GameController.java
│ │ │ └── SystemController.java
│ │ │ ├── entity
│ │ │ ├── BulletData.java
│ │ │ ├── EnemyData.java
│ │ │ └── LevelData.java
│ │ │ ├── ui
│ │ │ ├── GameView.java
│ │ │ ├── GameplayView.java
│ │ │ └── MainView.java
│ │ │ └── util
│ │ │ └── MathUtil.java
│ │ └── res
│ │ ├── drawable
│ │ ├── gucci.jpg
│ │ └── louis.jpg
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── gameplay_view.xml
│ │ ├── mipmap-hdpi
│ │ ├── black1.png
│ │ ├── black2.png
│ │ ├── black3.png
│ │ ├── black4.png
│ │ ├── blue1.png
│ │ ├── blue2.png
│ │ ├── blue3.png
│ │ ├── blue4.png
│ │ ├── green1.png
│ │ ├── green2.png
│ │ ├── green3.png
│ │ ├── green4.png
│ │ ├── green5.png
│ │ ├── ic_volume_off_white_18dp.png
│ │ ├── ic_volume_up_white_18dp.png
│ │ ├── icon.png
│ │ ├── landingscreen.png
│ │ ├── orange1.png
│ │ ├── orange2.png
│ │ ├── orange3.png
│ │ ├── orange4.png
│ │ ├── orange5.png
│ │ ├── pink1.png
│ │ ├── pink2.png
│ │ ├── pink3.png
│ │ ├── pink4.png
│ │ ├── pink5.png
│ │ ├── purple1.png
│ │ ├── purple2.png
│ │ ├── purple3.png
│ │ ├── purple4.png
│ │ ├── purple5.png
│ │ ├── yellow1.png
│ │ ├── yellow2.png
│ │ ├── yellow3.png
│ │ ├── yellow4.png
│ │ └── yellow5.png
│ │ ├── mipmap-mdpi
│ │ ├── black1.png
│ │ ├── black2.png
│ │ ├── black3.png
│ │ ├── black4.png
│ │ ├── blue1.png
│ │ ├── blue2.png
│ │ ├── blue3.png
│ │ ├── blue4.png
│ │ ├── green1.png
│ │ ├── green2.png
│ │ ├── green3.png
│ │ ├── green4.png
│ │ ├── green5.png
│ │ ├── ic_volume_off_white_18dp.png
│ │ ├── ic_volume_up_white_18dp.png
│ │ ├── icon.png
│ │ ├── landingscreen.png
│ │ ├── orange1.png
│ │ ├── orange2.png
│ │ ├── orange3.png
│ │ ├── orange4.png
│ │ ├── orange5.png
│ │ ├── pink1.png
│ │ ├── pink2.png
│ │ ├── pink3.png
│ │ ├── pink4.png
│ │ ├── pink5.png
│ │ ├── purple1.png
│ │ ├── purple2.png
│ │ ├── purple3.png
│ │ ├── purple4.png
│ │ ├── purple5.png
│ │ ├── yellow1.png
│ │ ├── yellow2.png
│ │ ├── yellow3.png
│ │ ├── yellow4.png
│ │ └── yellow5.png
│ │ ├── mipmap-xhdpi
│ │ ├── black1.png
│ │ ├── black2.png
│ │ ├── black3.png
│ │ ├── black4.png
│ │ ├── blue1.png
│ │ ├── blue2.png
│ │ ├── blue3.png
│ │ ├── blue4.png
│ │ ├── green1.png
│ │ ├── green2.png
│ │ ├── green3.png
│ │ ├── green4.png
│ │ ├── green5.png
│ │ ├── ic_volume_off_white_18dp.png
│ │ ├── ic_volume_up_white_18dp.png
│ │ ├── icon.png
│ │ ├── landingscreen.png
│ │ ├── orange1.png
│ │ ├── orange2.png
│ │ ├── orange3.png
│ │ ├── orange4.png
│ │ ├── orange5.png
│ │ ├── pink1.png
│ │ ├── pink2.png
│ │ ├── pink3.png
│ │ ├── pink4.png
│ │ ├── pink5.png
│ │ ├── purple1.png
│ │ ├── purple2.png
│ │ ├── purple3.png
│ │ ├── purple4.png
│ │ ├── purple5.png
│ │ ├── yellow1.png
│ │ ├── yellow2.png
│ │ ├── yellow3.png
│ │ ├── yellow4.png
│ │ └── yellow5.png
│ │ ├── mipmap-xxhdpi
│ │ ├── black1.png
│ │ ├── black2.png
│ │ ├── black3.png
│ │ ├── black4.png
│ │ ├── blue1.png
│ │ ├── blue2.png
│ │ ├── blue3.png
│ │ ├── blue4.png
│ │ ├── green1.png
│ │ ├── green2.png
│ │ ├── green3.png
│ │ ├── green4.png
│ │ ├── green5.png
│ │ ├── ic_volume_off_white_18dp.png
│ │ ├── ic_volume_up_white_18dp.png
│ │ ├── icon.png
│ │ ├── landingscreen.png
│ │ ├── orange1.png
│ │ ├── orange2.png
│ │ ├── orange3.png
│ │ ├── orange4.png
│ │ ├── orange5.png
│ │ ├── pink1.png
│ │ ├── pink2.png
│ │ ├── pink3.png
│ │ ├── pink4.png
│ │ ├── pink5.png
│ │ ├── purple1.png
│ │ ├── purple2.png
│ │ ├── purple3.png
│ │ ├── purple4.png
│ │ ├── purple5.png
│ │ ├── yellow1.png
│ │ ├── yellow2.png
│ │ ├── yellow3.png
│ │ ├── yellow4.png
│ │ └── yellow5.png
│ │ ├── raw
│ │ ├── boom1.mp3
│ │ ├── boom2.mp3
│ │ ├── boom4.mp3
│ │ └── paper.mp3
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── wear.iml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── papercraft.iml
├── screenshot.png
├── settings.gradle
├── shared
├── .gitignore
├── build.gradle
├── proguard-rules.pro
├── shared.iml
└── src
│ ├── androidTest
│ └── java
│ │ └── cordproject
│ │ └── lol
│ │ └── papercraftshared
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── cordproject
│ │ │ └── lol
│ │ │ └── papercraftshared
│ │ │ ├── entity
│ │ │ ├── AchievementData.java
│ │ │ └── AchievementInfo.java
│ │ │ ├── graphics
│ │ │ └── PaperGen.java
│ │ │ └── util
│ │ │ ├── AchievementsUtil.java
│ │ │ └── SharedConstants.java
│ └── res
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── cordproject
│ └── lol
│ └── papercraftshared
│ └── ExampleUnitTest.java
└── tankmoji.iml
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
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 | # Emacs temp files
29 | *.*~
30 |
31 | # Emacs lock files
32 | \#*#
33 |
34 | # OSX files
35 | .DS_Store
36 |
37 | # Eclipse project files
38 | .classpath
39 | .project
40 |
41 | # Crashlytics
42 | com_crashlytics_export_strings.xml
43 | crashlytics-build.properties
44 |
45 | # Android Studio
46 | .idea
47 | #.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
48 | .gradle
49 | build/
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/PaperCraftPublic.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PaperCraft
2 |
3 | This is a fork [PaperCraft](https://github.com/CordProject/PaperCraft), a game originally designed for Android Wear watches.
4 |
5 | This version has been modified to work on Android smartphones and tablets.
6 |
7 | 
8 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | generateDebugAndroidTestSources
19 | generateDebugSources
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 |
4 | android {
5 | compileSdkVersion 23
6 |
7 | defaultConfig {
8 | applicationId "pro.rudloff.papercraft"
9 | minSdkVersion 20
10 | targetSdkVersion 23
11 | versionCode 2
12 | versionName "1.0.1"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | implementation fileTree(dir: 'libs', include: ['*.jar'])
24 | compileOnly 'com.google.android.wearable:wearable:2.1.0'
25 | implementation 'com.google.android.support:wearable:2.1.0'
26 | implementation project(':shared')
27 | }
28 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/matthewlim/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/assets/fonts/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/assets/fonts/Roboto-Light.ttf
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/MainActivity.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft;
2 |
3 | import android.app.Activity;
4 | import android.content.SharedPreferences;
5 | import android.content.pm.PackageManager;
6 | import android.media.AudioAttributes;
7 | import android.media.AudioManager;
8 | import android.media.MediaPlayer;
9 | import android.media.SoundPool;
10 | import android.net.Uri;
11 | import android.os.Build;
12 | import android.os.Bundle;
13 | import android.support.wearable.view.BoxInsetLayout;
14 | import android.support.wearable.view.DismissOverlayView;
15 | import android.support.wearable.view.WatchViewStub;
16 | import android.text.TextUtils;
17 | import android.util.Log;
18 | import android.view.View;
19 | import android.widget.TextView;
20 |
21 | import java.text.SimpleDateFormat;
22 | import java.util.ArrayList;
23 | import java.util.Date;
24 | import java.util.HashMap;
25 | import java.util.Locale;
26 |
27 | import cordproject.lol.papercraft.controller.Controller;
28 | import cordproject.lol.papercraft.controller.GameController;
29 | import cordproject.lol.papercraft.controller.SystemController;
30 | import cordproject.lol.papercraft.ui.GameView;
31 | import cordproject.lol.papercraftshared.entity.AchievementData;
32 | import cordproject.lol.papercraftshared.util.AchievementsUtil;
33 | import cordproject.lol.papercraftshared.util.SharedConstants;
34 |
35 | import pro.rudloff.papercraft.R;
36 |
37 | public class MainActivity extends Activity {
38 |
39 | private static final SimpleDateFormat AMBIENT_DATE_FORMAT =
40 | new SimpleDateFormat("HH:mm", Locale.US);
41 |
42 | private BoxInsetLayout mContainerView;
43 | private TextView mTextView;
44 | private TextView mClockView;
45 | private GameView gameView;
46 | private DismissOverlayView mDismissOverlay;
47 | private SystemController systemController;
48 | private GameController gameController;
49 | private HashMap currentAchievements = new HashMap<>();
50 | private MediaPlayer bgmPlayer;
51 | private SoundPool sfxPool;
52 | private ArrayList soundIds = new ArrayList<>();
53 |
54 | private SystemController.SystemControllerListener systemListener = new SystemController.SystemControllerListener() {
55 | @Override
56 | public void onQuitRequested() {
57 | mDismissOverlay.show();
58 | }
59 |
60 | @Override
61 | public void onMusicStopRequested() {
62 | stopPlayingMusic();
63 | }
64 |
65 | @Override
66 | public void onMusicStartRequested() {
67 | startPlayingMusic();
68 | }
69 |
70 | @Override
71 | public void onExplosionSoundRequested() {
72 | playExplosionSound();
73 | }
74 | };
75 |
76 | private GameController.GameControllerListener gameListener = new GameController.GameControllerListener() {
77 | @Override
78 | public void onAchievementMet(AchievementData achievementData) {
79 | if (!currentAchievements.containsKey(achievementData.prefsKey)) {
80 | currentAchievements.put(achievementData.prefsKey, achievementData);
81 | }
82 | AchievementsUtil.markAchievementAchieved(achievementData.prefsKey);
83 | }
84 |
85 | @Override
86 | public void onAchievementIncrement(String achievementKey, int increment) {
87 | if (currentAchievements.containsKey(achievementKey)) {
88 | AchievementData data = currentAchievements.get(achievementKey);
89 | data.incrementBy(increment);
90 | if (AchievementsUtil.reachedMaxValue(data.prefsKey, data.getValue())) {
91 | data.setStatus(SharedConstants.ACHIEVED);
92 | gameController.notifyOnAchievementMet(data);
93 | }
94 | } else {
95 | AchievementData data = new AchievementData(achievementKey);
96 | data.incrementBy(increment);
97 | currentAchievements.put(achievementKey, data);
98 | if (AchievementsUtil.reachedMaxValue(data.prefsKey, data.getValue())) {
99 | data.setStatus(SharedConstants.ACHIEVED);
100 | gameController.notifyOnAchievementMet(data);
101 | }
102 | }
103 | }
104 |
105 | @Override
106 | public void onGameRestarted() {
107 |
108 | }
109 |
110 | @Override
111 | public void onLevelTransition() {
112 |
113 | }
114 | };
115 |
116 |
117 | @Override
118 | protected void onPause() {
119 | SharedPreferences prefs = getSharedPreferences(SharedConstants.PREFS_NAME, MODE_PRIVATE);
120 | SharedPreferences.Editor editor = prefs.edit();
121 |
122 |
123 | editor.putBoolean(SharedConstants.KEY_SOUND_PREFERENCE, systemController.isSoundPreferenceOn());
124 | editor.putInt(SharedConstants.KEY_HIGH_SCORE, gameController.getHighScore());
125 | editor.apply();
126 | stopPlayingMusic();
127 |
128 | /*Log.d("achieve", "PAUSE -> In progress achievements:");
129 | for (AchievementData data : currentAchievements.values()) {
130 | Log.d("achieve", data.toString(getResources()));
131 | }*/
132 | AchievementsUtil.recordAchievementProgress(prefs, currentAchievements);
133 | if (gameView != null){
134 | gameView.onActivityPause();
135 | }
136 | systemController.removeListener(systemListener);
137 | gameController.removeListener(gameListener);
138 |
139 | super.onPause();
140 |
141 | }
142 |
143 | private void stopPlayingMusic() {
144 | if (bgmPlayer != null) {
145 | bgmPlayer.stop();
146 | bgmPlayer.reset();
147 | bgmPlayer.release();
148 | bgmPlayer = null;
149 | }
150 | if (sfxPool != null){
151 | sfxPool.release();
152 | sfxPool = null;
153 | }
154 | soundIds.clear();
155 |
156 | }
157 |
158 | @Override
159 | protected void onCreate(Bundle savedInstanceState) {
160 | super.onCreate(savedInstanceState);
161 | setContentView(R.layout.activity_main);
162 |
163 | systemController = (SystemController) PaperCraftApplication.getController(Controller.SYSTEM_CONTROLLER);
164 | gameController = (GameController) PaperCraftApplication.getController(Controller.GAME_CONTROLLER);
165 | gameController.restartGame();
166 |
167 | mContainerView = (BoxInsetLayout) findViewById(R.id.container);
168 | //mTextView = (TextView) findViewById(R.id.text);
169 | mClockView = (TextView) findViewById(R.id.clock);
170 | WatchViewStub stub = (WatchViewStub) findViewById(R.id.stub);
171 | stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
172 | @Override
173 | public void onLayoutInflated(WatchViewStub stub) {
174 | gameView = (GameView) stub.getChildAt(0);
175 | gameView.onActivityResume();
176 | }
177 | });
178 | mDismissOverlay = (DismissOverlayView) findViewById(R.id.dismiss_overlay);
179 | mDismissOverlay.setIntroText(R.string.long_press_intro);
180 | mDismissOverlay.showIntroIfNecessary();
181 | }
182 |
183 | private Uri getUriForRawFile(int rawResource){
184 | return Uri.parse("android.resource://" + getPackageName() + "/" + rawResource);
185 | }
186 |
187 | @Override
188 | protected void onStart() {
189 | super.onStart();
190 | SharedPreferences prefs = getSharedPreferences(SharedConstants.PREFS_NAME, MODE_PRIVATE);
191 | int lastHighScore = prefs.getInt(SharedConstants.KEY_HIGH_SCORE, -1);
192 | if (lastHighScore >= 0) {
193 | gameController.setHighScore(lastHighScore);
194 | }
195 | if (gameView != null) {
196 | gameView.onActivityResume();
197 | }
198 | AchievementsUtil.unpackInProgressAchievements(prefs, currentAchievements);
199 | AchievementsUtil.markAchievementsAchieved(prefs);
200 | Log.d("achieve", "START -> In progress achievements:");
201 | for (AchievementData data : currentAchievements.values()) {
202 | Log.d("achieve", data.toString(getResources()));
203 | }
204 | }
205 |
206 | @Override
207 | protected void onStop() {
208 | super.onStop();
209 | }
210 |
211 | @Override
212 | protected void onResume() {
213 | SharedPreferences prefs = getSharedPreferences(SharedConstants.PREFS_NAME, MODE_PRIVATE);
214 | systemController.setSoundPreferenceOn(prefs.getBoolean(SharedConstants.KEY_SOUND_PREFERENCE, true));
215 |
216 | startPlayingMusic();
217 |
218 | int lastHighScore = prefs.getInt(SharedConstants.KEY_HIGH_SCORE, -1);
219 | if (lastHighScore >= 0) {
220 | gameController.setHighScore(lastHighScore);
221 | }
222 | if (gameView != null) {
223 | gameView.onActivityResume();
224 | }
225 |
226 | AchievementsUtil.markAchievementsAchieved(prefs);
227 | /*Log.d("achieve", "RESUME -> In progress achievements:");
228 | for (AchievementData data : currentAchievements.values()) {
229 | Log.d("achieve", data.toString(getResources()));
230 | }*/
231 | systemController.addListener(systemListener);
232 | gameController.addListener(gameListener);
233 | super.onResume();
234 | }
235 |
236 | private void startPlayingMusic() {
237 | if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_OUTPUT) && systemController.isSoundPreferenceOn()) {
238 | bgmPlayer = MediaPlayer.create(this, getUriForRawFile(R.raw.paper));
239 | bgmPlayer.setLooping(true);
240 | bgmPlayer.start();
241 |
242 |
243 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT_WATCH) {
244 | SoundPool.Builder builder = new SoundPool.Builder();
245 | AudioAttributes.Builder attributesBuilder = new AudioAttributes.Builder();
246 | attributesBuilder.setUsage(AudioAttributes.USAGE_GAME).setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION);
247 | builder.setAudioAttributes(attributesBuilder.build()).setMaxStreams(3);
248 |
249 | sfxPool = builder.build();
250 |
251 | } else {
252 | sfxPool = new SoundPool(3, AudioManager.STREAM_MUSIC, 0);
253 |
254 | }
255 | soundIds.add(sfxPool.load(this, R.raw.boom1, 1));
256 | soundIds.add(sfxPool.load(this, R.raw.boom2, 1));
257 | soundIds.add(sfxPool.load(this, R.raw.boom4, 1));
258 | }
259 | }
260 |
261 | private void playExplosionSound() {
262 | if (sfxPool != null && systemController.isSoundPreferenceOn()) {
263 | sfxPool.play(soundIds.get((int) (Math.random()*3)), .5f, .5f, 1, 0, 1.f);
264 | }
265 | }
266 |
267 | private void updateDisplay() {
268 | mContainerView.setBackground(null);
269 | mClockView.setVisibility(View.GONE);
270 | }
271 | }
272 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/PaperCraftApplication.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft;
2 |
3 | import android.app.Application;
4 |
5 | import java.util.HashMap;
6 |
7 | import cordproject.lol.papercraft.controller.Controller;
8 | import cordproject.lol.papercraft.controller.GameController;
9 | import cordproject.lol.papercraft.controller.SystemController;
10 |
11 | public class PaperCraftApplication extends Application {
12 |
13 | private static HashMap controllerHashMap = new HashMap<>();
14 |
15 | @Override
16 | public void onCreate() {
17 | super.onCreate();
18 | SystemController systemController = new SystemController();
19 | GameController gameController = new GameController();
20 | controllerHashMap.put(Controller.SYSTEM_CONTROLLER, systemController);
21 | controllerHashMap.put(Controller.GAME_CONTROLLER, gameController);
22 |
23 | }
24 |
25 | public static Controller getController(int controller) {
26 | return controllerHashMap.get(controller);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/controller/Controller.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.controller;
2 |
3 | import java.util.ArrayList;
4 |
5 |
6 | public abstract class Controller {
7 |
8 | public static int SYSTEM_CONTROLLER = 0;
9 | public static int GAME_CONTROLLER = 1;
10 |
11 | protected ArrayList listenerMap = new ArrayList<>();
12 |
13 | public void addListener(ControllerListener listener) {
14 | listenerMap.add(listener);
15 | }
16 |
17 | public void removeListener(ControllerListener listener) {
18 | listenerMap.remove(listener);
19 | }
20 |
21 | public static abstract class ControllerListener {
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/controller/GameController.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.controller;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Date;
5 | import java.util.concurrent.TimeUnit;
6 |
7 | import pro.rudloff.papercraft.R;
8 | import cordproject.lol.papercraft.entity.LevelData;
9 | import cordproject.lol.papercraft.util.MathUtil;
10 | import cordproject.lol.papercraftshared.entity.AchievementData;
11 | import cordproject.lol.papercraftshared.util.AchievementsUtil;
12 | import cordproject.lol.papercraftshared.util.SharedConstants;
13 |
14 |
15 | public class GameController extends Controller {
16 |
17 | public static final int L_0 = 0;
18 |
19 |
20 | public static final int L_8 = 8;
21 |
22 |
23 | public static final int START_LIVES = 3;
24 |
25 | private int currentLevel = L_0;
26 | private int remainingLives = START_LIVES;
27 | private boolean playerAlive = false;
28 | private int currentKills;
29 | private int currentScore;
30 | private int gameState = TITLE;
31 |
32 | private int comboCount = 0;
33 | private int maxCombo = 0;
34 |
35 | private int highScore = 0;
36 | private long lastOchoTime = 0;
37 | private boolean backStabber = true;
38 |
39 | private int escapedEnemies;
40 | private int cumulativeEscapedEnemies;
41 | private int cumulativeDeaths;
42 | private int cumulativeKills;
43 |
44 | public static final int PAUSED = -1;
45 | public static final int PLAYING = 0;
46 | public static final int RESTARTING = 1;
47 | public static final int TRANSITIONING_TO_NEXT_LEVEL = 2;
48 | public static final int TITLE = 3;
49 | public static final int SHOWING_LEVEL_WIN = 4;
50 | public static final int END_CREDITS = 5;
51 | public static final int END_STATS = 6;
52 |
53 | public static final int LOSE = -1;
54 | public static final int ALIVE = 0;
55 | public static final int WIN = 1;
56 |
57 | public static final int SHIELDS = 1;
58 | public static final int NO_SHIELDS = 0;
59 |
60 | public static final int ENEMY_POINT_VALUE = 10;
61 |
62 | private ArrayList levelsList = new ArrayList<>();
63 |
64 | public GameController() {
65 | generateLevelData();
66 | }
67 |
68 | public int getGameStateForCurrentKills() {
69 | if (currentKills >= levelsList.get(currentLevel).getKillQuota()){
70 | return WIN;
71 | }
72 | return ALIVE;
73 | }
74 |
75 | private void generateLevelData() {
76 |
77 | LevelData level0 = new LevelData(-10, 20, 3.5f, 1, NO_SHIELDS, 2.f, 0.f, 0.8f, false, 9);
78 | level0.setBitmapPalette(new int[] {
79 | R.mipmap.yellow1,
80 | R.mipmap.yellow2,
81 | R.mipmap.yellow3,
82 | R.mipmap.yellow4,
83 | R.mipmap.yellow5
84 | });
85 | LevelData level1 = new LevelData(10, 20, 3.5f, 2, NO_SHIELDS, 2.f, 0.f, 0.8f, false, 9);
86 | level1.setBitmapPalette(new int[] {
87 | R.mipmap.green1,
88 | R.mipmap.green2,
89 | R.mipmap.green3,
90 | R.mipmap.green4,
91 | R.mipmap.green5
92 | });
93 | LevelData level2 = new LevelData(30, 30, 3.5f, 4, SHIELDS, 2.25f, 0.3f, 0.7f, false, 9);
94 | level2.setBitmapPalette(new int[] {
95 | R.mipmap.orange3,
96 | R.mipmap.orange4,
97 | R.mipmap.orange5,
98 | });
99 | LevelData level3 = new LevelData(50, 40, 3.5f, 8, SHIELDS, 2.25f, 0.4f, 0.75f, false, 9);
100 | level3.setBitmapPalette(new int[] {
101 | R.mipmap.blue1,
102 | R.mipmap.blue2,
103 | R.mipmap.blue3,
104 | });
105 | LevelData level4 = new LevelData(80, 50, 3.5f, 16, SHIELDS, 2.25f, 0.7f, 0.8f, true, 12);
106 | level4.setBitmapPalette(new int[] {
107 | R.mipmap.pink1,
108 | R.mipmap.pink2,
109 | R.mipmap.pink3,
110 | R.mipmap.pink4,
111 | });
112 |
113 | LevelData level5 = new LevelData(120, 70, 3.5f, 32, SHIELDS, 2.f, 0.8f, 1.f, true, 12);
114 | level5.setBitmapPalette(new int[] {
115 | R.mipmap.purple1,
116 | R.mipmap.purple2,
117 | R.mipmap.purple3,
118 | R.mipmap.purple4,
119 | });
120 | LevelData level6 = new LevelData(120, 90, 3.5f, 64, SHIELDS, 2.f, 0.8f, 1.f, true, 15);
121 | level6.setBitmapPalette(new int[] {
122 | R.mipmap.orange4,
123 | R.mipmap.yellow1,
124 | R.mipmap.blue2,
125 | R.mipmap.pink3,
126 | });
127 | LevelData level7 = new LevelData(120, 120, 3.5f, 96, SHIELDS, 1.75f, 0.8f, 1.f, true, 15);
128 | level7.setBitmapPalette(new int[] {
129 | R.mipmap.green2,
130 | R.mipmap.blue1,
131 | R.mipmap.yellow3,
132 | R.mipmap.purple5,
133 | });
134 | LevelData level8 = new LevelData(120, 150, 3.5f, 192, SHIELDS, 1.5f, 0.8f, 1.f, true, 15);
135 | level8.setBitmapPalette(new int[] {
136 | R.mipmap.pink1,
137 | R.mipmap.green3,
138 | R.mipmap.orange5,
139 | R.mipmap.blue2,
140 | });
141 |
142 | levelsList.add(level0);
143 | levelsList.add(level1);
144 | levelsList.add(level2);
145 | levelsList.add(level3);
146 | levelsList.add(level4);
147 | levelsList.add(level5);
148 | levelsList.add(level6);
149 | levelsList.add(level7);
150 | levelsList.add(level8);
151 | }
152 |
153 | public void restartGame() {
154 |
155 | if (currentScore > highScore){
156 | highScore = currentScore;
157 | }
158 | resetCurrentScore();
159 | currentLevel = L_0;
160 | setGameState(TITLE);
161 | backStabber = true;
162 | cumulativeDeaths = 0;
163 | cumulativeEscapedEnemies = 0;
164 | cumulativeKills = 0;
165 | escapedEnemies = 0;
166 | currentKills = 0;
167 | remainingLives = START_LIVES;
168 | maxCombo = 0;
169 | notifyOnGameRestarted();
170 | }
171 |
172 | public LevelData getDataForLevel(int level) {
173 | return levelsList.get(level);
174 | }
175 |
176 | public int getCurrentScore() {
177 | return currentScore;
178 | }
179 |
180 | public void resetCurrentScore() {
181 | currentScore = 0;
182 | }
183 | public void incrementKillCount() {
184 | currentKills++;
185 | cumulativeKills++;
186 | incrementCurrentScore(ENEMY_POINT_VALUE);
187 | notifyOnAchievementIncrement(SharedConstants.ACH_ONE_HUNDRED, 1);
188 | notifyOnAchievementIncrement(SharedConstants.ACH_ONE_THOUSAND, 1);
189 | notifyOnAchievementIncrement(SharedConstants.ACH_TEN_THOUSAND, 1);
190 | }
191 |
192 |
193 | public void incrementCurrentScore() {
194 | currentScore++;
195 | }
196 |
197 | public void incrementCurrentScore(int increment) {
198 | currentScore+=increment;
199 | }
200 |
201 | public long getEnemyTravelTime() {
202 | return MathUtil.framesForSec(levelsList.get(getCurrentLevel()).getEnemyTravelTime());
203 | }
204 |
205 | public void decrementCurrentScore() {
206 | currentScore -= levelsList.get(getCurrentLevel()).getScoreDecrement();
207 | }
208 |
209 | public void decrementRemainingLives() {
210 | remainingLives--;
211 | }
212 |
213 | public void setRemainingLives(int remaining) {
214 | remainingLives = remaining;
215 | }
216 |
217 | public boolean isPlayerAlive() {
218 | return playerAlive;
219 | }
220 |
221 | public void setPlayerAlive(boolean playerAlive) {
222 | this.playerAlive = playerAlive;
223 | }
224 |
225 | public void proceedToNextLevel() {
226 | if (currentLevel == levelsList.size() -1 &&
227 | cumulativeDeaths == 0 && !AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_PRETTY_AWESOME_MAN)){
228 | AchievementData awesomeData = new AchievementData(SharedConstants.ACH_PRETTY_AWESOME_MAN);
229 | awesomeData.updateStatus(SharedConstants.ACHIEVED);
230 | notifyOnAchievementMet(awesomeData);
231 | }
232 |
233 | if (currentLevel == levelsList.size() -1) {
234 | cumulativeDeaths = 0;
235 | cumulativeKills = 0;
236 | maxCombo = 0;
237 | }
238 |
239 | currentLevel = (currentLevel + 1) % levelsList.size();
240 |
241 | if (currentLevel == levelsList.size() -1 &&
242 | !AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_FIN)) {
243 | AchievementData finData = new AchievementData(SharedConstants.ACH_FIN);
244 | finData.updateStatus(SharedConstants.ACHIEVED);
245 | notifyOnAchievementMet(finData);
246 | }
247 | if (backStabber && currentKills > 0 && !AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_BACK_STABBER)) {
248 | AchievementData backStabData = new AchievementData(SharedConstants.ACH_BACK_STABBER);
249 | backStabData.updateStatus(SharedConstants.ACHIEVED);
250 | notifyOnAchievementMet(backStabData);
251 | }
252 | currentKills = 0;
253 |
254 | }
255 |
256 | public int getGameState() {
257 | return gameState;
258 | }
259 |
260 | public int getShieldMode() {
261 | return levelsList.get(currentLevel).getShieldMode();
262 | }
263 |
264 | public long getEnemyInterval() {
265 | return MathUtil.framesForSec(levelsList.get(currentLevel).getEnemyInterval());
266 | }
267 |
268 | public void setGameState(int gameState) {
269 | this.gameState = gameState;
270 | if (gameState == TRANSITIONING_TO_NEXT_LEVEL) {
271 |
272 | if (escapedEnemies >= 50 && !AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_PACIFIST)) {
273 | AchievementData pacifistData = new AchievementData(SharedConstants.ACH_PACIFIST);
274 | pacifistData.updateStatus(SharedConstants.ACHIEVED);
275 | notifyOnAchievementMet(pacifistData);
276 | }
277 | escapedEnemies = 0;
278 | backStabber = true;
279 |
280 | notifyOnLevelTransition();
281 | }
282 | }
283 |
284 | public int getCurrentLevel() {
285 | return currentLevel;
286 | }
287 |
288 | public int getRemainingLives() {
289 | return remainingLives;
290 | }
291 |
292 | public float getExistenceProb() {
293 | return levelsList.get(currentLevel).getExistenceProb();
294 | }
295 |
296 | public float getShieldProb() {
297 | return levelsList.get(currentLevel).getShieldProb();
298 | }
299 |
300 | public float getRotAngleRand() {
301 | return levelsList.get(currentLevel).getRotAngleRandom();
302 | }
303 |
304 | public void incrementComboCount(){
305 | comboCount++;
306 | if (comboCount >= 8) {
307 | if (!AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_OCHO)) {
308 | AchievementData ochoData = new AchievementData(SharedConstants.ACH_OCHO);
309 | ochoData.updateStatus(SharedConstants.ACHIEVED);
310 | notifyOnAchievementMet(ochoData);
311 |
312 | }
313 | if (lastOchoTime == 0) {
314 | lastOchoTime = new Date().getTime();
315 | } else {
316 | long now = new Date().getTime();
317 | if (TimeUnit.SECONDS.convert(now - lastOchoTime, TimeUnit.MILLISECONDS) < 10 &&
318 | !AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_RE_OCHO)) {
319 | AchievementData reOchoData = new AchievementData(SharedConstants.ACH_RE_OCHO);
320 | reOchoData.updateStatus(SharedConstants.ACHIEVED);
321 | notifyOnAchievementMet(reOchoData);
322 | }
323 | lastOchoTime = now;
324 | }
325 | } else if (comboCount >= 4) {
326 | if (!AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_CUATRO)) {
327 | AchievementData cuatroData = new AchievementData(SharedConstants.ACH_CUATRO);
328 | cuatroData.updateStatus(SharedConstants.ACHIEVED);
329 | notifyOnAchievementMet(cuatroData);
330 | }
331 | }
332 | }
333 |
334 | public void resetComboCount(){
335 |
336 | if (comboCount > 1) {
337 | if (comboCount > maxCombo) {
338 | maxCombo = comboCount;
339 | }
340 | incrementCurrentScore(comboCount * comboCount * comboCount);
341 | }
342 |
343 | comboCount = 0;
344 | }
345 |
346 | public int getComboCount() {
347 | return comboCount;
348 | }
349 |
350 | public int getMaxConcurrentEnemies() {
351 | return levelsList.get(currentLevel).getMaxConcurrentEnemies();
352 | }
353 |
354 | public int getScoreDecrement() {
355 | return levelsList.get(currentLevel).getScoreDecrement();
356 | }
357 |
358 | public int[] getBitmapPalette() {
359 | return levelsList.get(currentLevel).getBitmapPalette();
360 | }
361 |
362 | public float getCompletionPercent() {
363 | return ((float)currentKills)/((float)levelsList.get(currentLevel).getKillQuota());
364 | }
365 |
366 | public int getHighScore() {
367 | return highScore;
368 | }
369 |
370 | public void setHighScore(int highScore) {
371 | this.highScore = highScore;
372 | }
373 |
374 | public void recordDeath() {
375 | cumulativeDeaths++;
376 | if (!AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_BAD_PILOT)) {
377 | notifyOnAchievementIncrement(SharedConstants.ACH_BAD_PILOT, 1);
378 | }
379 |
380 | if (remainingLives == 0 && currentKills == 0 && currentScore <= 0 &&
381 | !AchievementsUtil.achievementAlreadyAchieved(SharedConstants.ACH_SITTING_DUCK)) {
382 | AchievementData sittingData = new AchievementData(SharedConstants.ACH_SITTING_DUCK);
383 | sittingData.updateStatus(SharedConstants.ACHIEVED);
384 | notifyOnAchievementMet(sittingData);
385 | }
386 | }
387 |
388 | public void notifyOnAchievementMet(AchievementData data){
389 |
390 | for (ControllerListener listener : listenerMap) {
391 | ((GameControllerListener)listener).onAchievementMet(data);
392 | }
393 | }
394 |
395 | public void notifyOnAchievementIncrement(String acheivementKey, int increment){
396 | if (AchievementsUtil.achievementAlreadyAchieved(acheivementKey)) {
397 | return;
398 | }
399 | for (ControllerListener listener : listenerMap) {
400 | ((GameControllerListener)listener).onAchievementIncrement(acheivementKey, increment);
401 | }
402 | }
403 |
404 | public void notifyOnGameRestarted(){
405 | for (ControllerListener listener : listenerMap) {
406 | ((GameControllerListener)listener).onGameRestarted();
407 | }
408 | }
409 |
410 | public void notifyOnLevelTransition(){
411 | for (ControllerListener listener : listenerMap) {
412 | ((GameControllerListener)listener).onLevelTransition();
413 | }
414 | }
415 |
416 | public boolean isBackStabber() {
417 | return backStabber;
418 | }
419 |
420 | public void setBackStabber(boolean allBackStabs) {
421 | this.backStabber = allBackStabs;
422 | }
423 |
424 | public int getCumulativeEscapedEnemies() {
425 | return cumulativeEscapedEnemies;
426 | }
427 |
428 | public int getEscapedEnemies() {
429 | return escapedEnemies;
430 | }
431 |
432 | public void incrementEscapedEnemies() {
433 | escapedEnemies++;
434 | cumulativeEscapedEnemies++;
435 | }
436 |
437 | public int getCumulativeDeaths() {
438 | return cumulativeDeaths;
439 | }
440 |
441 | public int getCumulativeKills() {
442 | return cumulativeKills;
443 | }
444 |
445 | public int getMaxCombo() {
446 | return maxCombo;
447 | }
448 |
449 | public static abstract class GameControllerListener extends ControllerListener{
450 | public void onAchievementMet(AchievementData achievementData){}
451 | public void onAchievementIncrement(String achievementKey, int increment){}
452 | public void onGameRestarted(){}
453 | public void onLevelTransition(){}
454 | }
455 |
456 | }
457 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/controller/SystemController.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.controller;
2 |
3 | public class SystemController extends Controller{
4 |
5 |
6 | private boolean soundPreferenceOn = true;
7 |
8 | public void notifyOnQuitRequested() {
9 | for (ControllerListener listener : listenerMap) {
10 | ((SystemControllerListener)listener).onQuitRequested();
11 | }
12 | }
13 |
14 | public void notifyOnMusicStopRequested() {
15 | for (ControllerListener listener : listenerMap) {
16 | ((SystemControllerListener)listener).onMusicStopRequested();
17 | }
18 | }
19 |
20 | public void notifyOnMusicStartRequested() {
21 | for (ControllerListener listener : listenerMap) {
22 | ((SystemControllerListener)listener).onMusicStartRequested();
23 | }
24 | }
25 |
26 | public void notifyOnExplosionSoundRequested() {
27 | for (ControllerListener listener : listenerMap) {
28 | ((SystemControllerListener)listener).onExplosionSoundRequested();
29 | }
30 | }
31 |
32 | public void setSoundPreferenceOn(boolean soundPreferenceOn) {
33 | this.soundPreferenceOn = soundPreferenceOn;
34 | }
35 |
36 | public boolean isSoundPreferenceOn() {
37 | return soundPreferenceOn;
38 | }
39 |
40 | public static abstract class SystemControllerListener extends ControllerListener{
41 | public void onQuitRequested(){}
42 | public void onMusicStopRequested(){}
43 | public void onMusicStartRequested(){}
44 | public void onExplosionSoundRequested(){}
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/entity/BulletData.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.entity;
2 |
3 | import android.graphics.Matrix;
4 |
5 |
6 | public class BulletData {
7 | public float x, y;
8 | public float length;
9 | public float destination;
10 | public boolean shouldDelete = false;
11 |
12 | public float speedX, speedY;
13 | public Matrix rotMat = new Matrix();
14 | public Matrix transMat = new Matrix();
15 | public Matrix shadowTransMat = new Matrix();
16 | public float lifeSpan= 0.f;
17 | public float rotAngle;
18 |
19 | public void setDestination(float destination) {
20 | this.destination = destination;
21 | lifeSpan = 1.f;
22 | }
23 |
24 | public float getLifeSpan() {
25 | return lifeSpan;
26 | }
27 |
28 | public void move() {
29 | if (destination <= 0) {
30 | x-=9;
31 | if (x <= destination) {
32 | shouldDelete = true;
33 | }
34 | } else {
35 | x+=3;
36 | if (x >= destination) {
37 | shouldDelete = true;
38 | }
39 | }
40 | }
41 |
42 | public void move(float speedX, float speedY) {
43 | if (destination <= 0) {
44 | x -= speedX;
45 | y -= speedY;
46 | if (x <= destination) {
47 | shouldDelete = true;
48 | }
49 | } else {
50 | x += speedX;
51 | y += speedY;
52 | if (x >= destination) {
53 | shouldDelete = true;
54 | }
55 | }
56 | lifeSpan = Math.min(1.f, Math.abs((x - destination)/(destination*.1f)));
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/entity/EnemyData.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.entity;
2 |
3 |
4 | public class EnemyData {
5 | public final static int FRONT = 0;
6 | public final static int BACK = 1;
7 | public final static int NONE = -1;
8 |
9 | public final static int CIRCLE = 0;
10 | public final static int DIAMOND = 1;
11 | public final static int PENTAGON = 2;
12 |
13 | public float speedX, speedY;
14 |
15 | public int shieldPosition = NONE;
16 | public int shape;
17 | public float speed;
18 | public float x, y;
19 | public float origin, destination;
20 | public float screenBoundary;
21 | public boolean shouldDelete = false;
22 | public int bitmapIndex = 0;
23 | public boolean reachedOffscreen = false;
24 | public boolean alert = false;
25 |
26 | public void move(float speedX, float speedY) {
27 | if (x > destination) {
28 | if (x > screenBoundary) {
29 | x -= speedX*3;
30 | y -= speedY*3;
31 | } else if (x <= origin/7){
32 | alert = true;
33 | x-=speedX/5;
34 | y-=speedY/5;
35 | } else if (x <= origin/6){
36 | alert = true;
37 | x-=speedX/4;
38 | y-=speedY/4;
39 | } else if (x <= origin/5){
40 | alert = true;
41 | x-=speedX/3;
42 | y-=speedY/3;
43 | }else if (x <= origin/4){
44 | alert = true;
45 | x-=speedX/2;
46 | y-=speedY/2;
47 | }else {
48 | x-=speedX;
49 | y-=speedY;
50 | }
51 | } else {
52 | shouldDelete = true;
53 | reachedOffscreen = true;
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/entity/LevelData.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.entity;
2 |
3 |
4 | public class LevelData {
5 | private int scoreMinimum;
6 | private int killQuota;
7 | private float enemyTravelTime;
8 | private int scoreDecrement;
9 | private int shieldMode;
10 | private float enemyInterval;
11 | private float shieldProb;
12 | private float existenceProb;
13 | private boolean rotAngleRandom = false;
14 | private int maxConcurrentEnemies = 0;
15 | private int[] bitmapPalette;
16 |
17 | public LevelData(int scoreMinimum, int killQuota, float enemyTravelTime, int scoreDecrement,
18 | int shieldMode, float enemyInterval, float shieldProb, float existenceProb,
19 | boolean rotAngleRandom, int maxConcurrentEnemies) {
20 | this.scoreMinimum = scoreMinimum;
21 | this.killQuota = killQuota;
22 | this.enemyTravelTime = enemyTravelTime;
23 | this.scoreDecrement = scoreDecrement;
24 | this.shieldMode = shieldMode;
25 | this.enemyInterval = enemyInterval;
26 | this.shieldProb = shieldProb;
27 | this.existenceProb = existenceProb;
28 | this.rotAngleRandom = rotAngleRandom;
29 | this.maxConcurrentEnemies = maxConcurrentEnemies;
30 | }
31 |
32 | static final boolean TEST_ENDING = false;
33 |
34 | public int getScoreMinimum() {
35 | return scoreMinimum;
36 | }
37 |
38 | public int getKillQuota() {
39 | if (TEST_ENDING) {
40 | return 20;
41 | }
42 | return killQuota;
43 | }
44 |
45 | public float getEnemyTravelTime() {
46 | return enemyTravelTime;
47 | }
48 |
49 | public int getScoreDecrement() {
50 | return scoreDecrement;
51 | }
52 |
53 | public int getShieldMode() {
54 | return shieldMode;
55 | }
56 |
57 | public float getEnemyInterval() {
58 | return enemyInterval;
59 | }
60 |
61 | public float getShieldProb() {
62 | return shieldProb;
63 | }
64 |
65 | public float getExistenceProb() {
66 | return existenceProb;
67 | }
68 |
69 | public float getRotAngleRandom() {
70 | if (rotAngleRandom) {
71 | return (float) (-3.f + Math.random() * 6.f);
72 | }
73 | return 0;
74 | }
75 |
76 | public int getMaxConcurrentEnemies() {
77 | return maxConcurrentEnemies;
78 | }
79 |
80 | public int[] getBitmapPalette() {
81 | return bitmapPalette;
82 | }
83 |
84 | public void setBitmapPalette(int[] bitmapPalette) {
85 | this.bitmapPalette = bitmapPalette;
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/ui/GameView.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.ui;
2 |
3 | public interface GameView {
4 | void onActivityPause();
5 | void onActivityResume();
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/ui/GameplayView.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.ui;
2 |
3 | import android.animation.Animator;
4 | import android.animation.ValueAnimator;
5 | import android.content.Context;
6 | import android.graphics.Canvas;
7 | import android.util.AttributeSet;
8 | import android.view.MotionEvent;
9 | import android.view.animation.AccelerateInterpolator;
10 | import android.view.animation.DecelerateInterpolator;
11 |
12 | import java.util.ArrayList;
13 | import java.util.TimerTask;
14 |
15 | import cordproject.lol.papercraft.controller.GameController;
16 | import cordproject.lol.papercraft.util.MathUtil;
17 | import pro.rudloff.papercraft.R;
18 | import cordproject.lol.papercraft.entity.BulletData;
19 | import cordproject.lol.papercraft.entity.EnemyData;
20 |
21 | public class GameplayView extends MainView {
22 |
23 | private float screenRadius;
24 |
25 | private float currentManeuverDist;
26 |
27 | private ValueAnimator maneuver;
28 | private ValueAnimator maneuverBack;
29 |
30 |
31 | public GameplayView(Context context) {
32 | this(context, null);
33 | }
34 |
35 | public GameplayView(Context context, AttributeSet attrs) {
36 | this(context, attrs, 0);
37 | }
38 |
39 | public GameplayView(Context context, AttributeSet attrs, int defStyleAttr) {
40 | super(context, attrs, defStyleAttr);
41 | setWillNotDraw(false);
42 | initLanes();
43 | initFrameTask();
44 | }
45 |
46 | @Override
47 | protected void initFrameTask() {
48 | frameTask = new TimerTask() {
49 | @Override
50 | public void run() {
51 | // this fires every 16th of a second...
52 |
53 | // 60 ticks = 1 second
54 | // 30 ticks = 1/2 second
55 |
56 |
57 | updateScrollingSectionPosition();
58 | synchronized (enemyLock) {
59 | switch (gameController.getGameState()) {
60 |
61 | case GameController.TITLE:
62 | updateGameTitleTransition();
63 | break;
64 |
65 | case GameController.END_CREDITS:
66 |
67 | break;
68 |
69 | case GameController.TRANSITIONING_TO_NEXT_LEVEL:
70 | updateBullets();
71 | updateScoreTextScale();
72 | updateLevelTitleTransition();
73 | enemyDeployIntervalTicker = (int) gameController.getEnemyInterval();
74 | break;
75 |
76 | case GameController.SHOWING_LEVEL_WIN:
77 | updateBullets();
78 | updateBoosterPulse();
79 | explodeAllEnemies();
80 | updateExplosions();
81 | updateShipWinTransition();
82 | updateScoreTextScale();
83 | break;
84 |
85 | case GameController.PLAYING:
86 | if (!shipOnScreen && startX != 0) {
87 | currentX = MathUtil.lerp(currentX, startX, 0.1f);
88 | if (startX - currentX <= 0.05f) {
89 | currentX = startX;
90 | shipOnScreen = true;
91 | }
92 | }
93 | if (!dead) {
94 | if (!shouldNotFire) {
95 | if (!shouldFireBackwards && bulletIntervalTicker == 15) {
96 | BulletData data = new BulletData();
97 | data.x = muzzleRect.centerX();
98 |
99 | data.destination = getWidth()*7/8;
100 | data.y = muzzleRect.centerY();
101 | data.speedX = (float) (3 * Math.cos(Math.toRadians(radiusAngle)));
102 | data.speedY = (float) (3 * Math.sin(Math.toRadians(radiusAngle)));
103 | data.length = getWidth() / 32;
104 |
105 | data.rotAngle = rotAngle + radiusAngle;
106 | data.rotMat.setRotate(data.rotAngle, bulletRect.centerX(), bulletRect.centerY());
107 | bullets.add(data);
108 | bulletIntervalTicker = 0;
109 | } else if (shouldFireBackwards && bulletIntervalTicker == 3) {
110 | BulletData data = new BulletData();
111 | data.x = muzzleRect.centerX();
112 | data.destination = -shipLength * 1.5f;
113 | data.y = muzzleRect.centerY();
114 | data.speedX = (float) (9 * Math.cos(Math.toRadians(radiusAngle)));
115 | data.speedY = (float) (9 * Math.sin(Math.toRadians(radiusAngle)));
116 | data.length = getWidth() / 32;
117 | data.rotAngle = rotAngle + radiusAngle;
118 | data.rotMat.setRotate(data.rotAngle, bulletRect.centerX(), bulletRect.centerY());
119 | bullets.add(data);
120 | bulletIntervalTicker = 0;
121 | }
122 | bulletIntervalTicker++;
123 | }
124 |
125 | if (invulnerabilityTicker == 0) {
126 | if (!shouldAddMoreEnemies && enemyDeployIntervalTicker == gameController.getEnemyInterval()) {
127 | if (enemiesToDeploy.size() < gameController.getMaxConcurrentEnemies()) {
128 | if (!lane1.isEmpty()) {
129 | enemiesToDeploy.add(lane1.remove(lane1.size() - 1));
130 | }
131 | if (!lane2.isEmpty()) {
132 | enemiesToDeploy.add(lane2.remove(lane2.size() - 1));
133 | }
134 | if (!lane3.isEmpty()) {
135 | enemiesToDeploy.add(lane3.remove(lane3.size() - 1));
136 | }
137 | }
138 |
139 | if (lane1.isEmpty()) {
140 | shouldAddMoreEnemies = true;
141 | }
142 | enemyDeployIntervalTicker = 0;
143 | } else if (shouldAddMoreEnemies && getHeight() != 0) {
144 | addMoreEnemies(lane1, enemyCount, getHeight() / 2, -8 + gameController.getRotAngleRand());
145 | addMoreEnemies(lane2, enemyCount, getHeight() / 2, gameController.getRotAngleRand());
146 | addMoreEnemies(lane3, enemyCount, getHeight() / 2, 8 + gameController.getRotAngleRand());
147 | shouldAddMoreEnemies = false;
148 | enemyDeployIntervalTicker = 0;
149 | }
150 |
151 | enemyDeployIntervalTicker++;
152 | }
153 |
154 | }
155 | if (dead) {
156 | deadTicker++;
157 | if (deadTicker < 60) {
158 | restartCount = 3;
159 | }
160 | if (deadTicker == 60) {
161 | restartCount = 2;
162 | }
163 | if (deadTicker == 120) {
164 | restartCount = 1;
165 | }
166 | if (deadTicker == 180) {
167 | if (gameController.getRemainingLives() == 0) {
168 | gameTitleTransitionPct = 2.f;
169 | levelTitleTransitionPct = 0;
170 | gameController.restartGame();
171 | clearEnemies();
172 | clearBullets();
173 | createEnemyBitmaps();
174 | }
175 |
176 | restartCount = 0;
177 | placeShipOffscreen();
178 | maneuverX = 0;
179 | currentY = getMeasuredHeight() / 2;
180 | maneuverY = 0;
181 | rotAngle = 0;
182 | radiusAngle = 0;
183 | paint.setAlpha(255);
184 | shouldNotFire = false;
185 | dead = false;
186 | deadTicker = 0;
187 | }
188 | }
189 | updateBullets();
190 |
191 | updateEnemies();
192 |
193 | updateExplosions();
194 | updateBoosterPulse();
195 | updateHeartbeat();
196 | updateScoreTextScale();
197 | updatePlayer();
198 | break;
199 | } // end switch(gameState)
200 | } // end synchronized(enemyLock)
201 | updateProgressAndLivesLayout();
202 | postInvalidate();
203 | }
204 | };
205 | }
206 |
207 | private void initLanes() {
208 | lane1 = new ArrayList<>();
209 | lane2 = new ArrayList<>();
210 | lane3 = new ArrayList<>();
211 | }
212 |
213 | @Override
214 | protected float getEnemyOrigin() {
215 | return screenRadius*3.f;
216 | }
217 |
218 | @Override
219 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
220 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
221 |
222 | screenRadius = MeasureSpec.getSize(heightMeasureSpec)/2;
223 | maneuverDistance = MeasureSpec.getSize(heightMeasureSpec)/3;
224 | startX = screenRadius*.3f;
225 | currentX = -shipLength;
226 | currentY = getMeasuredHeight()/2;
227 | int marginLeft = (int) ((getMeasuredWidth() - levelCompletionDiameter)/2);
228 | int marginTop = (int) (getMeasuredHeight()/8 - levelCompletionDiameter/2);
229 |
230 | levelCompletionRect.set(marginLeft, marginTop, marginLeft + levelCompletionDiameter,
231 | marginTop + levelCompletionDiameter);
232 | }
233 |
234 |
235 | @Override
236 | protected void onDraw(Canvas canvas) {
237 | super.onDraw(canvas);
238 | synchronized (enemyLock) {
239 |
240 | transMatrix.reset();
241 | rotMatrix.reset();
242 |
243 | transMatrix.setTranslate(currentX + maneuverX, currentY + maneuverY - shipHeight / 2);
244 | rotMatrix.setRotate(rotAngle + radiusAngle, currentX + maneuverX + shipLength / 2, currentY + maneuverY);
245 | transMatrix.postConcat(rotMatrix);
246 |
247 | shadowMatrix.reset();
248 | shadowRotMatrix.reset();
249 |
250 | shadowMatrix.setTranslate(currentX + maneuverX - shipBlurRadius, currentY + maneuverY - shipHeight * .4f);
251 | shadowRotMatrix.setRotate(rotAngle + radiusAngle, shipShadow.getWidth() / 2, shipShadow.getHeight() / 2);
252 | shadowMatrix.preConcat(shadowRotMatrix);
253 |
254 | if (shipBitmap != null && !dead) {
255 |
256 | drawBullets(canvas);
257 | if (invulnerabilityTicker > 10 && invulnerabilityTicker < 20 ||
258 | invulnerabilityTicker > 30 && invulnerabilityTicker < 40 ||
259 | invulnerabilityTicker > 50 && invulnerabilityTicker < 60 ||
260 | invulnerabilityTicker > 70 && invulnerabilityTicker < 80 ||
261 | invulnerabilityTicker > 90 && invulnerabilityTicker < 100 ||
262 | invulnerabilityTicker > 110 && invulnerabilityTicker < 120) {
263 | drawBooster(canvas);
264 | canvas.drawBitmap(shipShadow, shadowMatrix, null);
265 | canvas.drawBitmap(shipBitmap, transMatrix, null);
266 | } else if (invulnerabilityTicker == 0){
267 | canvas.drawBitmap(shipShadow, shadowMatrix, null);
268 | drawBooster(canvas);
269 | canvas.drawBitmap(shipBitmap, transMatrix, null);
270 | }
271 | }
272 |
273 | shipRect.set(0, 0, shipLength*3/4, shipHeight);
274 | muzzleRect.set(shipLength * 3 / 4, 0, shipLength, shipHeight);
275 | transMatrix.mapRect(shipRect);
276 | transMatrix.mapRect(muzzleRect);
277 | drawExplosions(canvas);
278 | drawLevelTitleTransition(canvas);
279 | drawTitle(canvas);
280 |
281 | drawEnemies(canvas);
282 | if (gameController.getGameState() != GameController.TITLE) {
283 | drawProgressScoreAndLives(canvas);
284 | }
285 | drawCombo(canvas);
286 | }
287 | }
288 |
289 | private void drawExplosions(Canvas canvas) {
290 | for (ExplosionData data : explosions) {
291 | explosionPaint.setColor(data.color);
292 | explosionPaint.setAlpha(data.alpha);
293 | canvas.drawCircle(data.x, data.y, data.radius, explosionPaint);
294 | }
295 | }
296 |
297 | @Override
298 | public void handleEnemyCollision(EnemyData enemy) {
299 |
300 | if (Math.abs(enemy.x - (shipRect.centerX())) <= enemyRadius &&
301 | Math.abs(enemy.y - (shipRect.centerY())) <= enemyRadius && !dead && invulnerabilityTicker == 0) {
302 |
303 | addExplosion(shipRect.centerX(), shipRect.centerY(),
304 | getResources().getColor(R.color.ship_color));
305 | gameController.decrementRemainingLives();
306 | dead = true;
307 | gameController.recordDeath();
308 | invulnerabilityTicker = 120;
309 | paint.setAlpha(0);
310 | shouldNotFire = true;
311 | }
312 | }
313 |
314 | private void drawBooster(Canvas canvas) {
315 | boosterPath.reset();
316 |
317 | boosterPath.moveTo(0, 0);
318 | boosterPath.lineTo(0, boosterHeight);
319 | boosterPath.lineTo(-boosterLength + boosterPointX, boosterHeight/2 + boosterPointY);
320 |
321 | boosterPath.close();
322 | boosterTransMat.setTranslate(currentX + maneuverX, currentY + maneuverY - boosterHeight*5/8);
323 |
324 | boosterRotMat.setRotate(rotAngle + radiusAngle, shipLength / 2, boosterHeight/2);
325 | boosterTransMat.preConcat(boosterRotMat);
326 | boosterPath.transform(boosterTransMat);
327 | canvas.drawPath(boosterPath, boosterPaint);
328 |
329 | boosterPathSmall.reset();
330 |
331 | boosterPathSmall.moveTo(0, 0);
332 | boosterPathSmall.lineTo(0,boosterHeight*0.75f);
333 | boosterPathSmall.lineTo(-boosterLength*0.75f + boosterPointSmallX, boosterHeight*0.375f + boosterPointSmallY);
334 |
335 | boosterPathSmall.close();
336 | boosterTransMatSmall.setTranslate(currentX + maneuverX, currentY + maneuverY - (boosterHeight*0.75f)/4);
337 |
338 | boosterRotMatSmall.setRotate(rotAngle + radiusAngle, shipLength/2, boosterHeight*0.375f);
339 | boosterTransMatSmall.preConcat(boosterRotMatSmall);
340 | boosterPathSmall.transform(boosterTransMatSmall);
341 | canvas.drawPath(boosterPathSmall, boosterPaintSmall);
342 | }
343 |
344 |
345 | @Override
346 | public boolean onTouchEvent(MotionEvent event) {
347 |
348 | synchronized (enemyLock) {
349 | if (gameController.getGameState() == GameController.TRANSITIONING_TO_NEXT_LEVEL) {
350 | return false;
351 | }
352 | switch (event.getActionMasked()) {
353 | case MotionEvent.ACTION_POINTER_DOWN:
354 | postDelayed(quitRunnable, 500);
355 | break;
356 | case MotionEvent.ACTION_DOWN:
357 |
358 | lastY = downY = event.getY();
359 | lastX = downX = event.getX();
360 | downTime = event.getDownTime();
361 | removeCallbacks(quitRunnable);
362 | return true;
363 |
364 | case MotionEvent.ACTION_MOVE:
365 | if (gameController.getGameState() == GameController.PLAYING) {
366 | deltaY = event.getY() - lastY;
367 | deltaX = event.getX() - lastX;
368 | downDeltaY = event.getY() - downY;
369 | downDeltaX = event.getX() - downX;
370 | lastX = event.getX();
371 | lastY = event.getY();
372 |
373 | radiusAngle = MathUtil.lerp(radiusAngle, MathUtil.toDegrees(Math.asin((screenRadius - (currentY + deltaY)) / (screenRadius * 3.f))), 0.9f);
374 | radiusAngle = Math.min(11, Math.max(radiusAngle, -11));
375 |
376 | currentY = (float) (screenRadius * 3.f * -Math.sin(MathUtil.toRadians(radiusAngle))) + screenRadius;
377 | maneuverY = (float) (currentManeuverDist * Math.sin(Math.toRadians(radiusAngle)));
378 | maneuverX = (float) (currentManeuverDist * Math.cos(Math.toRadians(radiusAngle)));
379 | currentX = (float) ((screenRadius * -Math.cos(MathUtil.toRadians(radiusAngle))) + 1.3f * screenRadius);
380 | transMatrix.reset();
381 |
382 | if (Math.abs(deltaY) >= touchSlop) {
383 | lastDirection = deltaY > 0 ? BACKWARD : deltaY < 0 ? FORWARD : NEUTRAL;
384 |
385 | }
386 | if (event.getPointerCount() == 1) {
387 | removeCallbacks(quitRunnable);
388 | }
389 | }
390 | break;
391 | case MotionEvent.ACTION_CANCEL:
392 | removeCallbacks(quitRunnable);
393 | break;
394 | case MotionEvent.ACTION_POINTER_UP:
395 | removeCallbacks(quitRunnable);
396 | break;
397 | case MotionEvent.ACTION_UP:
398 |
399 | deltaX = event.getX() - lastX;
400 | deltaY = event.getY() - lastY;
401 | lastX = event.getX();
402 | lastY = event.getY();
403 | if (Math.abs(deltaY) >= touchSlop) {
404 | lastDirection = deltaY > 0 ? BACKWARD : deltaY < 0 ? FORWARD : NEUTRAL;
405 | }
406 |
407 | if (Math.abs(deltaY) < touchSlop && event.getEventTime() - downTime < 250) {
408 | switch (gameController.getGameState()) {
409 | case GameController.PLAYING:
410 | if (!dead) {
411 | startManeuver();
412 | }
413 | break;
414 | case GameController.TITLE:
415 | startGameTitleTransition();
416 | break;
417 |
418 | case GameController.END_STATS:
419 | startStatsFadeOutTransition();
420 | break;
421 | }
422 | }
423 | removeCallbacks(quitRunnable);
424 | break;
425 | }
426 | }
427 | return super.onTouchEvent(event);
428 | }
429 |
430 | public void startManeuver() {
431 | if (isManeuvering) {
432 | return;
433 | } else {
434 | maneuver = ValueAnimator.ofFloat(0, maneuverDistance);
435 | maneuver.setDuration(500);
436 | maneuver.setInterpolator(new DecelerateInterpolator());
437 | maneuver.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
438 | @Override
439 | public void onAnimationUpdate(ValueAnimator animation) {
440 | synchronized (enemyLock) {
441 | currentManeuverDist = (float) animation.getAnimatedValue();
442 | maneuverX = (float) (currentManeuverDist * Math.cos(Math.toRadians(radiusAngle)));
443 | maneuverY = (float) (currentManeuverDist * Math.sin(Math.toRadians(radiusAngle)));
444 | boosterLerpRateX = Math.min(LERP_RATE_MAX, boosterLerpRateX +.1f);
445 | boosterLerpRateSmallX = Math.min(LERP_RATE_MAX, boosterLerpRateSmallX +.1f);
446 |
447 | if (animation.getAnimatedFraction() > 0.65f) {
448 | int sign = 1;
449 | switch (maneuverDirection) {
450 | case FORWARD:
451 | sign = -1;
452 | break;
453 |
454 | case NEUTRAL:
455 | case BACKWARD:
456 |
457 | break;
458 | }
459 |
460 | rotAngle = sign * 180.f * Math.min(1.f, (animation.getAnimatedFraction() - 0.65f) / 0.25f);
461 | } else {
462 | maneuverDirection = lastDirection;
463 | }
464 | }
465 | }
466 | });
467 |
468 | maneuver.addListener(new Animator.AnimatorListener() {
469 | @Override
470 | public void onAnimationStart(Animator animation) {
471 |
472 | synchronized (enemyLock) {
473 | isManeuvering = true;
474 | boosterLerpRateX = 0.5f;
475 | shouldNotFire = true;
476 | }
477 |
478 | //stop bullets
479 | }
480 |
481 | @Override
482 | public void onAnimationEnd(Animator animation) {
483 | //rotate tank homie 180º
484 | //shoot like 4 or 5 and then maneuver back
485 | synchronized (enemyLock) {
486 | shouldNotFire = false;
487 | shouldFireBackwards = true;
488 | bulletIntervalTicker = 0;
489 | }
490 | boosterPaint.setAlpha(0);
491 | boosterPaintSmall.setAlpha(0);
492 | postDelayed(new Runnable() {
493 | @Override
494 | public void run() {
495 | endManeuver();
496 | }
497 | }, 600);
498 | boosterPointX = 0;
499 | }
500 |
501 | @Override
502 | public void onAnimationCancel(Animator animation) {
503 | //do nothing
504 | }
505 |
506 | @Override
507 | public void onAnimationRepeat(Animator animation) {
508 | //do nothing
509 | }
510 | });
511 | maneuver.start();
512 | }
513 | }
514 |
515 |
516 | public void endManeuver() {
517 | maneuverBack = ValueAnimator.ofFloat(maneuverDistance, 0);
518 | maneuverBack.setDuration(600);
519 | maneuverBack.setInterpolator(new AccelerateInterpolator());
520 | maneuverBack.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
521 | @Override
522 | public void onAnimationUpdate(ValueAnimator animation) {
523 | synchronized (enemyLock) {
524 | currentManeuverDist = (float) animation.getAnimatedValue();
525 | maneuverX = (float) (currentManeuverDist * Math.cos(Math.toRadians(radiusAngle)));
526 | maneuverY = (float) (currentManeuverDist * Math.sin(Math.toRadians(radiusAngle)));
527 |
528 | boosterLerpRateX = Math.min(LERP_RATE_MAX, boosterLerpRateX +.1f);
529 | boosterLerpRateSmallX = Math.min(LERP_RATE_MAX, boosterLerpRateSmallX +.1f);
530 |
531 |
532 | int sign = 1;
533 | switch (maneuverDirection) {
534 | case FORWARD:
535 | sign = -1;
536 | break;
537 |
538 | case NEUTRAL:
539 | case BACKWARD:
540 |
541 | break;
542 | }
543 | if (animation.getAnimatedFraction() > 0.125f) {
544 | shouldNotFire = true;
545 | }
546 | if (animation.getAnimatedFraction() > 0.75f) {
547 | rotAngle = 180.f + sign * 180.f * (animation.getAnimatedFraction() - 0.75f) / 0.25f;
548 | }
549 | }
550 | }
551 | });
552 |
553 | maneuverBack.addListener(new Animator.AnimatorListener() {
554 | @Override
555 | public void onAnimationStart(Animator animation) {
556 | synchronized (enemyLock) {
557 | boosterPaint.setAlpha(255);
558 | boosterPaintSmall.setAlpha(255);
559 | boosterLerpRateX = 0.5f;
560 |
561 | }
562 | }
563 |
564 | @Override
565 | public void onAnimationEnd(Animator animation) {
566 | //start bullets again
567 | synchronized (enemyLock) {
568 | shouldNotFire = false;
569 | isManeuvering = false;
570 | shouldFireBackwards = false;
571 | boosterPointX = 10;
572 | boosterLerpRateX = LERP_RATE_DEFAULT;
573 | boosterLerpRateSmallX = LERP_RATE_DEFAULT;
574 | bulletIntervalTicker = 0;
575 |
576 | }
577 | }
578 |
579 | @Override
580 | public void onAnimationCancel(Animator animation) {
581 |
582 | }
583 |
584 | @Override
585 | public void onAnimationRepeat(Animator animation) {
586 | }
587 | });
588 | maneuverBack.start();
589 | }
590 | }
591 |
--------------------------------------------------------------------------------
/app/src/main/java/cordproject/lol/papercraft/util/MathUtil.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraft.util;
2 |
3 |
4 | public class MathUtil {
5 |
6 | public static float toRadians(float degrees) {
7 | return (float) ((degrees * Math.PI)/180);
8 | }
9 |
10 | public static float toDegrees(double radians) {
11 | return (float) ((radians * 180)/Math.PI);
12 | }
13 |
14 | public static float lerp(float a, float b, float pct) {
15 | return a + pct * (b - a);
16 | }
17 |
18 | public static long millisForSec(float seconds) {
19 | return (long)(1000 * seconds);
20 | }
21 |
22 | public static long framesForSec(float seconds) {
23 | return (long)(60 * seconds);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gucci.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/drawable/gucci.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/louis.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/drawable/louis.jpg
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
20 |
21 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gameplay_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/black1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/black1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/black2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/black2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/black3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/black3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/black4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/black4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/blue1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/blue1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/blue2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/blue2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/blue3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/blue3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/blue4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/blue4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/green1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/green1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/green2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/green2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/green3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/green3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/green4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/green4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/green5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/green5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_volume_off_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/ic_volume_off_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_volume_up_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/ic_volume_up_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/landingscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/landingscreen.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/orange1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/orange1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/orange2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/orange2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/orange3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/orange3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/orange4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/orange4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/orange5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/orange5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/pink1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/pink1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/pink2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/pink2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/pink3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/pink3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/pink4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/pink4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/pink5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/pink5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/purple1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/purple1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/purple2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/purple2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/purple3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/purple3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/purple4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/purple4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/purple5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/purple5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/yellow1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/yellow1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/yellow2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/yellow2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/yellow3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/yellow3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/yellow4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/yellow4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/yellow5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-hdpi/yellow5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/black1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/black1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/black2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/black2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/black3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/black3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/black4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/black4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/blue1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/blue1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/blue2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/blue2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/blue3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/blue3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/blue4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/blue4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/green1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/green1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/green2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/green2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/green3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/green3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/green4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/green4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/green5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/green5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_volume_off_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/ic_volume_off_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_volume_up_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/ic_volume_up_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/landingscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/landingscreen.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/orange1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/orange1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/orange2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/orange2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/orange3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/orange3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/orange4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/orange4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/orange5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/orange5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/pink1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/pink1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/pink2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/pink2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/pink3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/pink3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/pink4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/pink4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/pink5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/pink5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/purple1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/purple1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/purple2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/purple2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/purple3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/purple3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/purple4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/purple4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/purple5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/purple5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/yellow1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/yellow1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/yellow2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/yellow2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/yellow3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/yellow3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/yellow4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/yellow4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/yellow5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-mdpi/yellow5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/black1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/black1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/black2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/black2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/black3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/black3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/black4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/black4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/blue1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/blue1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/blue2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/blue2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/blue3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/blue3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/blue4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/blue4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/green1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/green1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/green2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/green2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/green3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/green3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/green4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/green4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/green5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/green5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_volume_off_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/ic_volume_off_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_volume_up_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/ic_volume_up_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/landingscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/landingscreen.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/orange1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/orange1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/orange2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/orange2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/orange3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/orange3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/orange4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/orange4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/orange5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/orange5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/pink1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/pink1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/pink2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/pink2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/pink3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/pink3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/pink4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/pink4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/pink5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/pink5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/purple1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/purple1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/purple2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/purple2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/purple3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/purple3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/purple4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/purple4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/purple5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/purple5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/yellow1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/yellow1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/yellow2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/yellow2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/yellow3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/yellow3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/yellow4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/yellow4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/yellow5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xhdpi/yellow5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/black1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/black1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/black2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/black2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/black3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/black3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/black4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/black4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/blue1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/blue1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/blue2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/blue2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/blue3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/blue3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/blue4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/blue4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/green1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/green1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/green2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/green2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/green3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/green3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/green4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/green4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/green5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/green5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_volume_off_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/ic_volume_off_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_volume_up_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/ic_volume_up_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/landingscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/landingscreen.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/orange1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/orange1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/orange2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/orange2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/orange3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/orange3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/orange4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/orange4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/orange5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/orange5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/pink1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/pink1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/pink2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/pink2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/pink3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/pink3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/pink4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/pink4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/pink5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/pink5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/purple1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/purple1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/purple2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/purple2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/purple3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/purple3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/purple4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/purple4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/purple5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/purple5.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/yellow1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/yellow1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/yellow2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/yellow2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/yellow3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/yellow3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/yellow4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/yellow4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/yellow5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/mipmap-xxhdpi/yellow5.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/boom1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/raw/boom1.mp3
--------------------------------------------------------------------------------
/app/src/main/res/raw/boom2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/raw/boom2.mp3
--------------------------------------------------------------------------------
/app/src/main/res/raw/boom4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/raw/boom4.mp3
--------------------------------------------------------------------------------
/app/src/main/res/raw/paper.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/app/src/main/res/raw/paper.mp3
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #252525
4 |
5 |
6 | #373737
7 | #474747
8 | #88252525
9 | #ff7ed6fd
10 | #88e1e1e1
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1dp
4 | 16dp
5 | 18dp
6 | 8dp
7 | 4dp
8 | 8dp
9 | 12sp
10 | 20sp
11 | 16sp
12 | 8dp
13 | 6dp
14 | 1dp
15 | 6dp
16 | 1dp
17 | 24dp
18 | 4sp
19 | 2sp
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PaperCraft
3 | Tap and hold with 2 fingers to quit…
4 | PAPERCRAFT_SHARED_PREFS
5 | Thanks for playing!\n\nMade by\n\nMatt\nJeff\nJJ\n\nat Cord Project Inc.
6 | Score: %1$s\nKills: %2$d\nDeaths: %3$d\nMax Combo: %4$d\nEscaped Enemies: %5$d
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/wear.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | generateDebugAndroidTestSources
19 | generateDebugSources
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | google()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.1.0'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | google()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Oct 08 13:02:33 CDT 2015
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.4-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 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/papercraft.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rudloff/PaperCraft/6639086799a331f4594f44f4dd2c17a89dba86f8/screenshot.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':shared'
2 |
--------------------------------------------------------------------------------
/shared/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/shared/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 23
5 |
6 | defaultConfig {
7 | minSdkVersion 15
8 | targetSdkVersion 23
9 | versionCode 1
10 | versionName "1.0"
11 | }
12 | buildTypes {
13 | release {
14 | minifyEnabled false
15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
16 | }
17 | }
18 | }
19 |
20 | dependencies {
21 | implementation fileTree(dir: 'libs', include: ['*.jar'])
22 | testImplementation 'junit:junit:4.12'
23 | implementation 'com.android.support:appcompat-v7:23.1.0'
24 | }
25 |
--------------------------------------------------------------------------------
/shared/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/matthewlim/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/shared/shared.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | generateDebugAndroidTestSources
19 | generateDebugSources
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/shared/src/androidTest/java/cordproject/lol/papercraftshared/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraftshared;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/shared/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/shared/src/main/java/cordproject/lol/papercraftshared/entity/AchievementData.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraftshared.entity;
2 |
3 | import android.content.res.Resources;
4 |
5 |
6 |
7 | import cordproject.lol.papercraftshared.util.AchievementsUtil;
8 | import cordproject.lol.papercraftshared.util.SharedConstants;
9 |
10 |
11 | public class AchievementData {
12 |
13 | public int achievementResId;
14 | public int descriptionResId;
15 | public String prefsKey;
16 | public int status = SharedConstants.NOT_ACHIEVED;
17 | public int type = SharedConstants.TYPE_SINGLE;
18 | public int value;
19 |
20 | public int combinedValue;
21 |
22 | public AchievementData(String prefsKey) {
23 | this.prefsKey = prefsKey;
24 | AchievementInfo info = AchievementsUtil.getResIdsForAchievement(prefsKey);
25 | descriptionResId = info.descriptionResId;
26 | achievementResId = info.achievementResId;
27 | type = info.type;
28 | setCombinedValue();
29 | }
30 |
31 | public AchievementData(String prefsKey, int combinedValue) {
32 | this(prefsKey);
33 | this.combinedValue = combinedValue;
34 | type = combinedValue & SharedConstants.TYPE_MASK;
35 | value = combinedValue & SharedConstants.VALUE_MASK;
36 | status = combinedValue & SharedConstants.STATUS_MASK;
37 | }
38 |
39 | public void setType(int type) {
40 | this.type = type;
41 | setCombinedValue();
42 | }
43 |
44 | public void setStatus(int status) {
45 | this.status = status;
46 | setCombinedValue();
47 | }
48 |
49 | public void updateStatus(int updateMask) {
50 | status |= updateMask;
51 | setCombinedValue();
52 | }
53 |
54 | public void incrementBy(int increment) {
55 | this.value += increment;
56 | setCombinedValue();
57 | }
58 |
59 | public void setValue(int value) {
60 | this.value = value;
61 | setCombinedValue();
62 | }
63 |
64 | public int getStatus() {
65 | return combinedValue & SharedConstants.STATUS_MASK;
66 | }
67 |
68 | public static int getStatus(int combinedValue) {
69 | return combinedValue & SharedConstants.STATUS_MASK;
70 | }
71 |
72 | public int getValue() {
73 | return combinedValue & SharedConstants.VALUE_MASK;
74 | }
75 |
76 | private void setCombinedValue() {
77 | combinedValue = type | status | value;
78 | }
79 |
80 | public int getCombinedValue() {
81 | return combinedValue;
82 | }
83 |
84 | public int getType() {
85 | return combinedValue & SharedConstants.TYPE_MASK;
86 | }
87 |
88 | public String toString(Resources res) {
89 | String formaString = "type: %s desc: %s status: %s val: %d";
90 | String type = getType() == SharedConstants.TYPE_INCREMENTAL ? "INCREMENTAL" : getType() == SharedConstants.TYPE_SINGLE ? "SINGLE" : null;
91 | String status = getStatus() == SharedConstants.ACHIEVED ? "ACHIEVED" : getStatus()== SharedConstants.NOT_ACHIEVED ? "NOT ACHIEVED" :
92 | getStatus() == SharedConstants.SENT_TO_SERVER ? "SENT TO SERVER" : null;
93 | int value = getValue();
94 | return String.format(formaString, type, res.getString(descriptionResId), status, value);
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/shared/src/main/java/cordproject/lol/papercraftshared/entity/AchievementInfo.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraftshared.entity;
2 |
3 |
4 | public class AchievementInfo {
5 | public int descriptionResId;
6 | public int achievementResId;
7 | public int type;
8 | public boolean alreadyAchieved;
9 | public boolean sentToBackend;
10 | public int maxValue = 0;
11 |
12 | public AchievementInfo(int descriptionResId, int achievementResId, int type) {
13 | this.descriptionResId = descriptionResId;
14 | this.achievementResId = achievementResId;
15 | this.type = type;
16 |
17 | }
18 |
19 | public AchievementInfo(int descriptionResId, int achievementResId, int type, int maxValue) {
20 | this.descriptionResId = descriptionResId;
21 | this.achievementResId = achievementResId;
22 | this.type = type;
23 | this.maxValue = maxValue;
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/shared/src/main/java/cordproject/lol/papercraftshared/graphics/PaperGen.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraftshared.graphics;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.BlurMaskFilter;
5 | import android.graphics.Canvas;
6 | import android.graphics.Color;
7 | import android.graphics.LinearGradient;
8 | import android.graphics.MaskFilter;
9 | import android.graphics.Matrix;
10 | import android.graphics.Paint;
11 | import android.graphics.Path;
12 | import android.graphics.PorterDuff;
13 | import android.graphics.PorterDuffXfermode;
14 | import android.graphics.Rect;
15 | import android.graphics.RectF;
16 | import android.graphics.Shader;
17 |
18 | public class PaperGen {
19 |
20 |
21 | public static Bitmap makeEnemyC(Bitmap textureBitmap, float enemyRadius, float blurRadius) {
22 | Path enemyPath = new Path();
23 | enemyPath.addCircle(enemyRadius, enemyRadius, enemyRadius, Path.Direction.CW);
24 | enemyPath.close();
25 |
26 | return makeEnemyShape(enemyPath, textureBitmap, enemyRadius, blurRadius);
27 | }
28 |
29 | public static Bitmap makeEnemyCAlert(float enemyRadius, int alertColor) {
30 | Path enemyPath = new Path();
31 | enemyPath.addCircle(enemyRadius, enemyRadius, enemyRadius, Path.Direction.CW);
32 | enemyPath.close();
33 |
34 | return makeEnemyShapeAlert(enemyPath, enemyRadius, alertColor);
35 | }
36 |
37 | public static Bitmap makeEnemyP(Bitmap textureBitmap, float enemyRadius, float blurRadius) {
38 | Path enemyPath = new Path();
39 |
40 | enemyPath.moveTo(enemyRadius, 0);
41 | enemyPath.lineTo((float) (enemyRadius + enemyRadius * Math.cos(Math.toRadians(18.f))),
42 | enemyRadius - (float) (enemyRadius * Math.sin(Math.toRadians(18.f))));
43 | enemyPath.lineTo((float) (enemyRadius + enemyRadius * Math.sin(Math.toRadians(36.f))),
44 | enemyRadius + (float) (enemyRadius * Math.cos(Math.toRadians(36.f))));
45 | enemyPath.lineTo((float) (enemyRadius - enemyRadius * Math.sin(Math.toRadians(36.f))),
46 | enemyRadius + (float) (enemyRadius * Math.cos(Math.toRadians(36.f))));
47 | enemyPath.lineTo((float) (enemyRadius - enemyRadius * Math.cos(Math.toRadians(18.f))),
48 | enemyRadius - (float) (enemyRadius * Math.sin(Math.toRadians(18.f))));
49 | enemyPath.close();
50 |
51 | return makeEnemyShape(enemyPath, textureBitmap, enemyRadius, blurRadius);
52 | }
53 |
54 | public static Bitmap makeEnemyPAlert(float enemyRadius, int alertColor) {
55 | Path enemyPath = new Path();
56 |
57 | enemyPath.moveTo(enemyRadius, 0);
58 | enemyPath.lineTo((float) (enemyRadius + enemyRadius * Math.cos(Math.toRadians(18.f))),
59 | enemyRadius - (float) (enemyRadius * Math.sin(Math.toRadians(18.f))));
60 | enemyPath.lineTo((float) (enemyRadius + enemyRadius * Math.sin(Math.toRadians(36.f))),
61 | enemyRadius + (float) (enemyRadius * Math.cos(Math.toRadians(36.f))));
62 | enemyPath.lineTo((float) (enemyRadius - enemyRadius * Math.sin(Math.toRadians(36.f))),
63 | enemyRadius + (float) (enemyRadius * Math.cos(Math.toRadians(36.f))));
64 | enemyPath.lineTo((float) (enemyRadius - enemyRadius * Math.cos(Math.toRadians(18.f))),
65 | enemyRadius - (float) (enemyRadius * Math.sin(Math.toRadians(18.f))));
66 | enemyPath.close();
67 |
68 | return makeEnemyShapeAlert(enemyPath, enemyRadius, alertColor);
69 | }
70 |
71 | public static Bitmap makeEnemyD(Bitmap textureBitmap, float enemyRadius, float blurRadius) {
72 | Path enemyPath = new Path();
73 | // top
74 | enemyPath.moveTo(enemyRadius, 0);
75 | enemyPath.lineTo(enemyRadius * 2, enemyRadius);
76 | enemyPath.lineTo(enemyRadius, enemyRadius * 2);
77 | enemyPath.lineTo(0, enemyRadius);
78 | enemyPath.close();
79 |
80 | return makeEnemyShape(enemyPath, textureBitmap, enemyRadius, blurRadius);
81 | }
82 |
83 | public static Bitmap makeEnemyShape(Path path, Bitmap textureBitmap, float enemyRadius, float blurRadius) {
84 | Bitmap enemyBitmap = Bitmap.createBitmap((int) (enemyRadius * 2f), (int) (enemyRadius * 2f),
85 | Bitmap.Config.ARGB_8888);
86 |
87 | Canvas canvas = new Canvas(enemyBitmap);
88 | canvas.drawColor(Color.TRANSPARENT);
89 | int layer = canvas.saveLayer(0, 0, canvas.getWidth(), canvas.getHeight(), null,
90 | Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.FULL_COLOR_LAYER_SAVE_FLAG);
91 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
92 | paint.setStyle(Paint.Style.FILL_AND_STROKE);
93 | paint.setARGB(255, 255, 255, 255);
94 |
95 | canvas.drawPath(path, paint);
96 | Paint bitmapPaint = new Paint();
97 | bitmapPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
98 |
99 | int cropX = (int) Math.round(Math.random()*textureBitmap.getWidth()/2);
100 | int cropY = (int) Math.round(Math.random() * textureBitmap.getHeight() / 2);
101 | canvas.drawBitmap(textureBitmap, new Rect(cropX, cropY, (int) (cropX + enemyRadius * 2),
102 | (int) (cropY + enemyRadius * 2)),
103 | new Rect(0, 0, (int) (enemyRadius * 2), (int) (enemyRadius * 2)), bitmapPaint);
104 | canvas.restoreToCount(layer);
105 |
106 | Bitmap shadow = makeShadow(path, enemyRadius * 2, enemyRadius * 2, blurRadius);
107 |
108 | return makeComposite(enemyBitmap, shadow, blurRadius);
109 |
110 | }
111 |
112 | public static Bitmap makeEnemyShapeAlert(Path path, float enemyRadius, int alertColor) {
113 |
114 | Bitmap enemyBitmap = Bitmap.createBitmap((int) (enemyRadius * 2f), (int) (enemyRadius * 2f),
115 | Bitmap.Config.ARGB_8888);
116 | Canvas canvas = new Canvas(enemyBitmap);
117 |
118 | int layer = canvas.saveLayer(0, 0, canvas.getWidth(), canvas.getHeight(), null,
119 | Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.FULL_COLOR_LAYER_SAVE_FLAG);
120 |
121 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
122 | paint.setStyle(Paint.Style.FILL_AND_STROKE);
123 | paint.setARGB(255, 255, 255, 255);
124 |
125 | canvas.drawPath(path, paint);
126 | Paint bitmapPaint = new Paint();
127 | bitmapPaint.setColor(alertColor);
128 | bitmapPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
129 |
130 | canvas.drawRect(0, 0, enemyBitmap.getWidth(), enemyBitmap.getHeight(), bitmapPaint);
131 | canvas.restoreToCount(layer);
132 |
133 | return enemyBitmap;
134 | }
135 |
136 | public static Bitmap makeEnemyDAlert(float enemyRadius, int alertColor) {
137 | Path enemyPath = new Path();
138 | // top
139 | enemyPath.moveTo(enemyRadius, 0);
140 | enemyPath.lineTo(enemyRadius * 2, enemyRadius);
141 | enemyPath.lineTo(enemyRadius, enemyRadius * 2);
142 | enemyPath.lineTo(0, enemyRadius);
143 | enemyPath.close();
144 |
145 | return makeEnemyShapeAlert(enemyPath, enemyRadius, alertColor);
146 | }
147 |
148 | public static Bitmap createScrollingSectionBitmap(int mainColor, int shadowColor,
149 | int sectionWidth, int screenHeight,
150 | int screenWidth) {
151 | Bitmap background = Bitmap.createBitmap(sectionWidth, (int) (screenHeight * 1.75f),
152 | Bitmap.Config.ARGB_8888);
153 |
154 | Canvas canvas = new Canvas(background);
155 | int blurRadius = (int) (screenWidth*.025f);
156 |
157 | Paint backgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
158 | backgroundPaint.setColor(mainColor);
159 | canvas.drawRect(blurRadius, 0, background.getWidth() - blurRadius,
160 | background.getHeight(), backgroundPaint);
161 |
162 | LinearGradient gradient = new LinearGradient(blurRadius, 0, 0, 0,
163 | new int[]{shadowColor, Color.TRANSPARENT},
164 | new float[]{0, 1.f}, Shader.TileMode.CLAMP);
165 |
166 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
167 | paint.setStyle(Paint.Style.FILL_AND_STROKE);
168 | paint.setShader(gradient);
169 | canvas.drawRect(0, 0, blurRadius, background.getHeight(), paint);
170 |
171 | LinearGradient backGradient = new LinearGradient(background.getWidth()-blurRadius, 0,
172 | background.getWidth(), 0, new int[]{shadowColor, Color.TRANSPARENT},
173 | new float[]{0, 1.f}, Shader.TileMode.CLAMP);
174 |
175 | Paint backShadowPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
176 | backShadowPaint.setStyle(Paint.Style.FILL_AND_STROKE);
177 | backShadowPaint.setShader(backGradient);
178 |
179 |
180 | canvas.drawRect(background.getWidth() - blurRadius, 0, background.getWidth(),
181 | background.getHeight(), backShadowPaint);
182 | return background;
183 | }
184 |
185 | public static Bitmap makeShadow(Path inputPath, float length, float height, float blurRadius) {
186 | Bitmap enemyBitmap = Bitmap.createBitmap((int) (length + blurRadius * 2),
187 | (int) (height + blurRadius * 2), Bitmap.Config.ARGB_8888);
188 | Canvas canvas = new Canvas(enemyBitmap);
189 |
190 | Path shadowPath = inputPath;
191 |
192 | Matrix scaleMatrix = new Matrix();
193 | scaleMatrix.setScale(.96f, .96f);
194 | Matrix transMatrix = new Matrix();
195 | transMatrix.setTranslate(blurRadius, blurRadius);
196 | scaleMatrix.preConcat(transMatrix);
197 | shadowPath.transform(scaleMatrix);
198 |
199 | MaskFilter filter = new BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.NORMAL);
200 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
201 | paint.setStyle(Paint.Style.FILL_AND_STROKE);
202 | paint.setColor(0x88252525);
203 | paint.setMaskFilter(filter);
204 |
205 | canvas.drawPath(shadowPath, paint);
206 | return enemyBitmap;
207 | }
208 |
209 | public static Bitmap makeComposite(Bitmap bitmap, Bitmap shadowBitmap, float blurRadius) {
210 |
211 | Canvas canvas = new Canvas(shadowBitmap);
212 | canvas.drawBitmap(bitmap, blurRadius, 0, null);
213 | return shadowBitmap;
214 | }
215 |
216 | public static Bitmap makeBulletBitmap(int strokeWidth, int bulletLength, RectF bulletRect,
217 | float blurRadius) {
218 |
219 | Bitmap bulletBitmap = Bitmap.createBitmap(bulletLength, strokeWidth, Bitmap.Config.ARGB_8888);
220 | Canvas canvas = new Canvas(bulletBitmap);
221 | Path bulletPath = new Path();
222 | bulletPath.moveTo(0, strokeWidth / 2);
223 | bulletPath.lineTo(bulletBitmap.getWidth(), strokeWidth / 2);
224 | bulletPath.close();
225 |
226 | Paint bulletPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
227 | bulletPaint.setColor(Color.WHITE);
228 | bulletPaint.setStyle(Paint.Style.STROKE);
229 |
230 | bulletPaint.setStrokeWidth(strokeWidth);
231 |
232 | bulletPath.computeBounds(bulletRect, true);
233 | Bitmap bulletShadowBitmap = makeShadowForLine(bulletPath, bulletLength, strokeWidth, blurRadius);
234 | canvas.drawPath(bulletPath, bulletPaint);
235 | return makeComposite(bulletBitmap, bulletShadowBitmap, blurRadius);
236 |
237 | }
238 |
239 | public static Bitmap makeShadowForLine(Path inputPath, float length, float height, float blurRadius) {
240 | Bitmap enemyBitmap = Bitmap.createBitmap((int) (length + blurRadius * 2), (int) (height + blurRadius * 2), Bitmap.Config.ARGB_8888);
241 | Canvas canvas = new Canvas(enemyBitmap);
242 |
243 | Matrix scaleMatrix = new Matrix();
244 | scaleMatrix.setScale(1.2f, 1.2f);
245 | Path shadowPath = new Path(inputPath);
246 | shadowPath.transform(scaleMatrix);
247 |
248 | MaskFilter filter = new BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.NORMAL);
249 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
250 | paint.setStyle(Paint.Style.STROKE);
251 | paint.setColor(0x88252525);
252 | paint.setMaskFilter(filter);
253 |
254 | canvas.drawPath(shadowPath, paint);
255 | return enemyBitmap;
256 | }
257 |
258 | public static Bitmap makeShieldBitmap(float enemyRadius, int strokeWidth, float blurRadius) {
259 | Bitmap shieldBitmap = Bitmap.createBitmap((int) (enemyRadius * 4), (int) (enemyRadius * 4), Bitmap.Config.ARGB_8888);
260 | Canvas canvas = new Canvas(shieldBitmap);
261 |
262 | Paint shieldPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
263 | shieldPaint.setColor(Color.WHITE);
264 | shieldPaint.setStyle(Paint.Style.STROKE);
265 | shieldPaint.setStrokeWidth(strokeWidth);
266 | Path path = new Path();
267 | path.addArc(new RectF(enemyRadius * 0.25f, enemyRadius * 0.25f, enemyRadius * 3.75f, enemyRadius * 3.75f), 140, 80);
268 | canvas.drawPath(path, shieldPaint);
269 |
270 | Bitmap shieldShadow = makeShadow(path, enemyRadius*4, enemyRadius*4, blurRadius);
271 |
272 | return makeComposite(shieldBitmap, shieldShadow, blurRadius);
273 | }
274 |
275 | public static Bitmap makeShipBitmap(Path shipPath, Bitmap shipTexture, float shipLength, float shipHeight) {
276 | Bitmap shipBitmap = Bitmap.createBitmap((int) shipLength, (int) shipHeight, Bitmap.Config.ARGB_8888);
277 | Canvas canvas = new Canvas(shipBitmap);
278 |
279 | int layer = canvas.saveLayer(0, 0, canvas.getWidth(), canvas.getHeight(), null,
280 | Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.FULL_COLOR_LAYER_SAVE_FLAG);
281 |
282 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
283 | paint.setStyle(Paint.Style.FILL_AND_STROKE);
284 | paint.setARGB(255, 255, 255, 255);
285 |
286 | canvas.drawPath(shipPath, paint);
287 |
288 | Paint bitmapPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
289 | bitmapPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
290 | int cropX = Math.round(shipTexture.getWidth()/4);
291 | int cropY = Math.round(shipTexture.getHeight()/4);
292 | canvas.drawBitmap(shipTexture, new Rect(cropX, cropY, (int) (cropX + shipLength), (int) (cropY + shipHeight)), new Rect(0, 0,
293 | (int) shipLength, (int) shipHeight), bitmapPaint);
294 | canvas.restoreToCount(layer);
295 |
296 | return shipBitmap;
297 | }
298 |
299 |
300 |
301 | }
302 |
--------------------------------------------------------------------------------
/shared/src/main/java/cordproject/lol/papercraftshared/util/AchievementsUtil.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraftshared.util;
2 |
3 | import android.content.SharedPreferences;
4 |
5 | import java.util.HashMap;
6 |
7 | import cordproject.lol.papercraftshared.R;
8 | import cordproject.lol.papercraftshared.entity.AchievementData;
9 | import cordproject.lol.papercraftshared.entity.AchievementInfo;
10 |
11 | public class AchievementsUtil {
12 |
13 | private static HashMap achievementsMap = new HashMap();
14 |
15 | static {
16 | achievementsMap.put(SharedConstants.ACH_ONE_HUNDRED, new AchievementInfo(R.string.ach_one_hundred,
17 | R.string.ach_id_one_hundred, SharedConstants.TYPE_INCREMENTAL, 100));
18 | achievementsMap.put(SharedConstants.ACH_ONE_THOUSAND, new AchievementInfo(R.string.ach_one_thousand,
19 | R.string.ach_id_one_thousand, SharedConstants.TYPE_INCREMENTAL, 1000));
20 | achievementsMap.put(SharedConstants.ACH_TEN_THOUSAND, new AchievementInfo(R.string.ach_ten_thousand,
21 | R.string.ach_id_ten_thousand, SharedConstants.TYPE_INCREMENTAL, 10000));
22 |
23 | achievementsMap.put(SharedConstants.ACH_PACIFIST, new AchievementInfo(R.string.ach_pacifist,
24 | R.string.ach_id_pacifist, SharedConstants.TYPE_SINGLE));
25 | achievementsMap.put(SharedConstants.ACH_BACK_STABBER, new AchievementInfo(R.string.ach_back_stabber,
26 | R.string.ach_id_back_stabber, SharedConstants.TYPE_SINGLE));
27 | achievementsMap.put(SharedConstants.ACH_FIN, new AchievementInfo(R.string.ach_fin, R.string.ach_id_fin,
28 | SharedConstants.TYPE_SINGLE));
29 |
30 | achievementsMap.put(SharedConstants.ACH_SITTING_DUCK, new AchievementInfo(R.string.ach_sitting_duck,
31 | R.string.ach_id_sitting_duck, SharedConstants.TYPE_SINGLE));
32 | achievementsMap.put(SharedConstants.ACH_BAD_PILOT, new AchievementInfo(R.string.ach_bad_pilot,
33 | R.string.ach_id_bad_pilot, SharedConstants.TYPE_INCREMENTAL, 100));
34 | achievementsMap.put(SharedConstants.ACH_CUATRO, new AchievementInfo(R.string.ach_cuatro,
35 | R.string.ach_id_cuatro, SharedConstants.TYPE_SINGLE));
36 |
37 | achievementsMap.put(SharedConstants.ACH_OCHO, new AchievementInfo(R.string.ach_ocho,
38 | R.string.ach_id_ocho, SharedConstants.TYPE_SINGLE));
39 | achievementsMap.put(SharedConstants.ACH_RE_OCHO, new AchievementInfo(R.string.ach_re_ocho,
40 | R.string.ach_id_re_ocho, SharedConstants.TYPE_SINGLE));
41 |
42 | achievementsMap.put(SharedConstants.ACH_PRETTY_AWESOME_MAN, new AchievementInfo(R.string.ach_pretty_awesome,
43 | R.string.ach_id_pretty_awesome, SharedConstants.TYPE_SINGLE));
44 | }
45 |
46 | public static AchievementInfo getResIdsForAchievement(String key) {
47 | return achievementsMap.get(key);
48 | }
49 |
50 | public static void markAchievementsAchieved(SharedPreferences prefs) {
51 | for (String key : achievementsMap.keySet()) {
52 | if(prefs.contains(key)) {
53 | int combinedValue = prefs.getInt(key, -1);
54 | if (AchievementData.getStatus(combinedValue) >= SharedConstants.ACHIEVED) {
55 | achievementsMap.get(key).alreadyAchieved = true;
56 | }
57 | }
58 | }
59 | }
60 |
61 | public static void recordAchievementProgress(SharedPreferences prefs, HashMap currentAchievements) {
62 | SharedPreferences.Editor editor = prefs.edit();
63 | for (String key : currentAchievements.keySet()) {
64 | editor.putInt(key, currentAchievements.get(key).combinedValue);
65 | }
66 | editor.apply();
67 | }
68 |
69 | public static void unpackInProgressAchievements(SharedPreferences prefs, HashMap currentAchievements) {
70 |
71 | for (String key : achievementsMap.keySet()) {
72 | if (prefs.contains(key)){
73 | AchievementData data = new AchievementData(key, prefs.getInt(key, SharedConstants.NOT_ACHIEVED));
74 |
75 | if (data.getStatus() >= SharedConstants.ACHIEVED){
76 | achievementsMap.get(key).alreadyAchieved = true;
77 |
78 | }
79 | if (data.getStatus() == SharedConstants.SENT_TO_SERVER) {
80 | achievementsMap.get(key).sentToBackend = true;
81 | } else {
82 | currentAchievements.put(key, data);
83 | }
84 | }
85 | }
86 | }
87 |
88 | public static boolean reachedMaxValue(String key, int value) {
89 | return value >= achievementsMap.get(key).maxValue;
90 | }
91 |
92 | public static void markAchievementAchieved(String key) {
93 | achievementsMap.get(key).alreadyAchieved = true;
94 | }
95 |
96 | public static void markAchievementSentToServer(String key) {
97 | achievementsMap.get(key).sentToBackend = true;
98 | }
99 |
100 | public static boolean achievementAlreadyAchieved(String key) {
101 | return achievementsMap.get(key).alreadyAchieved;
102 | }
103 |
104 | public static boolean achievementSentToServer(String key) {
105 | return achievementsMap.get(key).sentToBackend;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/shared/src/main/java/cordproject/lol/papercraftshared/util/SharedConstants.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraftshared.util;
2 |
3 | public class SharedConstants {
4 | public static final String PREFS_NAME = "prefs_name";
5 | public static final String KEY_HIGH_SCORE = "high_score";
6 | public static final String KEY_SOUND_PREFERENCE = "sound_preference";
7 | public static final String KEY_GPG_SIGNED_OUT = "gpg_signed_out";
8 |
9 | // achievements
10 |
11 | public static final String ACH_ONE_HUNDRED = "ach_one_hundred";
12 | public static final String ACH_ONE_THOUSAND = "ach_one_thousand";
13 | public static final String ACH_TEN_THOUSAND = "ach_ten_thousand";
14 |
15 | public static final String ACH_PACIFIST = "ach_pacifist";
16 | public static final String ACH_BACK_STABBER = "ach_back_stabber";
17 | public static final String ACH_FIN = "ach_fin";
18 | public static final String ACH_SITTING_DUCK = "ach_sitting_duck";
19 | public static final String ACH_BAD_PILOT = "ach_bad_pilot";
20 |
21 | public static final String ACH_CUATRO = "ach_cuatro";
22 | public static final String ACH_RE_OCHO = "ach_re_ocho";
23 | public static final String ACH_OCHO = "ach_ocho";
24 | public static final String ACH_PRETTY_AWESOME_MAN = "ach_pretty_awesome_man";
25 |
26 | public static final int STATUS_MASK = 0x00FF_0000;
27 | public static final int NOT_ACHIEVED = 0x0000_0000;
28 | public static final int ACHIEVED = 0x0001_0000;
29 | public static final int SENT_TO_SERVER = 0x0010_0000;
30 | public static final int NOT_SENT_TO_BACKEND = 0x0000_0000;
31 |
32 | public static final int TYPE_MASK = 0x0F00_0000;
33 | public static final int TYPE_INCREMENTAL = 0x0200_0000;
34 | public static final int TYPE_SINGLE = 0x0100_0000;
35 |
36 | public static final int VALUE_MASK = 0x0000_FFFF;
37 |
38 | public static final String DATAPATH_ALL_DATA = "/alldata";
39 | public static final String DATAPATH_HIGH_SCORE = "/high_score";
40 | public static final String MESSAGEPATH_ACHIEVEMENT_SENT = "/message/achievement";
41 |
42 | public static final String MAP_KEY_HIGH_SCORE = "high_score";
43 | public static final String MAP_KEY_TIMESTAMP = "timestamp";
44 | public static final String MAP_KEY_ACHIEVEMENT_DATA = "achievement_data";
45 | public static final String MAP_KEY_COMBINED_VALUE = "combined_value";
46 | public static final String MAP_KEY_ACHIEVEMENT_ID = "achievement_id";
47 | public static final String MAP_KEY_ACHIEVEMENT_KEY = "achievement_key";
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/shared/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PaperCraftShared
3 | One Hundred
4 | One Thousand
5 | Ten Thousand
6 | Pacifist
7 |
8 | Back Stabber
9 | Fin
10 | Sitting Duck
11 | Bad Pilot
12 |
13 | Re-Ocho
14 | Ocho
15 | Cuatro
16 | Pretty Awesome Man
17 |
18 |
20 | yourAchievementId
21 | yourAchievementId
22 | yourAchievementId
23 | yourAchievementId
24 |
25 | yourAchievementId
26 | yourAchievementId
27 | yourAchievementId
28 | yourAchievementId
29 |
30 | yourAchievementId
31 | yourAchievementId
32 | yourAchievementId
33 | yourAchievementId
34 |
35 |
--------------------------------------------------------------------------------
/shared/src/test/java/cordproject/lol/papercraftshared/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package cordproject.lol.papercraftshared;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/tankmoji.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------