mirror of
				https://github.com/Klagarge/PokeHES.git
				synced 2025-11-04 13:19:17 +00:00 
			
		
		
		
	convert with lib
This commit is contained in:
		
							
								
								
									
										16
									
								
								src/Entity/Character.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								src/Entity/Character.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +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);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										25
									
								
								src/Entity/Enemy.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								src/Entity/Enemy.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +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
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										20
									
								
								src/Entity/Entity.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/Entity/Entity.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +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;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										31
									
								
								src/Entity/Player.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								src/Entity/Player.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +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
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								src/Entity/Stuff.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/Entity/Stuff.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
package Entity;
 | 
			
		||||
 | 
			
		||||
public class Stuff extends Entity{
 | 
			
		||||
 | 
			
		||||
    public Stuff(String name) {
 | 
			
		||||
        super(name);
 | 
			
		||||
        //TODO Auto-generated constructor stub
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user