add javadocs to all classes
This commit is contained in:
parent
8e294e75ac
commit
3a8a5deda7
@ -1,12 +1,12 @@
|
|||||||
* Objektorientiertes Design
|
* Objektorientiertes Design
|
||||||
** DONE min. 10 Klassen
|
** DONE min. 10 Klassen
|
||||||
** TODO min. zwei Vererbungen mit einer Tiefe von drei
|
** DONE min. zwei Vererbungen mit einer Tiefe von drei
|
||||||
** DONE Anwendung von Polymorphie
|
** DONE Anwendung von Polymorphie
|
||||||
** DONE Verwendung eines Interfaces
|
** DONE Verwendung eines Interfaces
|
||||||
** TODO Anwendung eines Patterns (z.B. Singelton)
|
** DONE Anwendung eines Patterns (z.B. Singelton)
|
||||||
* Spielbarkeit
|
* Spielbarkeit
|
||||||
** DONE User Interaktion mit Maus oder Tastatur
|
** DONE User Interaktion mit Maus oder Tastatur
|
||||||
** TODO Ziel und Verbesserungsmöglichkeit (z.B. durch Punkte)
|
** DONE Ziel und Verbesserungsmöglichkeit (z.B. durch Punkte)
|
||||||
** TODO Persistierung des Spielstandes (abspeichern)
|
** TODO Persistierung des Spielstandes (abspeichern)
|
||||||
* Dokumentation
|
* Dokumentation
|
||||||
** TODO Kurze Präsentation (10 min) im letzten Labortermin (eine pro Gruppe)
|
** TODO Kurze Präsentation (10 min) im letzten Labortermin (eine pro Gruppe)
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import processing.core.PVector;
|
import processing.core.PVector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An animation which moves an entity somewhere over an amount of frames
|
||||||
|
*/
|
||||||
public class AniMove extends Animation {
|
public class AniMove extends Animation {
|
||||||
public AniMove(Fenster window, Character player) {
|
public AniMove(Fenster window, Character player) {
|
||||||
super(window, player);
|
super(window, player);
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* An animation which shrinks a Character over an amount of frames.
|
||||||
|
*/
|
||||||
public class AniShrink extends Animation {
|
public class AniShrink extends Animation {
|
||||||
int numPoints = 50;
|
int numPoints = 50;
|
||||||
public AniShrink(Fenster window, Character player) {
|
public AniShrink(Fenster window, Character player) {
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import processing.core.PVector;
|
import processing.core.PVector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shared code of the animations.
|
||||||
|
*/
|
||||||
public class Animation {
|
public class Animation {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
Character player;
|
Character player;
|
||||||
|
|||||||
@ -2,6 +2,9 @@ import processing.core.PVector;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Aura ball we can see and click in a fight.
|
||||||
|
*/
|
||||||
public class AuraBubble {
|
public class AuraBubble {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import processing.core.PVector;
|
import processing.core.PVector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Auraball that shauld not be clicked. If clicked it will damage the player through the AuraFight.
|
||||||
|
*/
|
||||||
public class AuraFail extends AuraBubble {
|
public class AuraFail extends AuraBubble {
|
||||||
public AuraFail(Fenster window) {
|
public AuraFail(Fenster window) {
|
||||||
super(window);
|
super(window);
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
public class AuraFight extends Bubble{
|
/**
|
||||||
|
* This basically is the fightscene and logic which generates the aura balls.
|
||||||
|
*/
|
||||||
|
public class AuraFight extends Bubble implements Drawable {
|
||||||
Player player;
|
Player player;
|
||||||
Enemy enemy;
|
Enemy enemy;
|
||||||
AuraBubble my_aura = new AuraBubble(window);
|
AuraBubble my_aura = new AuraBubble(window);
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* The objects that can draw onto the window.
|
||||||
|
*/
|
||||||
public interface Drawable {
|
public interface Drawable {
|
||||||
public void draw();
|
public void draw();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,9 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The window which holds all game information and draws.
|
||||||
|
*/
|
||||||
public class Fenster extends PApplet {
|
public class Fenster extends PApplet {
|
||||||
|
|
||||||
Player player;
|
Player player;
|
||||||
|
|||||||
@ -2,6 +2,10 @@ import processing.core.PApplet;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unused old fighting logic. Replaced with AuraFight.
|
||||||
|
*/
|
||||||
public class Fight extends Bubble {
|
public class Fight extends Bubble {
|
||||||
Player player;
|
Player player;
|
||||||
Enemy enemy;
|
Enemy enemy;
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* State which holds the fightscene
|
||||||
|
*/
|
||||||
public class FightScreen implements State {
|
public class FightScreen implements State {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
boolean isState = false;
|
boolean isState = false;
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* Main game scene.
|
||||||
|
*/
|
||||||
public class GameScreen implements State {
|
public class GameScreen implements State {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
boolean isState = false;
|
boolean isState = false;
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* Interface for Character that have health.
|
||||||
|
*/
|
||||||
public interface Health {
|
public interface Health {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import processing.core.PVector;
|
import processing.core.PVector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class which holds a Characters position. It can translate and sync off and on-grid positions.
|
||||||
|
*/
|
||||||
public class Position {
|
public class Position {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
float x, y;
|
float x, y;
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class for the savefile
|
||||||
|
*/
|
||||||
public class Save {
|
public class Save {
|
||||||
|
|
||||||
private static Save INSTANCE;
|
private static Save INSTANCE;
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* Currently unused Skill class which was the skeleton for Tritt. It could animate and calculate.
|
||||||
|
*/
|
||||||
public class Skill {
|
public class Skill {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
Character user;
|
Character user;
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State which holds the starting screen with animations.
|
||||||
|
*/
|
||||||
public class StartScreen implements State {
|
public class StartScreen implements State {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
boolean isState = false;
|
boolean isState = false;
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* Interface that defines what a state should be able to do.
|
||||||
|
*/
|
||||||
public interface State {
|
public interface State {
|
||||||
Fenster window = null;
|
Fenster window = null;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import processing.core.PApplet;
|
import processing.core.PApplet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Character we can talk to
|
* A Character we can talk to.
|
||||||
*/
|
*/
|
||||||
public class Talkable extends Character implements Interactable{
|
public class Talkable extends Character implements Interactable{
|
||||||
Bubble bubble;
|
Bubble bubble;
|
||||||
|
|||||||
@ -2,7 +2,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Tiles {
|
/**
|
||||||
|
* This keeps and creates the tiles and information around them. Basically the level builder.
|
||||||
|
*/
|
||||||
|
public class Tiles implements Drawable {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
Cell[][] tileMap;
|
Cell[][] tileMap;
|
||||||
float tilewidth;
|
float tilewidth;
|
||||||
@ -54,7 +57,7 @@ public class Tiles {
|
|||||||
/**
|
/**
|
||||||
* This will draw all cells and also redraw all talkable cells, to the bubble is displayed on top.
|
* This will draw all cells and also redraw all talkable cells, to the bubble is displayed on top.
|
||||||
*/
|
*/
|
||||||
void draw() {
|
public void draw() {
|
||||||
for(int i = 0; i < tileMap.length; i++) {
|
for(int i = 0; i < tileMap.length; i++) {
|
||||||
for(int j = 0; j < tileMap[0].length; j++) {
|
for(int j = 0; j < tileMap[0].length; j++) {
|
||||||
tileMap[i][j].draw();
|
tileMap[i][j].draw();
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* Unused Skill which did basic damage and showed a neat animation.
|
||||||
|
*/
|
||||||
public class Tritt extends Skill {
|
public class Tritt extends Skill {
|
||||||
|
|
||||||
boolean animating = false;
|
boolean animating = false;
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
import processing.core.PApplet;
|
import processing.core.PApplet;
|
||||||
import processing.core.PShape;
|
import processing.core.PShape;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class that draws our UI.
|
||||||
|
*/
|
||||||
public class UI {
|
public class UI {
|
||||||
Fenster window;
|
Fenster window;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user