Skip to content

Commit

Permalink
Applet added
Browse files Browse the repository at this point in the history
  • Loading branch information
Phhere committed Jun 24, 2012
1 parent 3dfb045 commit 7cb2b1a
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Bomerman.jardesc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
<jardesc>
<jar path="Programmierpraktikum/Bomberman.jar"/>
<options buildIfNeeded="true" compress="true" descriptionLocation="/Programmierpraktikum/Bomerman.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
<selectedProjects/>
<manifest generateManifest="true" mainClassHandleIdentifier="=Programmierpraktikum/src&lt;game{Applet.java[Applet" manifestLocation="/Programmierpraktikum/Webapplet.manifest" manifestVersion="1.0" reuseManifest="false" saveManifest="true" usesManifest="true">
<sealing sealJar="false">
<packagesToSeal/>
<packagesToUnSeal/>
</sealing>
</manifest>
<selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
<javaElement handleIdentifier="=Programmierpraktikum/src"/>
</selectedElements>
</jardesc>
3 changes: 3 additions & 0 deletions Webapplet.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: game.Main

Binary file added applet/Bomberman.jar
Binary file not shown.
21 changes: 21 additions & 0 deletions applet/Bomberman.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Manifest-Version: 1.0
Main-Class: game.Applet

Name: game/highscore/
Sealed: true

Name: level/
Sealed: true

Name: entities/
Sealed: true

Name: network/
Sealed: true

Name: game/
Sealed: true

Name: graphics/
Sealed: true

19 changes: 19 additions & 0 deletions applet/Deploy.jnlp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
<information>
<title>Bomberman</title>
<vendor>Progra Gruppe 15 </vendor>
</information>
<resources>
<!-- Application Resources -->
<java version="1.6+" />
<jar href="Bomberman.jar" main="true" />

</resources>
<applet-desc
name="Bomberman Applet"
main-class="game.Applet"
width="640"
height="480">
</applet-desc>
</jnlp>
15 changes: 15 additions & 0 deletions applet/applet.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<html>
<head>
<title>Bomberman</title>
<script src="deployJava.js"></script>
</head>

<body>
<script type="text/javascript">
var attributes = {
code:'game.Main',width:900, height:700} ;
var parameters = {jnlp_href: 'Deploy.jnlp'} ;
deployJava.runApplet(attributes, parameters, '1.6');
</script>
</body>
</html>
87 changes: 87 additions & 0 deletions applet/deployJava.js

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions src/game/Applet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package game;

import javax.swing.JApplet;

public class Applet extends JApplet {

public Game game;

@Override
public void init() {
this.setIgnoreRepaint(true);
this.setVisible(true);
this.game = Game.getInstance();
this.add(this.game);
this.setSize(Game.GAME_WIDTH, Game.GAME_HEIGHT);
// Applet.this.setVisible(true);
}

@Override
public void start() {
this.game.start();
}

@Override
public void stop() {
this.game.stop();
super.destroy();
}
}

0 comments on commit 7cb2b1a

Please sign in to comment.