GameLoop and some skeleton classes
This commit is contained in:
27
core/src/com/darkrp2d/entities/Character.java
Normal file
27
core/src/com/darkrp2d/entities/Character.java
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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.darkrp2d.entities;
|
||||
|
||||
import com.badlogic.ashley.core.Entity;
|
||||
import com.darkrp2d.entities.components.PositionComponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Julian
|
||||
*/
|
||||
public class Character {
|
||||
|
||||
//Singletone
|
||||
private static Entity character;
|
||||
public static Entity create() {
|
||||
if(character == null) {
|
||||
character = new Entity();
|
||||
character.add(new PositionComponent());
|
||||
}
|
||||
return character;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user