Skip to content

Commit 66478a4

Browse files
committed
Primo commit, animazioni e input di base.
0 parents  commit 66478a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1350
-0
lines changed

.gitignore

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
## Java
2+
3+
*.class
4+
*.war
5+
*.ear
6+
hs_err_pid*
7+
8+
## GWT
9+
war/
10+
html/war/gwt_bree/
11+
html/gwt-unitCache/
12+
.apt_generated/
13+
html/war/WEB-INF/deploy/
14+
html/war/WEB-INF/classes/
15+
.gwt/
16+
gwt-unitCache/
17+
www-test/
18+
.gwt-tmp/
19+
20+
## Android Studio and Intellij and Android in general
21+
android/libs/armeabi/
22+
android/libs/armeabi-v7a/
23+
android/libs/x86/
24+
android/gen/
25+
.idea/
26+
*.ipr
27+
*.iws
28+
*.iml
29+
out/
30+
com_crashlytics_export_strings.xml
31+
32+
## Eclipse
33+
.classpath
34+
.project
35+
.metadata
36+
**/bin/
37+
tmp/
38+
*.tmp
39+
*.bak
40+
*.swp
41+
*~.nib
42+
local.properties
43+
.settings/
44+
.loadpath
45+
.externalToolBuilders/
46+
*.launch
47+
48+
## NetBeans
49+
**/nbproject/private/
50+
build/
51+
nbbuild/
52+
dist/
53+
nbdist/
54+
nbactions.xml
55+
nb-configuration.xml
56+
57+
## Gradle
58+
59+
.gradle
60+
gradle-app.setting
61+
build/
62+
63+
## OS Specific
64+
.DS_Store

android/AndroidManifest.xml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.panacea.RufusPyramid.android"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="21" />
8+
9+
<application
10+
android:allowBackup="true"
11+
android:icon="@drawable/ic_launcher"
12+
android:label="@string/app_name"
13+
android:theme="@style/GdxTheme" >
14+
<activity
15+
android:name="com.panacea.RufusPyramid.android.AndroidLauncher"
16+
android:label="@string/app_name"
17+
android:screenOrientation="portrait"
18+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
19+
<intent-filter>
20+
<action android:name="android.intent.action.MAIN" />
21+
<category android:name="android.intent.category.LAUNCHER" />
22+
</intent-filter>
23+
</activity>
24+
</application>
25+
26+
</manifest>

android/assets/badlogic.jpg

66.9 KB
Loading
62.2 KB
Loading

android/assets/data/spritesheet2.png

8.37 KB
Loading

android/build.gradle

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
android {
2+
buildToolsVersion "21.1.2"
3+
compileSdkVersion 21
4+
sourceSets {
5+
main {
6+
manifest.srcFile 'AndroidManifest.xml'
7+
java.srcDirs = ['src']
8+
aidl.srcDirs = ['src']
9+
renderscript.srcDirs = ['src']
10+
res.srcDirs = ['res']
11+
assets.srcDirs = ['assets']
12+
jniLibs.srcDirs = ['libs']
13+
}
14+
15+
instrumentTest.setRoot('tests')
16+
}
17+
}
18+
19+
20+
// called every time gradle gets executed, takes the native dependencies of
21+
// the natives configuration, and extracts them to the proper libs/ folders
22+
// so they get packed with the APK.
23+
task copyAndroidNatives() {
24+
file("libs/armeabi/").mkdirs();
25+
file("libs/armeabi-v7a/").mkdirs();
26+
file("libs/x86/").mkdirs();
27+
28+
configurations.natives.files.each { jar ->
29+
def outputDir = null
30+
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
31+
if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
32+
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
33+
if(outputDir != null) {
34+
copy {
35+
from zipTree(jar)
36+
into outputDir
37+
include "*.so"
38+
}
39+
}
40+
}
41+
}
42+
43+
task run(type: Exec) {
44+
def path
45+
def localProperties = project.file("../local.properties")
46+
if (localProperties.exists()) {
47+
Properties properties = new Properties()
48+
localProperties.withInputStream { instr ->
49+
properties.load(instr)
50+
}
51+
def sdkDir = properties.getProperty('sdk.dir')
52+
if (sdkDir) {
53+
path = sdkDir
54+
} else {
55+
path = "$System.env.ANDROID_HOME"
56+
}
57+
} else {
58+
path = "$System.env.ANDROID_HOME"
59+
}
60+
61+
def adb = path + "/platform-tools/adb"
62+
commandLine "$adb", 'shell', 'am', 'start', '-n', 'com.panacea.RufusPyramid.android/com.panacea.RufusPyramid.android.AndroidLauncher'
63+
}
64+
65+
// sets up the Android Eclipse project, using the old Ant based build.
66+
eclipse {
67+
// need to specify Java source sets explicitely, SpringSource Gradle Eclipse plugin
68+
// ignores any nodes added in classpath.file.withXml
69+
sourceSets {
70+
main {
71+
java.srcDirs "src", 'gen'
72+
}
73+
}
74+
75+
jdt {
76+
sourceCompatibility = 1.6
77+
targetCompatibility = 1.6
78+
}
79+
80+
classpath {
81+
plusConfigurations += [ project.configurations.compile ]
82+
containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES'
83+
}
84+
85+
project {
86+
name = appName + "-android"
87+
natures 'com.android.ide.eclipse.adt.AndroidNature'
88+
buildCommands.clear();
89+
buildCommand "com.android.ide.eclipse.adt.ResourceManagerBuilder"
90+
buildCommand "com.android.ide.eclipse.adt.PreCompilerBuilder"
91+
buildCommand "org.eclipse.jdt.core.javabuilder"
92+
buildCommand "com.android.ide.eclipse.adt.ApkBuilder"
93+
}
94+
}
95+
96+
// sets up the Android Idea project, using the old Ant based build.
97+
idea {
98+
module {
99+
sourceDirs += file("src");
100+
scopes = [ COMPILE: [plus:[project.configurations.compile]]]
101+
102+
iml {
103+
withXml {
104+
def node = it.asNode()
105+
def builder = NodeBuilder.newInstance();
106+
builder.current = node;
107+
builder.component(name: "FacetManager") {
108+
facet(type: "android", name: "Android") {
109+
configuration {
110+
option(name: "UPDATE_PROPERTY_FILES", value:"true")
111+
}
112+
}
113+
}
114+
}
115+
}
116+
}
117+
}

android/ic_launcher-web.png

50.2 KB
Loading

android/proguard-project.txt

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}
21+
22+
-verbose
23+
24+
-dontwarn android.support.**
25+
-dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication
26+
-dontwarn com.badlogic.gdx.utils.GdxBuild
27+
-dontwarn com.badlogic.gdx.physics.box2d.utils.Box2DBuild
28+
-dontwarn com.badlogic.gdx.jnigen.BuildTarget*
29+
30+
-keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* {
31+
<init>(com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration);
32+
}
33+
34+
-keepclassmembers class com.badlogic.gdx.physics.box2d.World {
35+
boolean contactFilter(long, long);
36+
void beginContact(long);
37+
void endContact(long);
38+
void preSolve(long, long);
39+
void postSolve(long, long);
40+
boolean reportFixture(long);
41+
float reportRayFixture(long, float, float, float, float, float);
42+
}

android/project.properties

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-19
7.48 KB
Loading
3.69 KB
Loading
12.2 KB
Loading
24.2 KB
Loading

android/res/values/strings.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string name="app_name">Rufus Pyramid</string>
5+
6+
</resources>

android/res/values/styles.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<resources>
2+
3+
<style name="GdxTheme" parent="android:Theme">
4+
<item name="android:windowBackground">@android:color/transparent</item>
5+
<item name="android:colorBackgroundCacheHint">@null</item>
6+
<item name="android:windowAnimationStyle">@android:style/Animation</item>
7+
<item name="android:windowNoTitle">true</item>
8+
<item name="android:windowContentOverlay">@null</item>
9+
<item name="android:windowFullscreen">true</item>
10+
</style>
11+
12+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.panacea.RufusPyramid.android;
2+
3+
import android.os.Bundle;
4+
5+
import com.badlogic.gdx.backends.android.AndroidApplication;
6+
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
7+
import com.panacea.RufusPyramid.main;
8+
9+
public class AndroidLauncher extends AndroidApplication {
10+
@Override
11+
protected void onCreate (Bundle savedInstanceState) {
12+
super.onCreate(savedInstanceState);
13+
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
14+
initialize(new main(), config);
15+
}
16+
}

0 commit comments

Comments
 (0)