├── .gitignore ├── LICENSE ├── README.md ├── images ├── bg.jpg ├── fish01_01.png ├── fish01_02.png ├── fish01_03.png ├── fish01_04.png ├── fish01_05.png ├── fish01_06.png ├── fish01_07.png ├── fish01_08.png ├── fish01_09.png ├── fish01_10.png ├── fish01_catch_01.png ├── fish01_catch_02.png ├── fish02_01.png ├── fish02_02.png ├── fish02_03.png ├── fish02_04.png ├── fish02_05.png ├── fish02_06.png ├── fish02_07.png ├── fish02_08.png ├── fish02_09.png ├── fish02_10.png ├── fish02_catch_01.png ├── fish02_catch_02.png ├── fish03_01.png ├── fish03_02.png ├── fish03_03.png ├── fish03_04.png ├── fish03_05.png ├── fish03_06.png ├── fish03_07.png ├── fish03_08.png ├── fish03_09.png ├── fish03_10.png ├── fish03_catch_01.png ├── fish03_catch_02.png ├── fish04_01.png ├── fish04_02.png ├── fish04_03.png ├── fish04_04.png ├── fish04_05.png ├── fish04_06.png ├── fish04_07.png ├── fish04_08.png ├── fish04_09.png ├── fish04_10.png ├── fish04_catch_01.png ├── fish04_catch_02.png ├── fish05_01.png ├── fish05_02.png ├── fish05_03.png ├── fish05_04.png ├── fish05_05.png ├── fish05_06.png ├── fish05_07.png ├── fish05_08.png ├── fish05_09.png ├── fish05_10.png ├── fish05_catch_01.png ├── fish05_catch_02.png ├── fish06_01.png ├── fish06_02.png ├── fish06_03.png ├── fish06_04.png ├── fish06_05.png ├── fish06_06.png ├── fish06_07.png ├── fish06_08.png ├── fish06_09.png ├── fish06_10.png ├── fish06_catch_01.png ├── fish06_catch_02.png ├── fish07_01.png ├── fish07_02.png ├── fish07_03.png ├── fish07_04.png ├── fish07_05.png ├── fish07_06.png ├── fish07_07.png ├── fish07_08.png ├── fish07_09.png ├── fish07_10.png ├── fish07_catch_01.png ├── fish07_catch_02.png ├── fish08_01.png ├── fish08_02.png ├── fish08_03.png ├── fish08_04.png ├── fish08_05.png ├── fish08_06.png ├── fish08_07.png ├── fish08_08.png ├── fish08_09.png ├── fish08_10.png ├── fish08_catch_01.png ├── fish08_catch_02.png ├── fish08_catch_03.png ├── fish08_catch_04.png ├── fish09_01.png ├── fish09_02.png ├── fish09_03.png ├── fish09_04.png ├── fish09_05.png ├── fish09_06.png ├── fish09_07.png ├── fish09_08.png ├── fish09_09.png ├── fish09_10.png ├── fish09_catch_01.png ├── fish09_catch_02.png ├── fish09_catch_03.png ├── fish09_catch_04.png ├── fish10_01.png ├── fish10_02.png ├── fish10_03.png ├── fish10_04.png ├── fish10_05.png ├── fish10_06.png ├── fish10_07.png ├── fish10_08.png ├── fish10_09.png ├── fish10_10.png ├── fish10_catch_01.png ├── fish10_catch_02.png ├── fish10_catch_03.png ├── fish10_catch_04.png ├── fish11_01.png ├── fish11_02.png ├── fish11_03.png ├── fish11_04.png ├── fish11_05.png ├── fish11_06.png ├── fish11_07.png ├── fish11_08.png ├── fish11_09.png ├── fish11_10.png ├── fish11_catch_01.png ├── fish11_catch_02.png ├── fish11_catch_03.png ├── fish11_catch_04.png ├── net_1.png ├── net_2.png ├── net_3.png ├── net_4.png ├── net_5.png ├── net_6.png ├── net_7.png └── welcome.jpg └── src └── org └── wf └── game └── fish └── FishGame.java /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /out/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 synchronized 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FishGame 2 | Java捕鱼达人游戏 3 | 4 | ## 运行截图 5 | 6 | ![截图](https://s2.ax1x.com/2019/04/02/AywrCQ.png) 7 | 8 | ## 推荐 9 | **EasyWeb管系统模板**
10 |  一个开箱即用的后台模板,使用简单,模板丰富,包含传统ifram版、spa单页面路由版,[前往查看](https://easyweb.vip)。 -------------------------------------------------------------------------------- /images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/bg.jpg -------------------------------------------------------------------------------- /images/fish01_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_01.png -------------------------------------------------------------------------------- /images/fish01_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_02.png -------------------------------------------------------------------------------- /images/fish01_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_03.png -------------------------------------------------------------------------------- /images/fish01_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_04.png -------------------------------------------------------------------------------- /images/fish01_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_05.png -------------------------------------------------------------------------------- /images/fish01_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_06.png -------------------------------------------------------------------------------- /images/fish01_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_07.png -------------------------------------------------------------------------------- /images/fish01_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_08.png -------------------------------------------------------------------------------- /images/fish01_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_09.png -------------------------------------------------------------------------------- /images/fish01_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_10.png -------------------------------------------------------------------------------- /images/fish01_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_catch_01.png -------------------------------------------------------------------------------- /images/fish01_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish01_catch_02.png -------------------------------------------------------------------------------- /images/fish02_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_01.png -------------------------------------------------------------------------------- /images/fish02_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_02.png -------------------------------------------------------------------------------- /images/fish02_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_03.png -------------------------------------------------------------------------------- /images/fish02_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_04.png -------------------------------------------------------------------------------- /images/fish02_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_05.png -------------------------------------------------------------------------------- /images/fish02_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_06.png -------------------------------------------------------------------------------- /images/fish02_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_07.png -------------------------------------------------------------------------------- /images/fish02_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_08.png -------------------------------------------------------------------------------- /images/fish02_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_09.png -------------------------------------------------------------------------------- /images/fish02_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_10.png -------------------------------------------------------------------------------- /images/fish02_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_catch_01.png -------------------------------------------------------------------------------- /images/fish02_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish02_catch_02.png -------------------------------------------------------------------------------- /images/fish03_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_01.png -------------------------------------------------------------------------------- /images/fish03_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_02.png -------------------------------------------------------------------------------- /images/fish03_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_03.png -------------------------------------------------------------------------------- /images/fish03_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_04.png -------------------------------------------------------------------------------- /images/fish03_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_05.png -------------------------------------------------------------------------------- /images/fish03_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_06.png -------------------------------------------------------------------------------- /images/fish03_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_07.png -------------------------------------------------------------------------------- /images/fish03_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_08.png -------------------------------------------------------------------------------- /images/fish03_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_09.png -------------------------------------------------------------------------------- /images/fish03_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_10.png -------------------------------------------------------------------------------- /images/fish03_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_catch_01.png -------------------------------------------------------------------------------- /images/fish03_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish03_catch_02.png -------------------------------------------------------------------------------- /images/fish04_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_01.png -------------------------------------------------------------------------------- /images/fish04_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_02.png -------------------------------------------------------------------------------- /images/fish04_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_03.png -------------------------------------------------------------------------------- /images/fish04_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_04.png -------------------------------------------------------------------------------- /images/fish04_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_05.png -------------------------------------------------------------------------------- /images/fish04_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_06.png -------------------------------------------------------------------------------- /images/fish04_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_07.png -------------------------------------------------------------------------------- /images/fish04_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_08.png -------------------------------------------------------------------------------- /images/fish04_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_09.png -------------------------------------------------------------------------------- /images/fish04_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_10.png -------------------------------------------------------------------------------- /images/fish04_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_catch_01.png -------------------------------------------------------------------------------- /images/fish04_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish04_catch_02.png -------------------------------------------------------------------------------- /images/fish05_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_01.png -------------------------------------------------------------------------------- /images/fish05_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_02.png -------------------------------------------------------------------------------- /images/fish05_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_03.png -------------------------------------------------------------------------------- /images/fish05_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_04.png -------------------------------------------------------------------------------- /images/fish05_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_05.png -------------------------------------------------------------------------------- /images/fish05_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_06.png -------------------------------------------------------------------------------- /images/fish05_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_07.png -------------------------------------------------------------------------------- /images/fish05_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_08.png -------------------------------------------------------------------------------- /images/fish05_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_09.png -------------------------------------------------------------------------------- /images/fish05_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_10.png -------------------------------------------------------------------------------- /images/fish05_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_catch_01.png -------------------------------------------------------------------------------- /images/fish05_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish05_catch_02.png -------------------------------------------------------------------------------- /images/fish06_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_01.png -------------------------------------------------------------------------------- /images/fish06_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_02.png -------------------------------------------------------------------------------- /images/fish06_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_03.png -------------------------------------------------------------------------------- /images/fish06_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_04.png -------------------------------------------------------------------------------- /images/fish06_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_05.png -------------------------------------------------------------------------------- /images/fish06_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_06.png -------------------------------------------------------------------------------- /images/fish06_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_07.png -------------------------------------------------------------------------------- /images/fish06_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_08.png -------------------------------------------------------------------------------- /images/fish06_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_09.png -------------------------------------------------------------------------------- /images/fish06_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_10.png -------------------------------------------------------------------------------- /images/fish06_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_catch_01.png -------------------------------------------------------------------------------- /images/fish06_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish06_catch_02.png -------------------------------------------------------------------------------- /images/fish07_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_01.png -------------------------------------------------------------------------------- /images/fish07_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_02.png -------------------------------------------------------------------------------- /images/fish07_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_03.png -------------------------------------------------------------------------------- /images/fish07_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_04.png -------------------------------------------------------------------------------- /images/fish07_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_05.png -------------------------------------------------------------------------------- /images/fish07_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_06.png -------------------------------------------------------------------------------- /images/fish07_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_07.png -------------------------------------------------------------------------------- /images/fish07_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_08.png -------------------------------------------------------------------------------- /images/fish07_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_09.png -------------------------------------------------------------------------------- /images/fish07_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_10.png -------------------------------------------------------------------------------- /images/fish07_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_catch_01.png -------------------------------------------------------------------------------- /images/fish07_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish07_catch_02.png -------------------------------------------------------------------------------- /images/fish08_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_01.png -------------------------------------------------------------------------------- /images/fish08_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_02.png -------------------------------------------------------------------------------- /images/fish08_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_03.png -------------------------------------------------------------------------------- /images/fish08_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_04.png -------------------------------------------------------------------------------- /images/fish08_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_05.png -------------------------------------------------------------------------------- /images/fish08_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_06.png -------------------------------------------------------------------------------- /images/fish08_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_07.png -------------------------------------------------------------------------------- /images/fish08_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_08.png -------------------------------------------------------------------------------- /images/fish08_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_09.png -------------------------------------------------------------------------------- /images/fish08_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_10.png -------------------------------------------------------------------------------- /images/fish08_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_catch_01.png -------------------------------------------------------------------------------- /images/fish08_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_catch_02.png -------------------------------------------------------------------------------- /images/fish08_catch_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_catch_03.png -------------------------------------------------------------------------------- /images/fish08_catch_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish08_catch_04.png -------------------------------------------------------------------------------- /images/fish09_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_01.png -------------------------------------------------------------------------------- /images/fish09_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_02.png -------------------------------------------------------------------------------- /images/fish09_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_03.png -------------------------------------------------------------------------------- /images/fish09_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_04.png -------------------------------------------------------------------------------- /images/fish09_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_05.png -------------------------------------------------------------------------------- /images/fish09_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_06.png -------------------------------------------------------------------------------- /images/fish09_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_07.png -------------------------------------------------------------------------------- /images/fish09_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_08.png -------------------------------------------------------------------------------- /images/fish09_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_09.png -------------------------------------------------------------------------------- /images/fish09_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_10.png -------------------------------------------------------------------------------- /images/fish09_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_catch_01.png -------------------------------------------------------------------------------- /images/fish09_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_catch_02.png -------------------------------------------------------------------------------- /images/fish09_catch_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_catch_03.png -------------------------------------------------------------------------------- /images/fish09_catch_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish09_catch_04.png -------------------------------------------------------------------------------- /images/fish10_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_01.png -------------------------------------------------------------------------------- /images/fish10_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_02.png -------------------------------------------------------------------------------- /images/fish10_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_03.png -------------------------------------------------------------------------------- /images/fish10_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_04.png -------------------------------------------------------------------------------- /images/fish10_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_05.png -------------------------------------------------------------------------------- /images/fish10_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_06.png -------------------------------------------------------------------------------- /images/fish10_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_07.png -------------------------------------------------------------------------------- /images/fish10_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_08.png -------------------------------------------------------------------------------- /images/fish10_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_09.png -------------------------------------------------------------------------------- /images/fish10_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_10.png -------------------------------------------------------------------------------- /images/fish10_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_catch_01.png -------------------------------------------------------------------------------- /images/fish10_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_catch_02.png -------------------------------------------------------------------------------- /images/fish10_catch_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_catch_03.png -------------------------------------------------------------------------------- /images/fish10_catch_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish10_catch_04.png -------------------------------------------------------------------------------- /images/fish11_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_01.png -------------------------------------------------------------------------------- /images/fish11_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_02.png -------------------------------------------------------------------------------- /images/fish11_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_03.png -------------------------------------------------------------------------------- /images/fish11_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_04.png -------------------------------------------------------------------------------- /images/fish11_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_05.png -------------------------------------------------------------------------------- /images/fish11_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_06.png -------------------------------------------------------------------------------- /images/fish11_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_07.png -------------------------------------------------------------------------------- /images/fish11_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_08.png -------------------------------------------------------------------------------- /images/fish11_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_09.png -------------------------------------------------------------------------------- /images/fish11_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_10.png -------------------------------------------------------------------------------- /images/fish11_catch_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_catch_01.png -------------------------------------------------------------------------------- /images/fish11_catch_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_catch_02.png -------------------------------------------------------------------------------- /images/fish11_catch_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_catch_03.png -------------------------------------------------------------------------------- /images/fish11_catch_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/fish11_catch_04.png -------------------------------------------------------------------------------- /images/net_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/net_1.png -------------------------------------------------------------------------------- /images/net_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/net_2.png -------------------------------------------------------------------------------- /images/net_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/net_3.png -------------------------------------------------------------------------------- /images/net_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/net_4.png -------------------------------------------------------------------------------- /images/net_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/net_5.png -------------------------------------------------------------------------------- /images/net_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/net_6.png -------------------------------------------------------------------------------- /images/net_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/net_7.png -------------------------------------------------------------------------------- /images/welcome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andy521/FishGame/b8a297eb69c41a41e5c0107453f550ed9b66ff86/images/welcome.jpg -------------------------------------------------------------------------------- /src/org/wf/game/fish/FishGame.java: -------------------------------------------------------------------------------- 1 | package org.wf.game.fish; 2 | 3 | import java.awt.Color; 4 | import java.awt.Font; 5 | import java.awt.Graphics; 6 | import java.awt.event.MouseAdapter; 7 | import java.awt.event.MouseEvent; 8 | import java.awt.image.BufferedImage; 9 | import java.io.File; 10 | import java.io.IOException; 11 | import java.util.Random; 12 | 13 | import javax.imageio.ImageIO; 14 | import javax.swing.JFrame; 15 | import javax.swing.JPanel; 16 | 17 | public class FishGame { 18 | /** 19 | * @param args 20 | * @author lonely wolf 21 | * @version 捕鱼1.0 22 | * @time 2015.06.19 23 | */ 24 | public static void main(String[] args) { 25 | //游戏画框 26 | JFrame jf = new JFrame("疯狂捕鱼"); 27 | jf.setSize(800, 480); 28 | jf.setLocationRelativeTo(null); 29 | jf.setResizable(false); 30 | jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 31 | jf.setAlwaysOnTop(true); 32 | //加载鱼池 33 | Pool pool = new Pool(); 34 | jf.add(pool); 35 | //显示框架 36 | jf.setVisible(true); 37 | pool.action(); 38 | } 39 | } 40 | 41 | //鱼池类 42 | class Pool extends JPanel { 43 | private static final long serialVersionUID = 1L; 44 | BufferedImage bgImage; //背景图片 45 | Fish[] fishs = new Fish[20]; //所有的鱼 46 | Net net = new Net(); //渔网 47 | boolean isExit; //鼠标是否在游戏界面 48 | int score, bullet = 50; //游戏得分,子弹数 49 | 50 | public Pool() { 51 | super(); 52 | File bg = new File("images/bg.jpg"); 53 | try { 54 | bgImage = ImageIO.read(bg); 55 | } catch (IOException e) { 56 | e.printStackTrace(); 57 | } 58 | //0-8,9-17对应1-9号鱼 59 | for (int i = 0; i < fishs.length / 2 - 1; i++) { 60 | fishs[i] = new Fish(i + 1); 61 | fishs[i + 9] = new Fish(i + 1); 62 | } 63 | fishs[18] = new Fish(10); 64 | fishs[19] = new Fish(11); 65 | } 66 | 67 | //画游戏元素 68 | @Override 69 | public void paint(Graphics g) { 70 | g.drawImage(bgImage, 0, 0, null); //画背景 71 | for (Fish fish : fishs) { 72 | g.drawImage(fish.fishImage, fish.fish_x, fish.fish_y, null); //画鱼 73 | } 74 | if (!isExit) { 75 | g.drawImage(net.netImage, net.netX, net.netY, null); //画网 76 | } 77 | 78 | //画游戏说明文字 79 | g.setColor(Color.GREEN); 80 | g.setFont(new Font("楷体", Font.ITALIC, 20)); 81 | g.drawString("疯狂捕鱼V1.0 By~Synchronized", 10, 25); 82 | g.drawString("子弹数:" + bullet + " 得分:" + score, 350, 25); 83 | g.drawString("右键切换渔网 VIP:" + (net.power % 7 + 1), 590, 25); 84 | if (bullet <= 0) { 85 | g.setColor(Color.RED); 86 | g.setFont(new Font("楷体", Font.BOLD, 100)); 87 | g.drawString("Game Over", 150, 250); 88 | bullet = 0; 89 | isExit = true; 90 | net.power = -1; 91 | } 92 | } 93 | 94 | //游戏启动方法 95 | public void action() { 96 | for (Fish fish : fishs) { 97 | fish.start(); 98 | } 99 | //鼠标监听器 100 | MouseAdapter adapter = new MouseAdapter() { 101 | @Override 102 | public void mousePressed(MouseEvent e) { 103 | int event = e.getModifiers(); 104 | if (event == 4) { 105 | net.change(); //切换网大小 106 | super.mousePressed(e); 107 | } else if (event == 16) { 108 | //减子弹 109 | if (bullet - (net.power % 7 + 1) <= 0) { 110 | bullet = 0; 111 | } else { 112 | bullet -= (net.power % 7 + 1); 113 | } 114 | //捕鱼 115 | for (Fish fish : fishs) { 116 | if (!fish.catched) { 117 | catchFish(fish); 118 | } 119 | } 120 | } 121 | } 122 | 123 | @Override 124 | public void mouseMoved(MouseEvent e) { 125 | net.moveTo(e.getX(), e.getY()); 126 | super.mouseMoved(e); 127 | } 128 | 129 | @Override 130 | public void mouseEntered(MouseEvent e) { 131 | isExit = false; 132 | super.mouseEntered(e); 133 | } 134 | 135 | @Override 136 | public void mouseExited(MouseEvent e) { 137 | isExit = true; 138 | super.mouseExited(e); 139 | } 140 | }; 141 | this.addMouseListener(adapter); 142 | this.addMouseMotionListener(adapter); 143 | while (true) { 144 | repaint(); 145 | } 146 | } 147 | 148 | //封装捕鱼的方法 149 | public void catchFish(Fish fish) { 150 | fish.catched = net.catchFish(fish); 151 | if (fish.catched) { 152 | score += 2 * fish.k; 153 | bullet += 2 * fish.k; 154 | } 155 | } 156 | } 157 | 158 | //鱼类 159 | class Fish extends Thread { 160 | int fish_x, fish_y; //鱼的坐标 161 | BufferedImage fishImage; //鱼的图片 162 | BufferedImage[] fishImages = new BufferedImage[10]; //鱼动作的图片 163 | BufferedImage[] catchImages; //鱼的被捕的图片 164 | int fish_width, fish_height; //鱼的宽高 165 | Random r = new Random(); //鱼y坐标的随机数 166 | int blood; //鱼的血量值 167 | boolean catched; //鱼是否被捕 168 | int k, step_size; //鱼的血量等级,移动速度 169 | 170 | public Fish(int m) { 171 | super(); 172 | String preName = m > 9 ? m + "" : "0" + m; 173 | //通过for循环读取鱼动作图片数组 174 | for (int i = 0; i < fishImages.length; i++) { 175 | int j = i + 1; 176 | String lastName = j > 9 ? "10" : "0" + j; 177 | File file = new File("images/fish" + preName + "_" + lastName + ".png"); 178 | try { 179 | fishImages[i] = ImageIO.read(file); 180 | } catch (IOException e) { 181 | e.printStackTrace(); 182 | } 183 | } 184 | fishImage = fishImages[0]; 185 | fish_width = this.fishImage.getWidth(); 186 | fish_height = this.fishImage.getHeight(); 187 | fish_x = 800; 188 | fish_y = r.nextInt(450 - fish_height); 189 | blood = m * 3; 190 | this.k = m; 191 | step_size = r.nextInt(5) + 1; 192 | //初始化catchImages 193 | if (m > 7) { 194 | catchImages = new BufferedImage[4]; 195 | } else if (m <= 7) { 196 | catchImages = new BufferedImage[2]; 197 | } 198 | //通过for循环读取鱼被捕图片数组 199 | for (int i = 1; i <= catchImages.length; i++) { 200 | File file = new File("images/fish" + preName + "_catch_0" + i + ".png"); 201 | try { 202 | catchImages[i - 1] = ImageIO.read(file); 203 | } catch (IOException e) { 204 | e.printStackTrace(); 205 | } 206 | } 207 | } 208 | 209 | //鱼移动的方法 210 | public void move() { 211 | fish_x -= step_size; 212 | } 213 | 214 | @Override 215 | public void run() { 216 | super.run(); 217 | while (true) { 218 | move(); //调用鱼移动的方法 219 | //如果鱼出界,重新生成 220 | if (fish_x < -fish_width || catched) { 221 | turnOut(); //鱼被捕,颤动 222 | newFish(); 223 | } 224 | change(); //调用鱼摇摆游动的方法 225 | try { 226 | Thread.sleep(15); 227 | } catch (InterruptedException e) { 228 | e.printStackTrace(); 229 | } 230 | } 231 | } 232 | 233 | //重新生成一条鱼 234 | public void newFish() { 235 | fish_x = 800; 236 | fish_y = r.nextInt(450 - fish_height); 237 | if (fish_y >= 450) { 238 | // System.out.println(fish_height + " " + fish_y); 239 | } 240 | catched = false; 241 | blood = k * 3; 242 | step_size = r.nextInt(5) + 1; 243 | } 244 | 245 | // 鱼摇摆游动的方法 246 | int index = 0; 247 | 248 | public void change() { 249 | index++; 250 | fishImage = fishImages[index / 3 % 10]; 251 | } 252 | 253 | //鱼被捕动画的方法 254 | public void turnOut() { 255 | for (int i = 0; i < catchImages.length; i++) { 256 | fishImage = catchImages[i]; 257 | try { 258 | Thread.sleep(100); 259 | } catch (InterruptedException e) { 260 | e.printStackTrace(); 261 | } 262 | } 263 | } 264 | } 265 | 266 | //渔网类 267 | class Net { 268 | int netX, netY;//网的坐标 269 | int netWidth, netHeight;//网的宽高 270 | BufferedImage netImage;//网的图片 271 | 272 | public Net() { 273 | super(); 274 | File file = new File("images/net_" + 1 + ".png"); 275 | try { 276 | netImage = ImageIO.read(file); 277 | } catch (IOException e) { 278 | e.printStackTrace(); 279 | } 280 | netX = 300; 281 | netY = 300; 282 | netWidth = netImage.getWidth(); 283 | netHeight = netImage.getHeight(); 284 | } 285 | 286 | // 鱼网切换的方法 287 | int power = 0; 288 | 289 | public void change() { 290 | power++; 291 | int x = this.netX + this.netWidth / 2; 292 | int y = this.netY + this.netHeight / 2; 293 | File file = new File("images/net_" + (power % 7 + 1) + ".png"); 294 | try { 295 | netImage = ImageIO.read(file); 296 | } catch (IOException e) { 297 | e.printStackTrace(); 298 | } 299 | this.netWidth = netImage.getWidth(); 300 | this.netHeight = netImage.getHeight(); 301 | moveTo(x, y); 302 | } 303 | 304 | //渔网移动的方法 305 | public void moveTo(int x, int y) { 306 | this.netX = x - this.netWidth / 2; 307 | this.netY = y - this.netHeight / 2; 308 | } 309 | 310 | //捕鱼 311 | public boolean catchFish(Fish fish) { 312 | //网的中心坐标 313 | int zX = netX + netWidth / 2; 314 | int zY = netY + netHeight / 2; 315 | //鱼的身体部分中心坐标 316 | int fX = fish.fish_x + fish.fish_width * 2 / 3; 317 | int fY = fish.fish_y + fish.fish_height / 2; 318 | //如果网的中心坐标在鱼的身体部分 319 | if (zX > fish.fish_x && zX < fish.fish_x + fish.fish_width * 2 / 3 320 | && zY > fish.fish_y && zY < fish.fish_y + fish.fish_height) { 321 | fish.blood -= ((power % 7 + 1) * 2); 322 | // System.out.println(fish.blood); 323 | } else if (fX > netX && fX < netX + netWidth 324 | && fY > netY && fY < netY + netHeight) { 325 | //如果鱼的身体部分中心坐标在网里 326 | fish.blood -= ((power % 7 + 1) * 2); 327 | // System.out.println(fish.blood); 328 | } 329 | return fish.blood <= 0; 330 | } 331 | } --------------------------------------------------------------------------------