mirror of
https://ee.coding.net/mcontext/mContext/FunningChicken.git
synced 2024-09-18 06:24:54 +08:00
init
This commit is contained in:
commit
cf107ebf34
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal 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
6
.idea/misc.xml
Normal 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
8
.idea/modules.xml
Normal 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
6
.idea/vcs.xml
Normal 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
11
FunningChicken.iml
Normal 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>
|
BIN
out/production/FunningChicken/Demo.class
Normal file
BIN
out/production/FunningChicken/Demo.class
Normal file
Binary file not shown.
BIN
out/production/FunningChicken/Funning.class
Normal file
BIN
out/production/FunningChicken/Funning.class
Normal file
Binary file not shown.
BIN
out/production/FunningChicken/background.jpeg
Normal file
BIN
out/production/FunningChicken/background.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
11
src/Demo.java
Normal file
11
src/Demo.java
Normal 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
47
src/Funning.java
Normal 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
BIN
src/background.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
Loading…
Reference in New Issue
Block a user