-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8f68607
Showing
13 changed files
with
594 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
## Java | ||
|
||
*.class | ||
*.war | ||
*.ear | ||
hs_err_pid* | ||
|
||
## Robovm | ||
/ios/robovm-build/ | ||
|
||
## GWT | ||
/html/war/ | ||
/html/gwt-unitCache/ | ||
.apt_generated/ | ||
.gwt/ | ||
gwt-unitCache/ | ||
www-test/ | ||
.gwt-tmp/ | ||
|
||
## Android Studio and Intellij and Android in general | ||
/android/libs/armeabi/ | ||
/android/libs/armeabi-v7a/ | ||
/android/libs/arm64-v8a/ | ||
/android/libs/x86/ | ||
/android/libs/x86_64/ | ||
/android/gen/ | ||
.idea/ | ||
*.ipr | ||
*.iws | ||
*.iml | ||
/android/out/ | ||
com_crashlytics_export_strings.xml | ||
|
||
## Eclipse | ||
|
||
.classpath | ||
.project | ||
.metadata/ | ||
/android/bin/ | ||
/core/bin/ | ||
/desktop/bin/ | ||
/html/bin/ | ||
/ios/bin/ | ||
/ios-moe/bin/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
.settings/ | ||
.loadpath | ||
.externalToolBuilders/ | ||
*.launch | ||
|
||
## NetBeans | ||
|
||
/nbproject/private/ | ||
/android/nbproject/private/ | ||
/core/nbproject/private/ | ||
/desktop/nbproject/private/ | ||
/html/nbproject/private/ | ||
/ios/nbproject/private/ | ||
/ios-moe/nbproject/private/ | ||
|
||
/build/ | ||
/android/build/ | ||
/core/build/ | ||
/desktop/build/ | ||
/html/build/ | ||
/ios/build/ | ||
/ios-moe/build/ | ||
|
||
/nbbuild/ | ||
/android/nbbuild/ | ||
/core/nbbuild/ | ||
/desktop/nbbuild/ | ||
/html/nbbuild/ | ||
/ios/nbbuild/ | ||
/ios-moe/nbbuild/ | ||
|
||
/dist/ | ||
/android/dist/ | ||
/core/dist/ | ||
/desktop/dist/ | ||
/html/dist/ | ||
/ios/dist/ | ||
/ios-moe/dist/ | ||
|
||
/nbdist/ | ||
/android/nbdist/ | ||
/core/nbdist/ | ||
/desktop/nbdist/ | ||
/html/nbdist/ | ||
/ios/nbdist/ | ||
/ios-moe/nbdist/ | ||
|
||
nbactions.xml | ||
nb-configuration.xml | ||
|
||
## Gradle | ||
|
||
/local.properties | ||
.gradle/ | ||
gradle-app.setting | ||
/build/ | ||
/android/build/ | ||
/core/build/ | ||
/desktop/build/ | ||
/html/build/ | ||
/ios/build/ | ||
/ios-moe/build/ | ||
|
||
## OS Specific | ||
.DS_Store | ||
Thumbs.db | ||
|
||
## iOS | ||
/ios/xcode/*.xcodeproj/* | ||
!/ios/xcode/*.xcodeproj/xcshareddata | ||
!/ios/xcode/*.xcodeproj/project.pbxproj | ||
/ios/xcode/native/ | ||
|
||
/ios-moe/xcode/*.xcodeproj/* | ||
!/ios-moe/xcode/*.xcodeproj/xcshareddata | ||
!/ios-moe/xcode/*.xcodeproj/project.pbxproj | ||
/ios-moe/xcode/native/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
buildscript { | ||
|
||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } | ||
jcenter() | ||
} | ||
dependencies { | ||
|
||
|
||
} | ||
} | ||
|
||
allprojects { | ||
apply plugin: "eclipse" | ||
apply plugin: "idea" | ||
|
||
version = '1.0' | ||
ext { | ||
appName = "my-gdx-game" | ||
gdxVersion = '1.9.8' | ||
roboVMVersion = '2.3.1' | ||
box2DLightsVersion = '1.4' | ||
ashleyVersion = '1.7.0' | ||
aiVersion = '1.8.0' | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } | ||
maven { url "https://oss.sonatype.org/content/repositories/releases/" } | ||
} | ||
} | ||
|
||
project(":desktop") { | ||
apply plugin: "java" | ||
|
||
|
||
dependencies { | ||
compile project(":core") | ||
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" | ||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" | ||
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" | ||
compile "com.badlogicgames.gdx:gdx-controllers-desktop:$gdxVersion" | ||
compile "com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop" | ||
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion" | ||
|
||
} | ||
} | ||
|
||
project(":core") { | ||
apply plugin: "java" | ||
|
||
|
||
dependencies { | ||
compile "com.badlogicgames.gdx:gdx:$gdxVersion" | ||
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" | ||
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion" | ||
compile "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion" | ||
compile "com.badlogicgames.gdx:gdx-ai:$aiVersion" | ||
|
||
} | ||
} | ||
|
||
tasks.eclipse.doLast { | ||
delete ".project" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apply plugin: "java" | ||
|
||
sourceCompatibility = 1.6 | ||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' | ||
|
||
sourceSets.main.java.srcDirs = [ "src/" ] | ||
|
||
|
||
eclipse.project { | ||
name = appName + "-core" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.mygdx.game; | ||
|
||
import com.badlogic.gdx.ApplicationAdapter; | ||
import com.badlogic.gdx.ApplicationListener; | ||
import com.badlogic.gdx.Gdx; | ||
import com.badlogic.gdx.graphics.Color; | ||
import com.badlogic.gdx.graphics.GL20; | ||
import com.badlogic.gdx.graphics.Texture; | ||
import com.badlogic.gdx.graphics.g2d.BitmapFont; | ||
import com.badlogic.gdx.graphics.g2d.SpriteBatch; | ||
|
||
public class MyGdxGame extends ApplicationAdapter { | ||
private SpriteBatch batch; | ||
private BitmapFont font; | ||
|
||
@Override | ||
public void create() { | ||
batch = new SpriteBatch(); | ||
font = new BitmapFont(); | ||
font.setColor(Color.RED); | ||
} | ||
|
||
@Override | ||
public void dispose() { | ||
batch.dispose(); | ||
font.dispose(); | ||
} | ||
|
||
@Override | ||
public void render() { | ||
Gdx.gl.glClearColor(1, 1, 1, 1); | ||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); | ||
|
||
batch.begin(); | ||
font.draw(batch, "Hello World", 200, 200); | ||
batch.end(); | ||
} | ||
|
||
@Override | ||
public void resize(int width, int height) { | ||
} | ||
|
||
@Override | ||
public void pause() { | ||
} | ||
|
||
@Override | ||
public void resume() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apply plugin: "java" | ||
|
||
sourceCompatibility = 1.6 | ||
sourceSets.main.java.srcDirs = [ "src/" ] | ||
|
||
project.ext.mainClassName = "com.mygdx.game.desktop.DesktopLauncher" | ||
project.ext.assetsDir = new File("../core/assets"); | ||
|
||
task run(dependsOn: classes, type: JavaExec) { | ||
main = project.mainClassName | ||
classpath = sourceSets.main.runtimeClasspath | ||
standardInput = System.in | ||
workingDir = project.assetsDir | ||
ignoreExitValue = true | ||
} | ||
|
||
task debug(dependsOn: classes, type: JavaExec) { | ||
main = project.mainClassName | ||
classpath = sourceSets.main.runtimeClasspath | ||
standardInput = System.in | ||
workingDir = project.assetsDir | ||
ignoreExitValue = true | ||
debug = true | ||
} | ||
|
||
task dist(type: Jar) { | ||
from files(sourceSets.main.output.classesDir) | ||
from files(sourceSets.main.output.resourcesDir) | ||
from {configurations.compile.collect {zipTree(it)}} | ||
from files(project.assetsDir); | ||
|
||
manifest { | ||
attributes 'Main-Class': project.mainClassName | ||
} | ||
} | ||
|
||
dist.dependsOn classes | ||
|
||
eclipse { | ||
project { | ||
name = appName + "-desktop" | ||
linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/core/assets' | ||
} | ||
} | ||
|
||
task afterEclipseImport(description: "Post processing after project generation", group: "IDE") { | ||
doLast { | ||
def classpath = new XmlParser().parse(file(".classpath")) | ||
new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]); | ||
def writer = new FileWriter(file(".classpath")) | ||
def printer = new XmlNodePrinter(new PrintWriter(writer)) | ||
printer.setPreserveWhitespace(true) | ||
printer.print(classpath) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.mygdx.game.desktop; | ||
|
||
import com.badlogic.gdx.backends.lwjgl.LwjglApplication; | ||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; | ||
import com.mygdx.game.MyGdxGame; | ||
|
||
public class DesktopLauncher { | ||
public static void main (String[] arg) { | ||
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); | ||
|
||
config.title = "hello-world"; | ||
config.width = 1280; | ||
config.height = 800; | ||
|
||
new LwjglApplication(new MyGdxGame(), config); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
org.gradle.daemon=true | ||
org.gradle.jvmargs=-Xms128m -Xmx1500m | ||
org.gradle.configureondemand=true |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Fri Jun 09 23:06:52 EDT 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip |
Oops, something went wrong.