This commit is contained in:
BA7LZD 2021-08-19 13:08:00 +08:00
commit cf107ebf34
11 changed files with 97 additions and 0 deletions

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" default="true" project-jdk-name="9" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/FunningChicken.iml" filepath="$PROJECT_DIR$/FunningChicken.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

11
FunningChicken.iml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

11
src/Demo.java Normal file
View File

@ -0,0 +1,11 @@
public class Demo {
public static void main(String[] args) {
int a=1;
boolean b= a(a);
System.out.println(b);
}
public static boolean a(int a){
return a==1;
}
}

47
src/Funning.java Normal file
View File

@ -0,0 +1,47 @@
import javax.swing.*;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
public class Funning extends JPanel {
public static final int WIDTH = 400;
public static final int HEIGHT = 654;
public static BufferedImage background;
/*
public static BufferedImage start;
public static BufferedImage pause;
public static BufferedImage gameover;
public static BufferedImage airplane;
public static BufferedImage bee;
public static BufferedImage bullet;
public static BufferedImage hero0;
public static BufferedImage hero1;
public static BufferedImage bigplane;
*/
static {
try {
background = ImageIO.read(Funning.class.getResource("background.jpeg"));
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
JFrame frame = new JFrame("FunningChicken");
Funning game = new Funning();
frame.add(game);
frame.setSize(WIDTH, HEIGHT);
frame.setAlwaysOnTop(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setVisible(true);// 1.c窗口可见2.自动调paint
}
}

BIN
src/background.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB