Skip to content

Instantly share code, notes, and snippets.

View BrianErikson's full-sized avatar

Brian Erikson BrianErikson

View GitHub Profile
@BrianErikson
BrianErikson / secret.json
Created April 18, 2016 09:53
Example secret.json file for OutcastServer
{
"dbPassword": "123456789"
}
// FILE: root/build.gradle
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
compile "net.dermetfan.libgdx-utils:libgdx-utils:0.10.0"
compile "com.kotcrab.vis:vis-ui:0.7.7"
public class WeaponListener implements BaseComponentListener {
@Override
public void run(ListenerData data) {
ShootToMessage shootTo = (ShootToMessage) data.message;
WeaponComponent wc = (WeaponComponent) data.component;
MovementComponent mc = data.movementComponent;
// problem arises here when there is no access to the player position
// therefore, the bullet angle calculation cannot be done.