mirror of
https://github.com/Klagarge/PokeHES.git
synced 2026-07-31 23:32:24 +00:00
create packages + class
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,16 @@
|
||||
package Entity;
|
||||
|
||||
public abstract class Character extends Entity{
|
||||
public Character(String name) {
|
||||
super(name);
|
||||
//TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
private int pv;
|
||||
|
||||
public int getPv() {
|
||||
return pv;
|
||||
}
|
||||
|
||||
abstract protected void removedPv(int pv);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
package Entity;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
public class Enemy extends Character{
|
||||
|
||||
public Enemy(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void setPosition(int x, int y){
|
||||
|
||||
}
|
||||
|
||||
public void setPosition(Vector2 vPosition){
|
||||
setPosition((int)vPosition.x, (int)vPosition.y);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removedPv(int pv) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
package Entity;
|
||||
|
||||
public abstract class Entity {
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
public abstract class Entity {
|
||||
private Vector2 position;
|
||||
private String name;
|
||||
|
||||
public Entity(String name){
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Vector2 getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
package Entity;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
public class Player extends Character{
|
||||
|
||||
private int xp;
|
||||
|
||||
public Player(String name) {
|
||||
super(name);
|
||||
//TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public void addXp(int xp){
|
||||
|
||||
}
|
||||
|
||||
public void move(int x, int y){
|
||||
|
||||
}
|
||||
|
||||
public void move(Vector2 vMove){
|
||||
move((int)vMove.x, (int)vMove.y);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removedPv(int pv) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,4 +2,9 @@ package Entity;
|
||||
|
||||
public class Stuff extends Entity{
|
||||
|
||||
public Stuff(String name) {
|
||||
super(name);
|
||||
//TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
/*
|
||||
* This Java source file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
import ch.hevs.gdx2d.desktop.PortableApplication;
|
||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||
|
||||
public class PokeMudry {
|
||||
public String getGreeting() {
|
||||
return "Hello World!";
|
||||
}
|
||||
public class PokeMudry extends PortableApplication{
|
||||
public final boolean ANDROID = false;
|
||||
public final int PLAYERS = 1;
|
||||
public static final int TIME = 10; // number of minutes for kill all enemy
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new PokeMudry().getGreeting());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInit() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGraphicRender(GdxGraphics g) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package Screen;
|
||||
|
||||
public class ScreenBattle {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package Screen;
|
||||
|
||||
public class ScreenMap {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package Screen;
|
||||
|
||||
import ch.hevs.gdx2d.lib.ScreenManager;
|
||||
|
||||
public class ScreenPlayer {
|
||||
private ScreenManager screenManager;
|
||||
private ScreenMap screenMap;
|
||||
private ScreenBattle screenBattle;
|
||||
|
||||
public void init(){
|
||||
|
||||
}
|
||||
|
||||
public void render(){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,5 @@ import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class AppTest {
|
||||
@Test void appHasAGreeting() {
|
||||
PokeMudry classUnderTest = new PokeMudry();
|
||||
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user