add javadocs to all classes
This commit is contained in:
parent
8e294e75ac
commit
3a8a5deda7
@ -1,12 +1,12 @@
|
||||
* Objektorientiertes Design
|
||||
** 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 Verwendung eines Interfaces
|
||||
** TODO Anwendung eines Patterns (z.B. Singelton)
|
||||
** DONE Anwendung eines Patterns (z.B. Singelton)
|
||||
* Spielbarkeit
|
||||
** 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)
|
||||
* Dokumentation
|
||||
** TODO Kurze Präsentation (10 min) im letzten Labortermin (eine pro Gruppe)
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import processing.core.PVector;
|
||||
|
||||
/**
|
||||
* An animation which moves an entity somewhere over an amount of frames
|
||||
*/
|
||||
public class AniMove extends Animation {
|
||||
public AniMove(Fenster window, Character player) {
|
||||
super(window, player);
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* An animation which shrinks a Character over an amount of frames.
|
||||
*/
|
||||
public class AniShrink extends Animation {
|
||||
int numPoints = 50;
|
||||
public AniShrink(Fenster window, Character player) {
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import processing.core.PVector;
|
||||
|
||||
/**
|
||||
* Shared code of the animations.
|
||||
*/
|
||||
public class Animation {
|
||||
Fenster window;
|
||||
Character player;
|
||||
|
||||
@ -2,6 +2,9 @@ import processing.core.PVector;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
/**
|
||||
* The Aura ball we can see and click in a fight.
|
||||
*/
|
||||
public class AuraBubble {
|
||||
Fenster window;
|
||||
Random rand = new Random();
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
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 AuraFail(Fenster 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;
|
||||
Enemy enemy;
|
||||
AuraBubble my_aura = new AuraBubble(window);
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* The objects that can draw onto the window.
|
||||
*/
|
||||
public interface Drawable {
|
||||
public void draw();
|
||||
}
|
||||
|
||||
@ -6,6 +6,9 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
* The window which holds all game information and draws.
|
||||
*/
|
||||
public class Fenster extends PApplet {
|
||||
|
||||
Player player;
|
||||
|
||||
@ -2,6 +2,10 @@ import processing.core.PApplet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Unused old fighting logic. Replaced with AuraFight.
|
||||
*/
|
||||
public class Fight extends Bubble {
|
||||
Player player;
|
||||
Enemy enemy;
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* State which holds the fightscene
|
||||
*/
|
||||
public class FightScreen implements State {
|
||||
Fenster window;
|
||||
boolean isState = false;
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Main game scene.
|
||||
*/
|
||||
public class GameScreen implements State {
|
||||
Fenster window;
|
||||
boolean isState = false;
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Interface for Character that have health.
|
||||
*/
|
||||
public interface Health {
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import processing.core.PVector;
|
||||
|
||||
/**
|
||||
* Class which holds a Characters position. It can translate and sync off and on-grid positions.
|
||||
*/
|
||||
public class Position {
|
||||
Fenster window;
|
||||
float x, y;
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* Class for the savefile
|
||||
*/
|
||||
public class Save {
|
||||
|
||||
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 {
|
||||
Fenster window;
|
||||
Character user;
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* State which holds the starting screen with animations.
|
||||
*/
|
||||
public class StartScreen implements State {
|
||||
Fenster window;
|
||||
boolean isState = false;
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Interface that defines what a state should be able to do.
|
||||
*/
|
||||
public interface State {
|
||||
Fenster window = null;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import processing.core.PApplet;
|
||||
|
||||
/**
|
||||
* A Character we can talk to
|
||||
* A Character we can talk to.
|
||||
*/
|
||||
public class Talkable extends Character implements Interactable{
|
||||
Bubble bubble;
|
||||
|
||||
@ -2,7 +2,10 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
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;
|
||||
Cell[][] tileMap;
|
||||
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.
|
||||
*/
|
||||
void draw() {
|
||||
public void draw() {
|
||||
for(int i = 0; i < tileMap.length; i++) {
|
||||
for(int j = 0; j < tileMap[0].length; j++) {
|
||||
tileMap[i][j].draw();
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Unused Skill which did basic damage and showed a neat animation.
|
||||
*/
|
||||
public class Tritt extends Skill {
|
||||
|
||||
boolean animating = false;
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import processing.core.PApplet;
|
||||
import processing.core.PShape;
|
||||
|
||||
/**
|
||||
* Class that draws our UI.
|
||||
*/
|
||||
public class UI {
|
||||
Fenster window;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user