1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2024-11-26 11:03:28 +00:00

create packages + class

This commit is contained in:
Rémi Heredero 2022-06-01 16:47:53 +02:00
parent 2b73cff725
commit 7908d62583
20 changed files with 127 additions and 15 deletions

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.

View File

@ -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);
}

View File

@ -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
}
}

View File

@ -1,5 +1,20 @@
package 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;
}
}

View File

@ -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
}
}

View File

@ -1,5 +1,10 @@
package Entity;
public class Stuff extends Entity{
public Stuff(String name) {
super(name);
//TODO Auto-generated constructor stub
}
}

View File

@ -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
}
}

View File

@ -0,0 +1,5 @@
package Screen;
public class ScreenBattle {
}

View File

@ -0,0 +1,5 @@
package Screen;
public class ScreenMap {
}

View File

@ -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(){
}
}

View File

@ -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");
}
}