commit
8a8064d4b0
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.dungeoncrawler;
|
||||||
|
|
||||||
|
import com.dungeoncrawler.entities.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jonathan
|
||||||
|
*/
|
||||||
|
public class Dungeon {
|
||||||
|
private Level level[];
|
||||||
|
private Player player;
|
||||||
|
private int playerRoom;
|
||||||
|
private int playerLevel;
|
||||||
|
|
||||||
|
public Dungeon(Player player){
|
||||||
|
this.level = new Level[7];
|
||||||
|
this.player = player;
|
||||||
|
this.playerRoom = 0;
|
||||||
|
this.playerLevel = 0;
|
||||||
|
|
||||||
|
createLvl();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(){
|
||||||
|
// TODO: Implementieren
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createLvl(){
|
||||||
|
// TODO. Implementieren
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the level
|
||||||
|
*/
|
||||||
|
public Level[] getLevel() {
|
||||||
|
return this.level;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param level the level to set
|
||||||
|
*/
|
||||||
|
public void setLevel(Level[] level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public Player getPlayer() {
|
||||||
|
return this.player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param player the player to set
|
||||||
|
*/
|
||||||
|
public void setPlayer(Player player) {
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the playerRoom
|
||||||
|
*/
|
||||||
|
public int getPlayerRoom() {
|
||||||
|
return playerRoom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param playerRoom the playerRoom to set
|
||||||
|
*/
|
||||||
|
public void setPlayerRoom(int playerRoom) {
|
||||||
|
this.playerRoom = playerRoom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the playerLevel
|
||||||
|
*/
|
||||||
|
public int getPlayerLevel() {
|
||||||
|
return playerLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param playerLevel the playerLevel to set
|
||||||
|
*/
|
||||||
|
public void setPlayerLevel(int playerLevel) {
|
||||||
|
this.playerLevel = playerLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.dungeoncrawler;
|
||||||
|
|
||||||
|
import com.dungeoncrawler.items.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jonathan
|
||||||
|
*/
|
||||||
|
public class ItemContainer {
|
||||||
|
private int xPos;
|
||||||
|
private int yPos;
|
||||||
|
private Item item;
|
||||||
|
|
||||||
|
public ItemContainer(int xPos, int yPos, Item item){
|
||||||
|
this.xPos = xPos;
|
||||||
|
this.yPos = yPos;
|
||||||
|
this.item = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the xPos
|
||||||
|
*/
|
||||||
|
public int getxPos() {
|
||||||
|
return xPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param xPos the xPos to set
|
||||||
|
*/
|
||||||
|
public void setxPos(int xPos) {
|
||||||
|
this.xPos = xPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the yPos
|
||||||
|
*/
|
||||||
|
public int getyPos() {
|
||||||
|
return yPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param yPos the yPos to set
|
||||||
|
*/
|
||||||
|
public void setyPos(int yPos) {
|
||||||
|
this.yPos = yPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the item
|
||||||
|
*/
|
||||||
|
public Item getItem() {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param item the item to set
|
||||||
|
*/
|
||||||
|
public void setItem(Item item) {
|
||||||
|
this.item = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.dungeoncrawler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jonathan
|
||||||
|
*/
|
||||||
|
public class Level {
|
||||||
|
private Room[] rooms;
|
||||||
|
|
||||||
|
public Level(int amount){
|
||||||
|
this.rooms = new Room[amount];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the rooms
|
||||||
|
*/
|
||||||
|
public Room[] getRooms() {
|
||||||
|
return rooms;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param rooms the rooms to set
|
||||||
|
*/
|
||||||
|
public void setRooms(Room[] rooms) {
|
||||||
|
this.rooms = rooms;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.dungeoncrawler;
|
||||||
|
|
||||||
|
import com.dungeoncrawler.entities.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jonathan
|
||||||
|
*/
|
||||||
|
public class Room {
|
||||||
|
private ItemContainer item;
|
||||||
|
private Entity[] enemies;
|
||||||
|
|
||||||
|
public Room(ItemContainer item, Entity[] enemies){
|
||||||
|
this.item = item;
|
||||||
|
this.enemies = enemies;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void spawnEnemies(int xPos, int yPos){
|
||||||
|
// TODO: Zu Implementieren
|
||||||
|
}
|
||||||
|
|
||||||
|
public void spawnItem(int xPos, int yPos){
|
||||||
|
// TODO: Zu Implementieren
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the item
|
||||||
|
*/
|
||||||
|
public ItemContainer getItem() {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param item the item to set
|
||||||
|
*/
|
||||||
|
public void setItem(ItemContainer item) {
|
||||||
|
this.item = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the enemies
|
||||||
|
*/
|
||||||
|
public Entity[] getEnemies() {
|
||||||
|
return enemies;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param enemies the enemies to set
|
||||||
|
*/
|
||||||
|
public void setEnemies(Entity[] enemies) {
|
||||||
|
this.enemies = enemies;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in new issue