├── .classpath
├── .gitignore
├── .project
├── .settings
└── gradle
│ ├── org.springsource.ide.eclipse.gradle.core.import.prefs
│ ├── org.springsource.ide.eclipse.gradle.core.prefs
│ └── org.springsource.ide.eclipse.gradle.refresh.prefs
├── LICENSE
├── README.md
├── android
├── .classpath
├── .gitignore
├── .project
├── .settings
│ ├── gradle
│ │ ├── org.springsource.ide.eclipse.gradle.core.prefs
│ │ └── org.springsource.ide.eclipse.gradle.refresh.prefs
│ ├── net.sf.jautodoc.prefs
│ ├── org.eclipse.jdt.core.prefs
│ └── org.eclipse.jdt.ui.prefs
├── AndroidManifest.xml
├── assets
│ ├── data
│ │ ├── ma
│ │ │ └── game
│ │ │ │ ├── backgrounds
│ │ │ │ ├── backgrounds.atlas
│ │ │ │ ├── backgrounds.png
│ │ │ │ ├── backgrounds2.png
│ │ │ │ └── backgrounds3.png
│ │ │ │ ├── characters
│ │ │ │ ├── Hero.atlas
│ │ │ │ ├── Hero.png
│ │ │ │ ├── Hero2.png
│ │ │ │ ├── Hero3.png
│ │ │ │ ├── monster1.atlas
│ │ │ │ ├── monster1.png
│ │ │ │ ├── monster2.atlas
│ │ │ │ ├── monster2.png
│ │ │ │ ├── monster22.png
│ │ │ │ ├── monster3.atlas
│ │ │ │ ├── monster3.png
│ │ │ │ ├── monster32.png
│ │ │ │ ├── monster4.atlas
│ │ │ │ ├── monster4.png
│ │ │ │ ├── monster42.png
│ │ │ │ ├── monster5.atlas
│ │ │ │ ├── monster5.png
│ │ │ │ ├── monster52.png
│ │ │ │ ├── monster6.atlas
│ │ │ │ ├── monster6.png
│ │ │ │ ├── monster7.atlas
│ │ │ │ ├── monster7.png
│ │ │ │ ├── monster8.atlas
│ │ │ │ └── monster8.png
│ │ │ │ ├── game
│ │ │ │ ├── Game_assets.atlas
│ │ │ │ ├── Game_assets.png
│ │ │ │ ├── Game_assets2.png
│ │ │ │ ├── Game_assets3.png
│ │ │ │ ├── Game_assets4.png
│ │ │ │ ├── Game_assets5.png
│ │ │ │ └── Game_assets6.png
│ │ │ │ ├── levels
│ │ │ │ ├── Level1.atlas
│ │ │ │ ├── Level1.png
│ │ │ │ ├── Level12.png
│ │ │ │ ├── Level2.atlas
│ │ │ │ ├── Level2.png
│ │ │ │ ├── Level22.png
│ │ │ │ ├── Level3.atlas
│ │ │ │ ├── Level3.png
│ │ │ │ ├── Level32.png
│ │ │ │ ├── Level4.atlas
│ │ │ │ ├── Level4.png
│ │ │ │ ├── Level42.png
│ │ │ │ ├── Level5.atlas
│ │ │ │ ├── Level5.png
│ │ │ │ ├── Level52.png
│ │ │ │ ├── Level6.atlas
│ │ │ │ ├── Level6.png
│ │ │ │ ├── Level7.atlas
│ │ │ │ ├── Level7.png
│ │ │ │ ├── Level72.png
│ │ │ │ ├── Level8.atlas
│ │ │ │ └── Level8.png
│ │ │ │ └── ui
│ │ │ │ ├── UI_assets.atlas
│ │ │ │ ├── UI_assets.png
│ │ │ │ ├── UI_assets2.png
│ │ │ │ ├── chapters.atlas
│ │ │ │ ├── chapters.png
│ │ │ │ ├── chapters2.png
│ │ │ │ └── chapters3.png
│ │ └── mtx
│ │ │ └── samples
│ │ │ ├── core
│ │ │ ├── bgmtx.jpg
│ │ │ ├── font2.fnt
│ │ │ ├── font2.png
│ │ │ ├── imageatlas.png
│ │ │ └── imageatlas.txt
│ │ │ ├── gameworld
│ │ │ ├── imageatlas.png
│ │ │ └── imageatlas.txt
│ │ │ └── jungle
│ │ │ ├── imageatlas.png
│ │ │ └── imageatlas.txt
│ ├── menu_back.jpg
│ ├── skin
│ │ ├── cartwheel.fnt
│ │ ├── cartwheel.png
│ │ ├── default.fnt
│ │ ├── default.png
│ │ ├── uiskin.atlas
│ │ ├── uiskin.json
│ │ ├── uiskin.png
│ │ ├── verdana39.fnt
│ │ └── verdana39.png
│ └── title.png
├── build.gradle
├── ic_launcher-web.png
├── lint.xml
├── proguard-project.txt
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ ├── drawable-xxxhdpi
│ │ └── ic_launcher.png
│ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── sawan
│ └── mathattack
│ └── android
│ └── AndroidLauncher.java
├── build.gradle
├── core
├── .classpath
├── .project
├── .settings
│ ├── gradle
│ │ ├── org.springsource.ide.eclipse.gradle.core.prefs
│ │ └── org.springsource.ide.eclipse.gradle.refresh.prefs
│ ├── net.sf.jautodoc.prefs
│ ├── org.eclipse.jdt.core.prefs
│ └── org.eclipse.jdt.ui.prefs
├── bin
│ ├── .gitignore
│ └── MAGame.gwt.xml
├── build.gradle
└── src
│ ├── MAGame.gwt.xml
│ └── com
│ └── sawan
│ └── mathattack
│ ├── MainStarter.java
│ ├── android
│ ├── IAdController.java
│ ├── IAdControllerAdMob.java
│ ├── IAdControllerAirpush.java
│ ├── IAdControllerAppBrain.java
│ ├── IAdControllerLeadbolt.java
│ ├── IAdControllerTapjoy.java
│ ├── IAndroidIntents.java
│ ├── IAndroidObject.java
│ ├── IOpenFeint.java
│ ├── IScoreLoop.java
│ └── ISwarm.java
│ ├── animation
│ └── AnimationCreator.java
│ ├── asset
│ ├── AbstractAssets.java
│ ├── Backgrounds.java
│ ├── ChaptersAssets.java
│ ├── GameAssets.java
│ ├── HeroAssests.java
│ ├── MonsterAssets.java
│ ├── UIAssets.java
│ └── levels
│ │ └── MALevelAssets.java
│ ├── buttons
│ ├── ButtonLevel.java
│ ├── GameButton.java
│ └── MathAttackButton.java
│ ├── collision
│ └── CollisionDetector.java
│ ├── constants
│ └── MAConstants.java
│ ├── effects
│ └── EffectCreator.java
│ ├── game
│ ├── AbstractGame.java
│ ├── AbstractGameManager.java
│ ├── GameState.java
│ ├── helpers
│ │ └── MAGameScreenMenu.java
│ ├── layers
│ │ ├── World.java
│ │ ├── WorldLayerActors.java
│ │ ├── WorldLayerBG.java
│ │ └── WorldLayerOther.java
│ ├── managers
│ │ └── MAGameManager.java
│ └── screen
│ │ └── MAGameScreen.java
│ ├── game_screens
│ ├── chapters
│ │ └── MAChapterScreen.java
│ ├── credits
│ │ └── MACreditsScreen.java
│ ├── levels
│ │ └── MALevelScreen.java
│ └── main
│ │ ├── MAMainMenuScreen.java
│ │ └── helpers
│ │ ├── MAMainMenuButtons.java
│ │ └── MAMainMenuEnviroment.java
│ ├── input
│ └── InputIntent.java
│ ├── interfaces
│ ├── IAssets.java
│ ├── IAudioManager.java
│ ├── IGame.java
│ ├── IGameManager.java
│ ├── IGameScreen.java
│ ├── IGameSettingManager.java
│ ├── IScreen.java
│ └── IScreenLoading.java
│ ├── managers
│ ├── AudioManager.java
│ ├── BenchmarkManager.java
│ ├── FileManager.java
│ ├── MusicManager.java
│ ├── SettingsManager.java
│ ├── TiltManager.java
│ └── VibrationManager.java
│ ├── math
│ ├── Addition.java
│ ├── IQuestion.java
│ ├── Multiplication.java
│ ├── QuestionsSettings.java
│ ├── QuestionsUtils.java
│ └── Subtraction.java
│ ├── models
│ ├── EmptyActor.java
│ ├── EmptyActorLight.java
│ ├── EmptyGroup.java
│ ├── EmptyGroupLight.java
│ ├── SmartActor.java
│ ├── SmartGroup.java
│ ├── ammunition
│ │ └── Bullet.java
│ └── characters
│ │ ├── Hero.java
│ │ └── enemies
│ │ └── MAMonster.java
│ ├── scene2d
│ ├── AbstractActor.java
│ ├── AbstractActorLight.java
│ ├── AbstractGroup.java
│ ├── AbstractGroupLight.java
│ ├── AbstractWorldScene2d.java
│ └── ui
│ │ ├── AbstractButton.java
│ │ ├── ButtonGame.java
│ │ ├── ButtonLight.java
│ │ ├── ButtonSlider.java
│ │ ├── ButtonToggle.java
│ │ ├── MenuCreator.java
│ │ ├── TableModel.java
│ │ └── Text.java
│ ├── screen
│ ├── AbstractScreen.java
│ └── AbstractScreenLoading.java
│ ├── settings
│ ├── AppSettings.java
│ └── MtxLogger.java
│ └── utils
│ ├── UtilsActor.java
│ ├── UtilsAssets.java
│ ├── UtilsDevice.java
│ ├── UtilsDisposer.java
│ ├── UtilsNumbers.java
│ ├── UtilsOrigin.java
│ ├── UtilsPositioner.java
│ ├── UtilsRandomizer.java
│ └── UtilsString.java
├── desktop
├── .classpath
├── .project
├── .settings
│ ├── gradle
│ │ ├── org.springsource.ide.eclipse.gradle.core.prefs
│ │ └── org.springsource.ide.eclipse.gradle.refresh.prefs
│ ├── net.sf.jautodoc.prefs
│ ├── org.eclipse.jdt.core.prefs
│ └── org.eclipse.jdt.ui.prefs
├── add.data
├── bin
│ └── .gitignore
├── build.gradle
├── mult.data
├── profile.data
├── src
│ └── com
│ │ └── sawan
│ │ └── mathattack
│ │ └── desktop
│ │ └── DesktopLauncher.java
└── sub.data
├── gradle.properties
├── gradle
├── .classpath
├── .project
├── .settings
│ └── gradle
│ │ ├── org.springsource.ide.eclipse.gradle.core.import.prefs
│ │ ├── org.springsource.ide.eclipse.gradle.core.prefs
│ │ └── org.springsource.ide.eclipse.gradle.refresh.prefs
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── html
├── .classpath
├── .project
├── .settings
│ ├── com.google.gdt.eclipse.core.prefs
│ ├── gradle
│ │ ├── org.springsource.ide.eclipse.gradle.core.prefs
│ │ └── org.springsource.ide.eclipse.gradle.refresh.prefs
│ ├── net.sf.jautodoc.prefs
│ ├── org.eclipse.jdt.core.prefs
│ └── org.eclipse.jdt.ui.prefs
├── build.gradle
├── src
│ └── com
│ │ └── sawan
│ │ └── mathattack
│ │ ├── GdxDefinition.gwt.xml
│ │ ├── GdxDefinitionSuperdev.gwt.xml
│ │ └── client
│ │ └── HtmlLauncher.java
└── webapp
│ ├── WEB-INF
│ └── web.xml
│ ├── index.html
│ ├── refresh.png
│ ├── soundmanager2-jsmin.js
│ ├── soundmanager2-setup.js
│ └── styles.css
├── local.properties
└── settings.gradle
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
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 | ## NetBeans
33 | **/nbproject/private/
34 | build/
35 | nbbuild/
36 | dist/
37 | nbdist/
38 | nbactions.xml
39 | nb-configuration.xml
40 |
41 | ## Gradle
42 |
43 | .gradle
44 | gradle-app.setting
45 | build/
46 |
47 | ## OS Specific
48 | .DS_Store
49 | /bin
50 |
51 | *.properties
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MathAttack
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.springsource.ide.eclipse.gradle.core.nature
16 | org.eclipse.jdt.core.javanature
17 |
18 |
19 |
20 | 1427752462640
21 |
22 | 26
23 |
24 | org.eclipse.ui.ide.orFilterMatcher
25 |
26 |
27 | org.eclipse.ui.ide.multiFilter
28 | 1.0-projectRelativePath-equals-true-false-core
29 |
30 |
31 | org.eclipse.ui.ide.multiFilter
32 | 1.0-projectRelativePath-equals-true-false-desktop
33 |
34 |
35 | org.eclipse.ui.ide.multiFilter
36 | 1.0-projectRelativePath-equals-true-false-android
37 |
38 |
39 | org.eclipse.ui.ide.multiFilter
40 | 1.0-projectRelativePath-equals-true-false-html
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/.settings/gradle/org.springsource.ide.eclipse.gradle.core.import.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleImportPreferences
2 | #Mon Mar 30 22:48:12 BST 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | enableDependendencyManagement=true
10 | projects=;android;core;desktop;html;
11 |
--------------------------------------------------------------------------------
/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
2 | #Mon Mar 30 22:48:33 BST 2015
3 | build.family.org.gradle.tooling.model.eclipse.HierarchicalEclipseProject=;android;core;desktop;html;
4 | org.springsource.ide.eclipse.gradle.linkedresources=
5 | org.springsource.ide.eclipse.gradle.rootprojectloc=
6 |
--------------------------------------------------------------------------------
/.settings/gradle/org.springsource.ide.eclipse.gradle.refresh.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
2 | #Mon Mar 30 22:48:33 BST 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | useHierarchicalNames=false
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | ==========
3 |
4 | Mathattack is a game for cross-platform such as html, android, desktop. Based for educational purposes, this games offers our new generation to learn calculus while having fun and getting completed all the levels.
5 |
6 | On the other hand the motor of this project is Libgdx, a powerful framework to create games.
7 | * version: 1.0
8 | * development blog: [Math Attack blog](http://mathattackgame.wordpress.com/)
9 | * desktop release: [Desktop](https://github.com/alu0100694765/MathAttack/releases)
10 | * android release: [MATHATTACK](https://play.google.com/store/apps/details?id=com.sawan.mathattack.android&hl=es)
11 |
12 | ## [Colaborators](https://github.com/alu0100694765/Knapsack/graphs/contributors)
13 | Sawan Jagdish Kapai Harpalani. Contact:
14 |
15 | ## [License](http://www.gnu.org/licenses/gpl-3.0.html) 
16 | This project is under GNU license.
17 |
18 | > Math Attack is free software: you can redistribute it
19 | > and/or modify it under the terms of the GNU General
20 | > Public License as published by the Free Software
21 | > Foundation, either version 3 of the License,
22 | > or (at your option) any later version.
23 | > Math Attack is distributed in the hope that it will
24 | > be useful, but WITHOUT ANY WARRANTY; without even
25 | > the implied warranty of MERCHANTABILITY or FITNESS
26 | > FOR A PARTICULAR PURPOSE. See the GNU General Public
27 | > License for more details.
28 | > You should have received a copy of the GNU General
29 | > Public License along with Math Attack. If not, see
30 | > http://www.gnu.org/licenses/.
31 |
32 | ## [Libgdx](http://libgdx.badlogicgames.com/)
33 |
34 | libGDX is a game-development application framework written in the Java programming language with some C and C++ components for performance dependent code. It allows for the development of desktop and mobile games by using the same code base. It is cross-platform, supporting Windows, Linux, Mac OS X, Android, iOS, and web browsers with WebGL support.
35 |
36 | ## [MoribitoTech](http://moribitotechx.blogspot.com.es/)
37 | Especial thanks to MoribitoTechX for developing a framework called Mtx which is open source and available by clicking the following [MTX](https://github.com/moribitotech/MTX).
38 |
39 | This project has used this framework as a project template and the Math Attack team gives the whole credit to the developers of MTX. Also clearing that most of the initial code has been used from MTX and we do not take any CREDIT of creating it.
40 |
41 | ## Importing Your Project
42 |
43 | Go to File -> Import -> Gradle -> Gradle Project, click Browse and navigate to the root folder of your project, then click Build Model. After a while, you'll see a root project and subprojects (android, core, desktop, html, ios). Select all the projects and click Finish. Note that this process can take a minute or two the first time you do it, as Gradle and some dependencies will be downloaded in the background.
44 |
45 | Note: If you have problems with the file local.properties just modify it and add your android sdk path and then hit build model. Solved.
46 |
--------------------------------------------------------------------------------
/android/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MathAttack-android
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | org.springsource.ide.eclipse.gradle.core.nature
31 | org.eclipse.jdt.core.javanature
32 | com.android.ide.eclipse.adt.AndroidNature
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
2 | #Mon Mar 30 22:48:35 BST 2015
3 | org.springsource.ide.eclipse.gradle.linkedresources=
4 | org.springsource.ide.eclipse.gradle.rootprojectloc=..
5 |
--------------------------------------------------------------------------------
/android/.settings/gradle/org.springsource.ide.eclipse.gradle.refresh.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
2 | #Mon Jan 19 17:02:16 GMT 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | useHierarchicalNames=false
10 |
--------------------------------------------------------------------------------
/android/.settings/net.sf.jautodoc.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | header_text=/**\r\n * File name\:\t${file_name}\r\n * Version\:\t\t1.0\r\n * Date\:\t\t${date} ${time}\r\n * Author\:\t\t${user}\r\n * Copyright\:\tCopyright 200X ${user}\r\n *\r\n *\t\t\t\tThis file is part of Math Attack.\r\n *\r\n *\t\t\t\tMath Attack is free software\: you can redistribute it \r\n *\t\t\t\tand/or modify it under the terms of the GNU General\r\n *\t\t\t\tPublic License as published by the Free Software \r\n *\t\t\t\tFoundation, either version 3 of the License, \r\n *\t\t\t\tor (at your option) any later version.\r\n *\r\n *\t\t\t\tMath Attack is distributed in the hope that it will \r\n *\t\t\t\tbe useful, but WITHOUT ANY WARRANTY; without even \r\n *\t\t\t\tthe implied warranty of MERCHANTABILITY or FITNESS \r\n *\t\t\t\tFOR A PARTICULAR PURPOSE. See the GNU General Public\r\n *\t\t\t License for more details.\r\n *\r\n *\t\t\t\tYou should have received a copy of the GNU General \r\n *\t\t\t\tPublic License along with Math Attack. If not, see \r\n *\t\t\t\thttp\://www.gnu.org/licenses/.\r\n */
3 | project_specific_settings=true
4 | properties=date,
5 | properties.date=@date
6 | replacements=\n\n\nGets the\nSets the\nAdds the\nEdits the\nRemoves the\nInits the\nParses the\nCreates the\nBuilds the\nChecks if is\nPrints the\nChecks for\n\n\n
7 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #
2 | #Mon Mar 30 22:54:21 BST 2015
3 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
7 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
8 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
9 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
10 | eclipse.preferences.version=1
11 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
12 | org.eclipse.jdt.core.compiler.source=1.6
13 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
14 |
--------------------------------------------------------------------------------
/android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/backgrounds/backgrounds.atlas:
--------------------------------------------------------------------------------
1 |
2 | backgrounds.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | menu_background
7 | rotate: false
8 | xy: 1, 1
9 | size: 960, 600
10 | orig: 960, 600
11 | offset: 0, 0
12 | index: -1
13 |
14 | backgrounds2.png
15 | format: RGBA8888
16 | filter: Nearest,Nearest
17 | repeat: none
18 | level_back
19 | rotate: false
20 | xy: 1, 1
21 | size: 900, 600
22 | orig: 900, 600
23 | offset: 0, 0
24 | index: -1
25 |
26 | backgrounds3.png
27 | format: RGBA8888
28 | filter: Nearest,Nearest
29 | repeat: none
30 | credits
31 | rotate: false
32 | xy: 1, 1
33 | size: 900, 568
34 | orig: 900, 568
35 | offset: 0, 0
36 | index: -1
37 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/backgrounds/backgrounds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/backgrounds/backgrounds.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/backgrounds/backgrounds2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/backgrounds/backgrounds2.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/backgrounds/backgrounds3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/backgrounds/backgrounds3.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/Hero.atlas:
--------------------------------------------------------------------------------
1 |
2 | Hero.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | faint
7 | rotate: false
8 | xy: 1, 512
9 | size: 530, 437
10 | orig: 530, 437
11 | offset: 0, 0
12 | index: 1
13 | dizzy
14 | rotate: false
15 | xy: 1, 1
16 | size: 336, 509
17 | orig: 336, 509
18 | offset: 0, 0
19 | index: 1
20 | dizzy
21 | rotate: false
22 | xy: 339, 1
23 | size: 336, 509
24 | orig: 336, 509
25 | offset: 0, 0
26 | index: 2
27 | stand
28 | rotate: false
29 | xy: 533, 518
30 | size: 303, 431
31 | orig: 303, 431
32 | offset: 0, 0
33 | index: 1
34 | jump
35 | rotate: false
36 | xy: 677, 58
37 | size: 329, 458
38 | orig: 329, 458
39 | offset: 0, 0
40 | index: 1
41 |
42 | Hero2.png
43 | format: RGBA8888
44 | filter: Nearest,Nearest
45 | repeat: none
46 | faint
47 | rotate: false
48 | xy: 1, 455
49 | size: 530, 437
50 | orig: 530, 437
51 | offset: 0, 0
52 | index: 2
53 | faint
54 | rotate: false
55 | xy: 1, 16
56 | size: 530, 437
57 | orig: 530, 437
58 | offset: 0, 0
59 | index: 3
60 | jump
61 | rotate: false
62 | xy: 533, 434
63 | size: 329, 458
64 | orig: 329, 458
65 | offset: 0, 0
66 | index: 2
67 | stand
68 | rotate: false
69 | xy: 533, 1
70 | size: 303, 431
71 | orig: 303, 431
72 | offset: 0, 0
73 | index: 2
74 |
75 | Hero3.png
76 | format: RGBA8888
77 | filter: Nearest,Nearest
78 | repeat: none
79 | faint
80 | rotate: false
81 | xy: 1, 440
82 | size: 530, 437
83 | orig: 530, 437
84 | offset: 0, 0
85 | index: 4
86 | faint
87 | rotate: false
88 | xy: 1, 1
89 | size: 530, 437
90 | orig: 530, 437
91 | offset: 0, 0
92 | index: 5
93 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/Hero.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/Hero.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/Hero2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/Hero2.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/Hero3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/Hero3.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster1.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster1.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 1
9 | size: 427, 496
10 | orig: 427, 496
11 | offset: 0, 0
12 | index: 1
13 | walking
14 | rotate: false
15 | xy: 430, 1
16 | size: 427, 496
17 | orig: 427, 496
18 | offset: 0, 0
19 | index: 2
20 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster1.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster2.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster2.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 1
9 | size: 683, 611
10 | orig: 683, 611
11 | offset: 0, 0
12 | index: 1
13 |
14 | monster22.png
15 | format: RGBA8888
16 | filter: Nearest,Nearest
17 | repeat: none
18 | walking
19 | rotate: false
20 | xy: 1, 1
21 | size: 683, 611
22 | orig: 683, 611
23 | offset: 0, 0
24 | index: 2
25 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster2.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster22.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster3.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster3.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 1
9 | size: 832, 945
10 | orig: 832, 945
11 | offset: 0, 0
12 | index: 1
13 |
14 | monster32.png
15 | format: RGBA8888
16 | filter: Nearest,Nearest
17 | repeat: none
18 | walking
19 | rotate: false
20 | xy: 1, 1
21 | size: 832, 945
22 | orig: 832, 945
23 | offset: 0, 0
24 | index: 2
25 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster3.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster32.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster4.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster4.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 1
9 | size: 828, 896
10 | orig: 828, 896
11 | offset: 0, 0
12 | index: 1
13 |
14 | monster42.png
15 | format: RGBA8888
16 | filter: Nearest,Nearest
17 | repeat: none
18 | walking
19 | rotate: false
20 | xy: 1, 1
21 | size: 828, 896
22 | orig: 828, 896
23 | offset: 0, 0
24 | index: 2
25 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster4.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster42.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster5.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster5.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 1
9 | size: 539, 588
10 | orig: 539, 588
11 | offset: 0, 0
12 | index: 1
13 |
14 | monster52.png
15 | format: RGBA8888
16 | filter: Nearest,Nearest
17 | repeat: none
18 | walking
19 | rotate: false
20 | xy: 1, 1
21 | size: 539, 588
22 | orig: 539, 588
23 | offset: 0, 0
24 | index: 2
25 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster5.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster52.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster52.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster6.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster6.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 462
9 | size: 540, 459
10 | orig: 540, 459
11 | offset: 0, 0
12 | index: 1
13 | walking
14 | rotate: false
15 | xy: 1, 1
16 | size: 540, 459
17 | orig: 540, 459
18 | offset: 0, 0
19 | index: 2
20 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster6.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster7.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster7.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 1
9 | size: 382, 416
10 | orig: 382, 416
11 | offset: 0, 0
12 | index: 1
13 | walking
14 | rotate: false
15 | xy: 385, 1
16 | size: 382, 416
17 | orig: 382, 416
18 | offset: 0, 0
19 | index: 2
20 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster7.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster8.atlas:
--------------------------------------------------------------------------------
1 |
2 | monster8.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | walking
7 | rotate: false
8 | xy: 1, 1
9 | size: 505, 610
10 | orig: 505, 610
11 | offset: 0, 0
12 | index: 1
13 | walking
14 | rotate: false
15 | xy: 508, 1
16 | size: 505, 610
17 | orig: 505, 610
18 | offset: 0, 0
19 | index: 2
20 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/characters/monster8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/characters/monster8.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/game/Game_assets.atlas:
--------------------------------------------------------------------------------
1 |
2 | Game_assets.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | eraser
7 | rotate: false
8 | xy: 1, 446
9 | size: 512, 512
10 | orig: 512, 512
11 | offset: 0, 0
12 | index: -1
13 | heart
14 | rotate: false
15 | xy: 1, 1
16 | size: 494, 443
17 | orig: 494, 443
18 | offset: 0, 0
19 | index: 1
20 | heart
21 | rotate: false
22 | xy: 515, 515
23 | size: 494, 443
24 | orig: 494, 443
25 | offset: 0, 0
26 | index: 2
27 | heart
28 | rotate: false
29 | xy: 515, 70
30 | size: 494, 443
31 | orig: 494, 443
32 | offset: 0, 0
33 | index: 3
34 | pause
35 | rotate: false
36 | xy: 497, 4
37 | size: 64, 64
38 | orig: 64, 64
39 | offset: 0, 0
40 | index: -1
41 |
42 | Game_assets2.png
43 | format: RGBA8888
44 | filter: Nearest,Nearest
45 | repeat: none
46 | pencil
47 | rotate: false
48 | xy: 1, 446
49 | size: 512, 512
50 | orig: 512, 512
51 | offset: 0, 0
52 | index: -1
53 | heart
54 | rotate: false
55 | xy: 1, 1
56 | size: 494, 443
57 | orig: 494, 443
58 | offset: 0, 0
59 | index: 4
60 | heart
61 | rotate: false
62 | xy: 515, 515
63 | size: 494, 443
64 | orig: 494, 443
65 | offset: 0, 0
66 | index: 5
67 | heart
68 | rotate: false
69 | xy: 515, 70
70 | size: 494, 443
71 | orig: 494, 443
72 | offset: 0, 0
73 | index: 6
74 |
75 | Game_assets3.png
76 | format: RGBA8888
77 | filter: Nearest,Nearest
78 | repeat: none
79 | ruler
80 | rotate: false
81 | xy: 1, 446
82 | size: 512, 512
83 | orig: 512, 512
84 | offset: 0, 0
85 | index: -1
86 | heart
87 | rotate: false
88 | xy: 1, 1
89 | size: 494, 443
90 | orig: 494, 443
91 | offset: 0, 0
92 | index: 7
93 | heart
94 | rotate: false
95 | xy: 515, 515
96 | size: 494, 443
97 | orig: 494, 443
98 | offset: 0, 0
99 | index: 8
100 |
101 | Game_assets4.png
102 | format: RGBA8888
103 | filter: Nearest,Nearest
104 | repeat: none
105 | scissors
106 | rotate: false
107 | xy: 1, 1
108 | size: 512, 512
109 | orig: 512, 512
110 | offset: 0, 0
111 | index: -1
112 |
113 | Game_assets5.png
114 | format: RGBA8888
115 | filter: Nearest,Nearest
116 | repeat: none
117 | semicircle
118 | rotate: false
119 | xy: 1, 1
120 | size: 512, 512
121 | orig: 512, 512
122 | offset: 0, 0
123 | index: -1
124 |
125 | Game_assets6.png
126 | format: RGBA8888
127 | filter: Nearest,Nearest
128 | repeat: none
129 | trianguler
130 | rotate: false
131 | xy: 1, 1
132 | size: 512, 512
133 | orig: 512, 512
134 | offset: 0, 0
135 | index: -1
136 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/game/Game_assets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/game/Game_assets.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/game/Game_assets2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/game/Game_assets2.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/game/Game_assets3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/game/Game_assets3.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/game/Game_assets4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/game/Game_assets4.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/game/Game_assets5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/game/Game_assets5.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/game/Game_assets6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/game/Game_assets6.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level1.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level1.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | mountains
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | sky
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
21 | Level12.png
22 | format: RGBA8888
23 | filter: Nearest,Nearest
24 | repeat: none
25 | soil
26 | rotate: false
27 | xy: 1, 331
28 | size: 900, 450
29 | orig: 900, 450
30 | offset: 0, 0
31 | index: -1
32 | clouds
33 | rotate: false
34 | xy: 1, 1
35 | size: 990, 328
36 | orig: 990, 328
37 | offset: 0, 0
38 | index: -1
39 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level1.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level12.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level2.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level2.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | mountains
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | sky
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
21 | Level22.png
22 | format: RGBA8888
23 | filter: Nearest,Nearest
24 | repeat: none
25 | soil
26 | rotate: false
27 | xy: 1, 1
28 | size: 900, 450
29 | orig: 900, 450
30 | offset: 0, 0
31 | index: -1
32 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level2.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level22.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level3.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level3.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | mountains
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | sky
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
21 | Level32.png
22 | format: RGBA8888
23 | filter: Nearest,Nearest
24 | repeat: none
25 | soil
26 | rotate: false
27 | xy: 1, 1
28 | size: 900, 450
29 | orig: 900, 450
30 | offset: 0, 0
31 | index: -1
32 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level3.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level32.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level4.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level4.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | mountains
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | sky
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
21 | Level42.png
22 | format: RGBA8888
23 | filter: Nearest,Nearest
24 | repeat: none
25 | soil
26 | rotate: false
27 | xy: 1, 1
28 | size: 900, 450
29 | orig: 900, 450
30 | offset: 0, 0
31 | index: -1
32 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level4.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level42.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level5.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level5.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | mountains
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | sky
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
21 | Level52.png
22 | format: RGBA8888
23 | filter: Nearest,Nearest
24 | repeat: none
25 | soil
26 | rotate: false
27 | xy: 1, 1
28 | size: 900, 450
29 | orig: 900, 450
30 | offset: 0, 0
31 | index: -1
32 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level5.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level52.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level52.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level6.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level6.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | sky
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | soil
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level6.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level7.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level7.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | mountains
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | sky
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
21 | Level72.png
22 | format: RGBA8888
23 | filter: Nearest,Nearest
24 | repeat: none
25 | soil
26 | rotate: false
27 | xy: 1, 1
28 | size: 900, 450
29 | orig: 900, 450
30 | offset: 0, 0
31 | index: -1
32 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level7.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level72.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level8.atlas:
--------------------------------------------------------------------------------
1 |
2 | Level8.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | sky
7 | rotate: false
8 | xy: 1, 453
9 | size: 900, 450
10 | orig: 900, 450
11 | offset: 0, 0
12 | index: -1
13 | soil
14 | rotate: false
15 | xy: 1, 1
16 | size: 900, 450
17 | orig: 900, 450
18 | offset: 0, 0
19 | index: -1
20 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/levels/Level8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/levels/Level8.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/ui/UI_assets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/ui/UI_assets.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/ui/UI_assets2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/ui/UI_assets2.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/ui/chapters.atlas:
--------------------------------------------------------------------------------
1 |
2 | chapters.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | additions
7 | rotate: false
8 | xy: 1, 1
9 | size: 600, 528
10 | orig: 600, 528
11 | offset: 0, 0
12 | index: -1
13 |
14 | chapters2.png
15 | format: RGBA8888
16 | filter: Nearest,Nearest
17 | repeat: none
18 | multiplications
19 | rotate: false
20 | xy: 1, 1
21 | size: 600, 528
22 | orig: 600, 528
23 | offset: 0, 0
24 | index: -1
25 |
26 | chapters3.png
27 | format: RGBA8888
28 | filter: Nearest,Nearest
29 | repeat: none
30 | substractions
31 | rotate: false
32 | xy: 1, 1
33 | size: 600, 528
34 | orig: 600, 528
35 | offset: 0, 0
36 | index: -1
37 |
--------------------------------------------------------------------------------
/android/assets/data/ma/game/ui/chapters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/ui/chapters.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/ui/chapters2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/ui/chapters2.png
--------------------------------------------------------------------------------
/android/assets/data/ma/game/ui/chapters3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/ma/game/ui/chapters3.png
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/core/bgmtx.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/mtx/samples/core/bgmtx.jpg
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/core/font2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/mtx/samples/core/font2.png
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/core/imageatlas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/mtx/samples/core/imageatlas.png
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/core/imageatlas.txt:
--------------------------------------------------------------------------------
1 | imageatlas.png
2 | format: RGBA8888
3 | filter: Linear,Linear
4 | repeat: none
5 | batsanta
6 | rotate: false
7 | xy: 1871, 1
8 | size: 100, 100
9 | orig: 100, 100
10 | offset: 0, 0
11 | index: 5
12 | batsanta
13 | rotate: false
14 | xy: 1, 615
15 | size: 100, 100
16 | orig: 100, 100
17 | offset: 0, 0
18 | index: 1
19 | imgstar
20 | rotate: false
21 | xy: 1, 716
22 | size: 75, 75
23 | orig: 75, 75
24 | offset: 0, 0
25 | index: -1
26 | animbatcircleright
27 | rotate: false
28 | xy: 1, 417
29 | size: 384, 64
30 | orig: 384, 64
31 | offset: 0, 0
32 | index: -1
33 | btnblackbat
34 | rotate: false
35 | xy: 1972, 77
36 | size: 75, 75
37 | orig: 75, 75
38 | offset: 0, 0
39 | index: -1
40 | animhulkbruceaction
41 | rotate: false
42 | xy: 1102, 130
43 | size: 750, 150
44 | orig: 750, 150
45 | offset: 0, 0
46 | index: -1
47 | btnlevelpressed
48 | rotate: false
49 | xy: 1, 792
50 | size: 75, 75
51 | orig: 75, 75
52 | offset: 0, 0
53 | index: -1
54 | imgbat
55 | rotate: false
56 | xy: 102, 483
57 | size: 63, 64
58 | orig: 63, 64
59 | offset: 0, 0
60 | index: -1
61 | btnallmenupressed
62 | rotate: false
63 | xy: 1488, 349
64 | size: 250, 67
65 | orig: 250, 67
66 | offset: 0, 0
67 | index: -1
68 | batsanta
69 | rotate: false
70 | xy: 1871, 102
71 | size: 100, 100
72 | orig: 100, 100
73 | offset: 0, 0
74 | index: 4
75 | batsanta
76 | rotate: false
77 | xy: 1, 483
78 | size: 100, 100
79 | orig: 100, 100
80 | offset: 0, 0
81 | index: 0
82 | animhulkbruce
83 | rotate: false
84 | xy: 1, 1
85 | size: 1100, 400
86 | orig: 1100, 400
87 | offset: 0, 0
88 | index: -1
89 | btnlevel
90 | rotate: false
91 | xy: 1, 868
92 | size: 75, 75
93 | orig: 75, 75
94 | offset: 0, 0
95 | index: -1
96 | batsanta
97 | rotate: false
98 | xy: 1739, 281
99 | size: 100, 100
100 | orig: 100, 100
101 | offset: 0, 0
102 | index: 3
103 | btnbatcirclepressed
104 | rotate: false
105 | xy: 1, 944
106 | size: 75, 75
107 | orig: 75, 75
108 | offset: 0, 0
109 | index: -1
110 | btnblackbatpressed
111 | rotate: false
112 | xy: 1972, 1
113 | size: 75, 75
114 | orig: 75, 75
115 | offset: 0, 0
116 | index: -1
117 | animbatblackflyright
118 | rotate: false
119 | xy: 1102, 281
120 | size: 385, 64
121 | orig: 385, 64
122 | offset: 0, 0
123 | index: -1
124 | batsanta
125 | rotate: false
126 | xy: 1739, 382
127 | size: 100, 100
128 | orig: 100, 100
129 | offset: 0, 0
130 | index: 2
131 | loadinganim
132 | rotate: false
133 | xy: 1102, 1
134 | size: 768, 128
135 | orig: 768, 128
136 | offset: 0, 0
137 | index: -1
138 | animbatflyright
139 | rotate: false
140 | xy: 1102, 346
141 | size: 385, 64
142 | orig: 385, 64
143 | offset: 0, 0
144 | index: -1
145 | btnbatcircle
146 | rotate: false
147 | xy: 77, 716
148 | size: 75, 75
149 | orig: 75, 75
150 | offset: 0, 0
151 | index: -1
152 | btnallmenu
153 | rotate: false
154 | xy: 1488, 281
155 | size: 250, 67
156 | orig: 250, 67
157 | offset: 0, 0
158 | index: -1
159 | imgstarholder
160 | rotate: false
161 | xy: 1972, 153
162 | size: 75, 75
163 | orig: 75, 75
164 | offset: 0, 0
165 | index: -1
166 | transparentblack
167 | rotate: false
168 | xy: 1853, 229
169 | size: 192, 192
170 | orig: 192, 192
171 | offset: 0, 0
172 | index: -1
173 | imgtopapps
174 | rotate: false
175 | xy: 1840, 422
176 | size: 192, 192
177 | orig: 192, 192
178 | offset: 0, 0
179 | index: -1
180 | btnbatlocked
181 | rotate: false
182 | xy: 102, 615
183 | size: 75, 75
184 | orig: 75, 75
185 | offset: 0, 0
186 | index: -1
187 |
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/gameworld/imageatlas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/mtx/samples/gameworld/imageatlas.png
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/gameworld/imageatlas.txt:
--------------------------------------------------------------------------------
1 | imageatlas.png
2 | format: RGBA8888
3 | filter: Linear,Linear
4 | repeat: none
5 | img_btn_play
6 | rotate: false
7 | xy: 1, 800
8 | size: 120, 120
9 | orig: 120, 120
10 | offset: 0, 0
11 | index: -1
12 | anim_green_santa
13 | rotate: false
14 | xy: 233, 671
15 | size: 325, 60
16 | orig: 325, 60
17 | offset: 0, 0
18 | index: -1
19 | img_btn_pause
20 | rotate: false
21 | xy: 122, 800
22 | size: 120, 120
23 | orig: 120, 120
24 | offset: 0, 0
25 | index: -1
26 | img_obj_cloud
27 | rotate: false
28 | xy: 1, 671
29 | size: 231, 128
30 | orig: 231, 128
31 | offset: 0, 0
32 | index: -1
33 | img_bg_1_
34 | rotate: false
35 | xy: 1, 1
36 | size: 960, 540
37 | orig: 960, 540
38 | offset: 0, 0
39 | index: -1
40 | img_obj_snowflake
41 | rotate: false
42 | xy: 962, 1
43 | size: 40, 40
44 | orig: 40, 40
45 | offset: 0, 0
46 | index: -1
47 | img_obj_soil_1_
48 | rotate: false
49 | xy: 1, 921
50 | size: 300, 100
51 | orig: 300, 100
52 | offset: 0, 0
53 | index: -1
54 | anim_black_ghost
55 | rotate: false
56 | xy: 233, 732
57 | size: 325, 60
58 | orig: 325, 60
59 | offset: 0, 0
60 | index: -1
61 | anim_bats
62 | rotate: false
63 | xy: 1, 542
64 | size: 387, 128
65 | orig: 387, 128
66 | offset: 0, 0
67 | index: -1
68 |
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/jungle/imageatlas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/data/mtx/samples/jungle/imageatlas.png
--------------------------------------------------------------------------------
/android/assets/data/mtx/samples/jungle/imageatlas.txt:
--------------------------------------------------------------------------------
1 | imageatlas.png
2 | format: RGBA8888
3 | filter: Linear,Linear
4 | repeat: none
5 | img_obj_text_junglegamemenu
6 | rotate: false
7 | xy: 1, 793
8 | size: 420, 280
9 | orig: 420, 280
10 | offset: 0, 0
11 | index: -1
12 | img_obj_sound_off
13 | rotate: false
14 | xy: 202, 1276
15 | size: 100, 100
16 | orig: 100, 100
17 | offset: 0, 0
18 | index: -1
19 | img_obj_social_facebook
20 | rotate: false
21 | xy: 303, 1336
22 | size: 80, 130
23 | orig: 80, 130
24 | offset: 0, 0
25 | index: -1
26 | img_obj_social_twitter
27 | rotate: false
28 | xy: 323, 1074
29 | size: 80, 130
30 | orig: 80, 130
31 | offset: 0, 0
32 | index: -1
33 | img_obj_circle
34 | rotate: false
35 | xy: 222, 1175
36 | size: 100, 100
37 | orig: 100, 100
38 | offset: 0, 0
39 | index: -1
40 | img_obj_flower_2_
41 | rotate: false
42 | xy: 1, 1215
43 | size: 200, 240
44 | orig: 200, 240
45 | offset: 0, 0
46 | index: -1
47 | img_obj_swipe_up_instructions
48 | rotate: false
49 | xy: 422, 995
50 | size: 220, 140
51 | orig: 220, 140
52 | offset: 0, 0
53 | index: -1
54 | img_bg_1_
55 | rotate: false
56 | xy: 1, 1
57 | size: 960, 540
58 | orig: 960, 540
59 | offset: 0, 0
60 | index: -1
61 | img_obj_btn_settings
62 | rotate: false
63 | xy: 723, 793
64 | size: 300, 100
65 | orig: 300, 100
66 | offset: 0, 0
67 | index: -1
68 | img_obj_flower_1_
69 | rotate: false
70 | xy: 404, 1136
71 | size: 200, 240
72 | orig: 200, 240
73 | offset: 0, 0
74 | index: -1
75 | img_obj_btn_play
76 | rotate: false
77 | xy: 422, 793
78 | size: 300, 100
79 | orig: 300, 100
80 | offset: 0, 0
81 | index: -1
82 | img_obj_mountains
83 | rotate: false
84 | xy: 1, 542
85 | size: 960, 250
86 | orig: 960, 250
87 | offset: 0, 0
88 | index: -1
89 | img_obj_sound_on
90 | rotate: false
91 | xy: 605, 1136
92 | size: 100, 100
93 | orig: 100, 100
94 | offset: 0, 0
95 | index: -1
96 | img_obj_swipe_down_menu
97 | rotate: false
98 | xy: 1, 1074
99 | size: 220, 140
100 | orig: 220, 140
101 | offset: 0, 0
102 | index: -1
103 | img_obj_rectangle
104 | rotate: false
105 | xy: 222, 1074
106 | size: 100, 100
107 | orig: 100, 100
108 | offset: 0, 0
109 | index: -1
110 | img_obj_btn_scores
111 | rotate: false
112 | xy: 422, 894
113 | size: 300, 100
114 | orig: 300, 100
115 | offset: 0, 0
116 | index: -1
117 | img_obj_social_google
118 | rotate: false
119 | xy: 323, 1205
120 | size: 80, 130
121 | orig: 80, 130
122 | offset: 0, 0
123 | index: -1
124 | img_obj_loading
125 | rotate: false
126 | xy: 723, 894
127 | size: 250, 250
128 | orig: 250, 250
129 | offset: 0, 0
130 | index: -1
131 |
--------------------------------------------------------------------------------
/android/assets/menu_back.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/menu_back.jpg
--------------------------------------------------------------------------------
/android/assets/skin/cartwheel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/skin/cartwheel.png
--------------------------------------------------------------------------------
/android/assets/skin/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/skin/default.png
--------------------------------------------------------------------------------
/android/assets/skin/uiskin.atlas:
--------------------------------------------------------------------------------
1 |
2 | uiskin.png
3 | format: RGBA8888
4 | filter: Nearest,Nearest
5 | repeat: none
6 | default
7 | rotate: false
8 | xy: 1, 50
9 | size: 254, 77
10 | orig: 254, 77
11 | offset: 0, 0
12 | index: -1
13 | default-window
14 | rotate: false
15 | xy: 1, 20
16 | size: 27, 29
17 | split: 4, 3, 20, 3
18 | orig: 27, 29
19 | offset: 0, 0
20 | index: -1
21 | default-select
22 | rotate: false
23 | xy: 29, 29
24 | size: 27, 20
25 | split: 4, 14, 4, 4
26 | orig: 27, 20
27 | offset: 0, 0
28 | index: -1
29 | default-round-large
30 | rotate: false
31 | xy: 57, 29
32 | size: 20, 20
33 | split: 5, 5, 5, 4
34 | orig: 20, 20
35 | offset: 0, 0
36 | index: -1
37 | default-scroll
38 | rotate: false
39 | xy: 78, 29
40 | size: 20, 20
41 | split: 2, 2, 2, 2
42 | orig: 20, 20
43 | offset: 0, 0
44 | index: -1
45 | default-slider-knob
46 | rotate: false
47 | xy: 1, 1
48 | size: 9, 18
49 | orig: 9, 18
50 | offset: 0, 0
51 | index: -1
52 | default-round-down
53 | rotate: false
54 | xy: 99, 29
55 | size: 12, 20
56 | split: 5, 5, 5, 4
57 | orig: 12, 20
58 | offset: 0, 0
59 | index: -1
60 | default-round
61 | rotate: false
62 | xy: 112, 29
63 | size: 12, 20
64 | split: 5, 5, 5, 4
65 | pad: 4, 4, 1, 1
66 | orig: 12, 20
67 | offset: 0, 0
68 | index: -1
69 | check-off
70 | rotate: false
71 | xy: 11, 5
72 | size: 14, 14
73 | orig: 14, 14
74 | offset: 0, 0
75 | index: -1
76 | textfield
77 | rotate: false
78 | xy: 11, 5
79 | size: 14, 14
80 | split: 3, 3, 3, 3
81 | orig: 14, 14
82 | offset: 0, 0
83 | index: -1
84 | check-on
85 | rotate: false
86 | xy: 125, 35
87 | size: 14, 14
88 | orig: 14, 14
89 | offset: 0, 0
90 | index: -1
91 | tree-minus
92 | rotate: false
93 | xy: 140, 35
94 | size: 14, 14
95 | orig: 14, 14
96 | offset: 0, 0
97 | index: -1
98 | tree-plus
99 | rotate: false
100 | xy: 155, 35
101 | size: 14, 14
102 | orig: 14, 14
103 | offset: 0, 0
104 | index: -1
105 | default-slider
106 | rotate: false
107 | xy: 29, 20
108 | size: 8, 8
109 | split: 2, 2, 2, 2
110 | orig: 8, 8
111 | offset: 0, 0
112 | index: -1
113 | default-pane
114 | rotate: false
115 | xy: 11, 1
116 | size: 5, 3
117 | split: 1, 1, 1, 1
118 | orig: 5, 3
119 | offset: 0, 0
120 | index: -1
121 | default-rect-pad
122 | rotate: false
123 | xy: 11, 1
124 | size: 5, 3
125 | split: 1, 1, 1, 1
126 | orig: 5, 3
127 | offset: 0, 0
128 | index: -1
129 | default-splitpane
130 | rotate: false
131 | xy: 17, 1
132 | size: 5, 3
133 | split: 0, 5, 0, 0
134 | orig: 5, 3
135 | offset: 0, 0
136 | index: -1
137 | cursor
138 | rotate: false
139 | xy: 23, 1
140 | size: 3, 3
141 | split: 1, 1, 1, 1
142 | orig: 3, 3
143 | offset: 0, 0
144 | index: -1
145 | default-splitpane-vertical
146 | rotate: false
147 | xy: 125, 29
148 | size: 3, 5
149 | split: 0, 0, 0, 5
150 | orig: 3, 5
151 | offset: 0, 0
152 | index: -1
153 | default-rect-down
154 | rotate: false
155 | xy: 170, 46
156 | size: 3, 3
157 | split: 1, 1, 1, 1
158 | orig: 3, 3
159 | offset: 0, 0
160 | index: -1
161 | default-rect
162 | rotate: false
163 | xy: 38, 25
164 | size: 3, 3
165 | split: 1, 1, 1, 1
166 | orig: 3, 3
167 | offset: 0, 0
168 | index: -1
169 | default-select-selection
170 | rotate: false
171 | xy: 26, 16
172 | size: 3, 3
173 | split: 1, 1, 1, 1
174 | orig: 3, 3
175 | offset: 0, 0
176 | index: -1
177 | default-pane-noborder
178 | rotate: false
179 | xy: 129, 33
180 | size: 1, 1
181 | split: 0, 0, 0, 0
182 | orig: 1, 1
183 | offset: 0, 0
184 | index: -1
185 | selection
186 | rotate: false
187 | xy: 170, 44
188 | size: 1, 1
189 | orig: 1, 1
190 | offset: 0, 0
191 | index: -1
192 | white
193 | rotate: false
194 | xy: 174, 48
195 | size: 1, 1
196 | orig: 1, 1
197 | offset: 0, 0
198 | index: -1
199 |
--------------------------------------------------------------------------------
/android/assets/skin/uiskin.json:
--------------------------------------------------------------------------------
1 | {
2 | com.badlogic.gdx.graphics.g2d.BitmapFont: {
3 | default-font: { file: default.fnt },
4 | verdana: { file: verdana39.fnt },
5 | cartwheel: { file: cartwheel.fnt}
6 | },
7 | com.badlogic.gdx.graphics.Color: {
8 | green: { a: 1, b: 0, g: 1, r: 0 },
9 | white: { a: 1, b: 1, g: 1, r: 1 },
10 | red: { a: 1, b: 0, g: 0, r: 1 },
11 | black: { a: 1, b: 0, g: 0, r: 0 }
12 | },
13 | com.badlogic.gdx.scenes.scene2d.ui.Button$ButtonStyle: {
14 | default: { down: default-round-down, up: default-round },
15 | toggle: { down: default-round-down, checked: default-round-down, up: default-round }
16 | },
17 | com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle: {
18 | default: { down: default-round-down, up: default-round, font: default-font, fontColor: white },
19 | toggle: { down: default-round-down, up: default-round, checked: default-round-down, font: default-font, fontColor: white, downFontColor: red }
20 | },
21 | com.badlogic.gdx.scenes.scene2d.ui.SplitPane$SplitPaneStyle: {
22 | default-vertical: { handle: default-splitpane-vertical },
23 | default-horizontal: { handle: default-splitpane }
24 | },
25 | com.badlogic.gdx.scenes.scene2d.ui.ScrollPane$ScrollPaneStyle: {
26 | default: { vScroll: default-slider, hScrollKnob: default-round-large, background: default-rect, hScroll: default-slider, vScrollKnob: default-round-large }
27 | },
28 | com.badlogic.gdx.scenes.scene2d.ui.SelectBox$SelectBoxStyle: {
29 | default: {
30 | font: default-font, fontColor: white, background: default-select,
31 | scrollStyle: default,
32 | listStyle: { font: default-font, selection: default-select-selection }
33 | }
34 | },
35 | com.badlogic.gdx.scenes.scene2d.ui.Window$WindowStyle: {
36 | default: { titleFont: default-font, background: default-window, titleFontColor: white }
37 | },
38 | com.badlogic.gdx.scenes.scene2d.ui.Slider$SliderStyle: {
39 | default: { background: default-slider, knob: default-slider-knob },
40 | default-vertical: { background: default-slider, knob: default-slider-knob },
41 | default-horizontal: { background: default-slider, knob: default-slider-knob }
42 | },
43 | com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: {
44 | default: { font: default-font, fontColor: white },
45 | title: { font: verdana, fontColor: white }
46 | },
47 | com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle: {
48 | default: { selection: selection, background: textfield, font: default-font, fontColor: white, cursor: cursor }
49 | },
50 | com.badlogic.gdx.scenes.scene2d.ui.CheckBox$CheckBoxStyle: {
51 | default: { checkboxOn: check-on, checkboxOff: check-off, font: default-font, fontColor: white }
52 | },
53 | com.badlogic.gdx.scenes.scene2d.ui.List$ListStyle: {
54 | default: { fontColorUnselected: white, selection: default-rect-pad, fontColorSelected: white, font: default-font }
55 | }
56 | }
--------------------------------------------------------------------------------
/android/assets/skin/uiskin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/skin/uiskin.png
--------------------------------------------------------------------------------
/android/assets/skin/verdana39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/skin/verdana39.png
--------------------------------------------------------------------------------
/android/assets/title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/assets/title.png
--------------------------------------------------------------------------------
/android/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/ic_launcher-web.png
--------------------------------------------------------------------------------
/android/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android/proguard-project.txt:
--------------------------------------------------------------------------------
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 | (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 | }
43 |
--------------------------------------------------------------------------------
/android/project.properties:
--------------------------------------------------------------------------------
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-20
15 |
--------------------------------------------------------------------------------
/android/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/android/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MathAttack
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android/src/com/sawan/mathattack/android/AndroidLauncher.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: AndroidLauncher.java
3 | * Version: 1.0
4 | * Date: @date 15:34:20
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.android;
27 |
28 | import android.os.Bundle;
29 |
30 | import com.badlogic.gdx.backends.android.AndroidApplication;
31 | import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
32 | import com.sawan.mathattack.MainStarter;
33 |
34 | public class AndroidLauncher extends AndroidApplication {
35 | @Override
36 | protected void onCreate (Bundle savedInstanceState) {
37 | super.onCreate(savedInstanceState);
38 | AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
39 | initialize(new MainStarter(), config);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
8 | classpath 'com.android.tools.build:gradle:1.0.0'
9 | }
10 | }
11 |
12 | allprojects {
13 | apply plugin: "eclipse"
14 | apply plugin: "idea"
15 |
16 | version = '1.0'
17 | ext {
18 | appName = 'MathAttack'
19 | gdxVersion = '0.9.9'
20 | roboVMVersion = '1.0.0-beta-01'
21 | box2DLightsVersion = '1.3'
22 | ashleyVersion = '1.3.1'
23 | aiVersion = '1.4.0'
24 | }
25 |
26 | repositories {
27 | mavenCentral()
28 | maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
29 | maven { url "https://oss.sonatype.org/content/repositories/releases/" }
30 | }
31 | }
32 |
33 | project(":desktop") {
34 | apply plugin: "java"
35 |
36 |
37 | dependencies {
38 | compile project(":core")
39 | compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
40 | compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
41 | }
42 | }
43 |
44 | project(":android") {
45 | apply plugin: "android"
46 |
47 | configurations { natives }
48 |
49 | dependencies {
50 | compile project(":core")
51 | compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
52 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
53 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
54 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
55 | }
56 | }
57 |
58 | project(":html") {
59 | apply plugin: "gwt"
60 | apply plugin: "war"
61 |
62 |
63 | dependencies {
64 | compile project(":core")
65 | compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
66 | compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
67 | compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
68 | }
69 | }
70 |
71 | project(":core") {
72 | apply plugin: "java"
73 |
74 |
75 | dependencies {
76 | compile "com.badlogicgames.gdx:gdx:$gdxVersion"
77 | }
78 | }
79 |
80 | tasks.eclipse.doLast {
81 | delete ".project"
82 | }
--------------------------------------------------------------------------------
/core/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/core/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MathAttack-core
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.springsource.ide.eclipse.gradle.core.nature
16 | org.eclipse.jdt.core.javanature
17 |
18 |
19 |
--------------------------------------------------------------------------------
/core/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
2 | #Mon Mar 30 22:48:34 BST 2015
3 | org.springsource.ide.eclipse.gradle.linkedresources=
4 | org.springsource.ide.eclipse.gradle.rootprojectloc=..
5 |
--------------------------------------------------------------------------------
/core/.settings/gradle/org.springsource.ide.eclipse.gradle.refresh.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
2 | #Mon Jan 19 17:02:16 GMT 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | useHierarchicalNames=false
10 |
--------------------------------------------------------------------------------
/core/.settings/net.sf.jautodoc.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | header_text=/**\r\n * File name\:\t${file_name}\r\n * Version\:\t\t1.0\r\n * Date\:\t\t${date} ${time}\r\n * Author\:\t\t${user}\r\n * Copyright\:\tCopyright 200X ${user}\r\n *\r\n *\t\t\t\tThis file is part of Math Attack.\r\n *\r\n *\t\t\t\tMath Attack is free software\: you can redistribute it \r\n *\t\t\t\tand/or modify it under the terms of the GNU General\r\n *\t\t\t\tPublic License as published by the Free Software \r\n *\t\t\t\tFoundation, either version 3 of the License, \r\n *\t\t\t\tor (at your option) any later version.\r\n *\r\n *\t\t\t\tMath Attack is distributed in the hope that it will \r\n *\t\t\t\tbe useful, but WITHOUT ANY WARRANTY; without even \r\n *\t\t\t\tthe implied warranty of MERCHANTABILITY or FITNESS \r\n *\t\t\t\tFOR A PARTICULAR PURPOSE. See the GNU General Public\r\n *\t\t\t License for more details.\r\n *\r\n *\t\t\t\tYou should have received a copy of the GNU General \r\n *\t\t\t\tPublic License along with Math Attack. If not, see \r\n *\t\t\t\thttp\://www.gnu.org/licenses/.\r\n */
3 | project_specific_settings=true
4 | properties=date,
5 | properties.date=@date
6 | replacements=\n\n\nGets the\nSets the\nAdds the\nEdits the\nRemoves the\nInits the\nParses the\nCreates the\nBuilds the\nChecks if is\nPrints the\nChecks for\n\n\n
7 |
--------------------------------------------------------------------------------
/core/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #
2 | #Mon Mar 30 22:54:21 BST 2015
3 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
7 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
8 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
9 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
10 | eclipse.preferences.version=1
11 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
12 | org.eclipse.jdt.core.compiler.source=1.6
13 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
14 |
--------------------------------------------------------------------------------
/core/bin/.gitignore:
--------------------------------------------------------------------------------
1 | /MAGame.gwt.xml
2 | /com
3 |
--------------------------------------------------------------------------------
/core/bin/MAGame.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/core/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "java"
2 |
3 | sourceCompatibility = 1.6
4 | [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
5 |
6 | sourceSets.main.java.srcDirs = [ "src/" ]
7 |
8 |
9 | eclipse.project {
10 | name = appName + "-core"
11 | }
12 |
--------------------------------------------------------------------------------
/core/src/MAGame.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/MainStarter.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: MainStarter.java
3 | * Version: 1.0
4 | * Date: @date 13:28:20
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack;
27 |
28 | import com.sawan.mathattack.asset.Backgrounds;
29 | import com.sawan.mathattack.asset.ChaptersAssets;
30 | import com.sawan.mathattack.asset.GameAssets;
31 | import com.sawan.mathattack.asset.HeroAssests;
32 | import com.sawan.mathattack.asset.MonsterAssets;
33 | import com.sawan.mathattack.asset.UIAssets;
34 | import com.sawan.mathattack.asset.levels.MALevelAssets;
35 | import com.sawan.mathattack.constants.MAConstants;
36 | import com.sawan.mathattack.game.AbstractGame;
37 | import com.sawan.mathattack.game_screens.main.MAMainMenuScreen;
38 | import com.sawan.mathattack.managers.FileManager;
39 | import com.sawan.mathattack.managers.FileManager.FileType;
40 | import com.sawan.mathattack.managers.SettingsManager;
41 | import com.sawan.mathattack.settings.AppSettings;
42 |
43 | // TODO: Auto-generated Javadoc
44 | /**
45 | * The Class MainStarter.
46 | */
47 | public class MainStarter extends AbstractGame {
48 |
49 | /* (non-Javadoc)
50 | * @see com.sawan.mathattack.game.AbstractGame#create()
51 | */
52 | @Override
53 | public void create() {
54 | super.create();
55 | setScreen(new MAMainMenuScreen(this, "Main Menu"));
56 | }
57 |
58 | /* (non-Javadoc)
59 | * @see com.sawan.mathattack.interfaces.IGame#setUpAppSettings()
60 | */
61 | @Override
62 | public void setUpAppSettings() {
63 | AppSettings.setUp();
64 | if (!SettingsManager.isFirstLaunchDone()) {
65 | SettingsManager.setFirstLaunchDone(true);
66 | FileManager.createTextFileInLocalStorage(MAConstants.ADDITION_FILE);
67 | FileManager.createTextFileInLocalStorage(MAConstants.SUBTRACTION_FILE);
68 | FileManager.createTextFileInLocalStorage(MAConstants.MULTIPLICATION_FILE);
69 | FileManager.initiateMAFile(MAConstants.ADDITION_FILE, FileType.LOCAL_FILE);
70 | FileManager.initiateMAFile(MAConstants.SUBTRACTION_FILE, FileType.LOCAL_FILE);
71 | FileManager.initiateMAFile(MAConstants.MULTIPLICATION_FILE, FileType.LOCAL_FILE);
72 | }
73 | //FileManager.getFile("profile.data", FileType.LOCAL_FILE).delete();
74 | //SettingsManager.setFirstLaunchDone(false);
75 | }
76 |
77 | /* (non-Javadoc)
78 | * @see com.sawan.mathattack.interfaces.IGame#setUpAssets()
79 | */
80 | @Override
81 | public void setUpAssets() {
82 | UIAssets.loadAll();
83 | Backgrounds.loadAll();
84 | MALevelAssets.loadAll();
85 | HeroAssests.loadAll();
86 | MonsterAssets.loadAll();
87 | GameAssets.loadAll();
88 | ChaptersAssets.loadAll();
89 | }
90 |
91 | /* (non-Javadoc)
92 | * @see com.sawan.mathattack.interfaces.IGame#setUpLoadingScreen()
93 | */
94 | @Override
95 | public void setUpLoadingScreen() {
96 |
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAdController.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAdController.java
3 | * Version: 1.0
4 | * Date: @date 13:02:30
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 |
28 | package com.sawan.mathattack.android;
29 |
30 | // TODO: Auto-generated Javadoc
31 | /**
32 | * The Interface IAdController.
33 | */
34 | public interface IAdController {
35 |
36 | /**
37 | * Gets the ad controller app brain.
38 | *
39 | * @return the ad controller app brain
40 | */
41 | public IAdControllerAppBrain getAdControllerAppBrain();
42 |
43 | /**
44 | * Gets the ad controller ad mob.
45 | *
46 | * @return the ad controller ad mob
47 | */
48 | public IAdControllerAdMob getAdControllerAdMob();
49 |
50 | /**
51 | * Gets the ad controller airpush.
52 | *
53 | * @return the ad controller airpush
54 | */
55 | public IAdControllerAirpush getAdControllerAirpush();
56 |
57 | /**
58 | * Gets the i ad controller leadbolt.
59 | *
60 | * @return the i ad controller leadbolt
61 | */
62 | public IAdControllerLeadbolt getIAdControllerLeadbolt();
63 |
64 | /**
65 | * Gets the i ad controller tapjoy.
66 | *
67 | * @return the i ad controller tapjoy
68 | */
69 | public IAdControllerTapjoy getIAdControllerTapjoy();
70 | }
71 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAdControllerAdMob.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAdControllerAdMob.java
3 | * Version: 1.0
4 | * Date: @date 13:05:25
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.android;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IAdControllerAdMob.
32 | */
33 | public interface IAdControllerAdMob {
34 |
35 | /**
36 | * Show ad banner.
37 | *
38 | * @param isTest the is test
39 | */
40 | public void showAdBanner(boolean isTest);
41 | }
42 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAdControllerAirpush.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAdControllerAirpush.java
3 | * Version: 1.0
4 | * Date: @date 13:05:34
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.android;
28 |
29 | /**
30 | * The Interface IAdControllerAirpush.
31 | */
32 | public interface IAdControllerAirpush {
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAdControllerAppBrain.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAdControllerAppBrain.java
3 | * Version: 1.0
4 | * Date: @date 13:05:48
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.android;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IAdControllerAppBrain.
32 | */
33 | public interface IAdControllerAppBrain {
34 |
35 | /**
36 | * Show maybe interstitial.
37 | */
38 | public void showMaybeInterstitial();
39 |
40 | /**
41 | * Show direct interstitial.
42 | */
43 | public void showDirectInterstitial();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAdControllerLeadbolt.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAdControllerLeadbolt.java
3 | * Version: 1.0
4 | * Date: @date 13:06:02
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.android;
28 |
29 | /**
30 | * The Interface IAdControllerLeadbolt.
31 | */
32 | public interface IAdControllerLeadbolt {
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAdControllerTapjoy.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAdControllerTapjoy.java
3 | * Version: 1.0
4 | * Date: @date 13:06:09
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.android;
28 |
29 | /**
30 | * The Interface IAdControllerTapjoy.
31 | */
32 | public interface IAdControllerTapjoy {
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAndroidIntents.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAndroidIntents.java
3 | * Version: 1.0
4 | * Date: @date 13:06:39
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.android;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IAndroidIntents.
32 | */
33 | public interface IAndroidIntents {
34 |
35 | /**
36 | * Start a uri intent. For example opening Google Play market link
37 | *
38 | * @param uri the uri
39 | */
40 | public void startUriIntent(String uri);
41 |
42 | /**
43 | * Start share intent.
44 | *
45 | * @param header the header
46 | * @param subject the subject
47 | * @param body the body
48 | */
49 | public void startShareIntent(String header, String subject, String body);
50 | }
51 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IAndroidObject.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAndroidObject.java
3 | * Version: 1.0
4 | * Date: @date 13:07:00
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.android;
27 |
28 | // TODO: Auto-generated Javadoc
29 | /**
30 | * The Interface IAndroidObject.
31 | */
32 | public interface IAndroidObject {
33 |
34 | /**
35 | * Get main ad controller that controls sub ad controllers.
36 | *
37 | * @return the ad controller
38 | */
39 | public IAdController getAdController();
40 |
41 | /**
42 | * Get android intents.
43 | *
44 | * @return the android intents
45 | */
46 | public IAndroidIntents getAndroidIntents();
47 |
48 | /**
49 | * Get "Score Loop".
50 | *
51 | * @return the score loop
52 | */
53 | public IScoreLoop getScoreLoop();
54 | }
55 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IOpenFeint.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IOpenFeint.java
3 | * Version: 1.0
4 | * Date: @date 13:07:07
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.android;
27 |
28 | /**
29 | * The Class IOpenFeint.
30 | */
31 | public class IOpenFeint {
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/IScoreLoop.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IScoreLoop.java
3 | * Version: 1.0
4 | * Date: @date 13:07:14
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.android;
27 |
28 | // TODO: Auto-generated Javadoc
29 | /**
30 | * The Interface IScoreLoop.
31 | */
32 | public interface IScoreLoop {
33 |
34 | /**
35 | * Bootstrap.
36 | */
37 | public void bootstrap();
38 |
39 | /**
40 | * Show scoreloop.
41 | */
42 | public void showScoreloop();
43 |
44 | /**
45 | * Submit score.
46 | *
47 | * @param mode the mode
48 | * @param score the score
49 | */
50 | public void submitScore(int mode, int score);
51 |
52 | /**
53 | * Refresh scores.
54 | */
55 | public void refreshScores();
56 | }
57 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/android/ISwarm.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: ISwarm.java
3 | * Version: 1.0
4 | * Date: @date 13:07:19
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.android;
27 |
28 | /**
29 | * The Interface ISwarm.
30 | */
31 | public interface ISwarm {
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/asset/AbstractAssets.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: AbstractAssets.java
3 | * Version: 1.0
4 | * Date: @date 13:08:09
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.asset;
28 |
29 | import com.badlogic.gdx.Gdx;
30 | import com.badlogic.gdx.assets.AssetDescriptor;
31 | import com.badlogic.gdx.assets.AssetErrorListener;
32 | import com.badlogic.gdx.assets.AssetManager;
33 | import com.badlogic.gdx.graphics.g2d.TextureAtlas;
34 | import com.badlogic.gdx.scenes.scene2d.ui.Skin;
35 | import com.sawan.mathattack.settings.MtxLogger;
36 |
37 | // TODO: Auto-generated Javadoc
38 | /**
39 | * The Class AbstractAssets.
40 | */
41 | public abstract class AbstractAssets implements AssetErrorListener {
42 | //
43 | /** The log tag. */
44 | protected final String logTag = "MtxAssetsLog";
45 |
46 | /** The log active. */
47 | public static boolean logActive = true;
48 | //
49 | /** The asset manager. */
50 | private AssetManager assetManager;
51 |
52 | /** The texture atlas. */
53 | private TextureAtlas textureAtlas;
54 |
55 | /** The skin. */
56 | private Skin skin;
57 |
58 | /**
59 | * Instantiates a new abstract assets.
60 | */
61 | public AbstractAssets() {
62 | assetManager = new AssetManager();
63 | skin = new Skin();
64 | }
65 |
66 | /**
67 | * Gets the asset manager.
68 | *
69 | * @return the asset manager
70 | */
71 | public AssetManager getAssetManager() {
72 | return assetManager;
73 | }
74 |
75 | /**
76 | * Sets the asset manager.
77 | *
78 | * @param assetManager the new asset manager
79 | */
80 | public void setAssetManager(AssetManager assetManager) {
81 | this.assetManager = assetManager;
82 | }
83 |
84 | /**
85 | * Gets the texture atlas.
86 | *
87 | * @return the texture atlas
88 | */
89 | public TextureAtlas getTextureAtlas() {
90 | return textureAtlas;
91 | }
92 |
93 | /**
94 | * Sets the texture atlas.
95 | *
96 | * @param textureAtlas the new texture atlas
97 | */
98 | public void setTextureAtlas(TextureAtlas textureAtlas) {
99 | this.textureAtlas = textureAtlas;
100 | }
101 |
102 | /**
103 | * Gets the skin.
104 | *
105 | * @return the skin
106 | */
107 | public Skin getSkin() {
108 | return skin;
109 | }
110 |
111 | /**
112 | * Sets the skin.
113 | *
114 | * @param skin the new skin
115 | */
116 | public void setSkin(Skin skin) {
117 | this.skin = skin;
118 | }
119 |
120 | /* (non-Javadoc)
121 | * @see com.badlogic.gdx.assets.AssetErrorListener#error(com.badlogic.gdx.assets.AssetDescriptor, java.lang.Throwable)
122 | */
123 | @Override
124 | public void error (AssetDescriptor asset, Throwable throwable) {
125 | Gdx.app.error("AssetManager", "couldn't load asset '" + asset.fileName);
126 | }
127 |
128 | /**
129 | * Log asset manager progress.
130 | */
131 | public void logAssetManagerProgress() {
132 | MtxLogger.log(logActive, true, logTag, "Assets Loading: "
133 | + getAssetManager().getProgress());
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/asset/MonsterAssets.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: BlueMonsterAssets.java
3 | * Version: 1.0
4 | * Date: 21/03/2015 18:49:55
5 | * Author: Sawan
6 | * Copyright: Copyright 200X Sawan
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.asset;
27 |
28 | import com.badlogic.gdx.Gdx;
29 | import com.badlogic.gdx.files.FileHandle;
30 | import com.badlogic.gdx.graphics.Texture;
31 | import com.badlogic.gdx.graphics.g2d.Animation;
32 | import com.badlogic.gdx.graphics.g2d.TextureAtlas;
33 | import com.badlogic.gdx.scenes.scene2d.ui.Skin;
34 | import com.sawan.mathattack.animation.AnimationCreator;
35 |
36 | // TODO: Auto-generated Javadoc
37 | /**
38 | * The Class MonsterAssets.
39 | *
40 | * @author Sawan
41 | */
42 | public class MonsterAssets {
43 | /** The Constant FILE_IMAGE_ATLAS. */
44 | private static String FILE_IMAGE_ATLAS = "data/ma/game/characters/monster1.atlas";
45 |
46 | /** The Constant FILE_UI_SKIN. */
47 | private final static String FILE_UI_SKIN = "skin/uiskin.json";
48 |
49 |
50 | /** The atlas. */
51 | public static TextureAtlas atlas;
52 |
53 | /** The skin. */
54 | public static Skin skin;
55 |
56 | // Assets
57 | /** The hero_standing. */
58 | public static Animation monster_walking;
59 |
60 |
61 |
62 | /**
63 | * Loads texture file.
64 | *
65 | * @param file the file
66 | * @return the texture
67 | */
68 | public static Texture loadTexture(String file) {
69 | return new Texture(Gdx.files.internal(file));
70 | }
71 |
72 | /**
73 | * Gets the atlas. Creates a texture atlas if is not created.
74 | *
75 | * @return the atlas
76 | */
77 | public static TextureAtlas getAtlas() {
78 | if (atlas == null) {
79 | atlas = new TextureAtlas(Gdx.files.internal(FILE_IMAGE_ATLAS));
80 | }
81 |
82 | return atlas;
83 | }
84 |
85 | /**
86 | * Gets the skin.
87 | *
88 | * @return the skin
89 | */
90 | public static Skin getSkin() {
91 | if (skin == null) {
92 | FileHandle skinFile = Gdx.files.internal(FILE_UI_SKIN);
93 | skin = new Skin(skinFile);
94 | }
95 |
96 | return skin;
97 | }
98 |
99 | /**
100 | * Load all. Loads all the resources.
101 | */
102 | public static void loadAll() {
103 | relaseResources();
104 | loadImages();
105 | loadAnimations();
106 | loadSoundsAndMusics();
107 | }
108 |
109 | /**
110 | * Relase resources.
111 | */
112 | private static void relaseResources() {
113 | skin = null;
114 | atlas = null;
115 | }
116 |
117 | /**
118 | * Load images.
119 | */
120 | public static void loadImages() {
121 |
122 | }
123 |
124 |
125 | /**
126 | * Load animations.
127 | */
128 | public static void loadAnimations() {
129 | monster_walking = AnimationCreator.getAnimationFromMultiTextures(getAtlas(), "walking", 2, 1.5f, false, false);
130 | }
131 |
132 | /**
133 | * Load sounds and musics.
134 | */
135 | public static void loadSoundsAndMusics() {
136 |
137 | }
138 |
139 | /**
140 | * Sets the file image atlas.
141 | *
142 | * @param level the new file image atlas
143 | */
144 | public static void setFILE_IMAGE_ATLAS(int level) {
145 | FILE_IMAGE_ATLAS = "data/ma/game/characters/monster" + Integer.toString(level) + ".atlas";
146 | }
147 |
148 | }
149 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/buttons/MathAttackButton.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: MathAttackButton.java
3 | * Version: 1.0
4 | * Date: 07/03/2015 20:19:41
5 | * Author: Sawan
6 | * Copyright: Copyright 200X Sawan
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.buttons;
27 |
28 | import java.util.Random;
29 |
30 | import com.sawan.mathattack.models.SmartActor;
31 |
32 | // TODO: Auto-generated Javadoc
33 | /**
34 | * The Class MathAttackButton.
35 | *
36 | * @author Sawan
37 | */
38 | public class MathAttackButton extends SmartActor {
39 |
40 | /**
41 | * Instantiates a new math attack button.
42 | *
43 | * @param width the width
44 | * @param height the height
45 | * @param rnd the rnd
46 | * @param DIPActive the DIP active
47 | */
48 | public MathAttackButton(float width, float height, Random rnd,
49 | boolean DIPActive) {
50 | super(width, height, rnd, DIPActive);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/constants/MAConstants.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: MAConstants.java
3 | * Version: 1.0
4 | * Date: 31/03/2015 23:14:30
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.constants;
27 |
28 | // TODO: Auto-generated Javadoc
29 | /**
30 | * The Class MAConstants.
31 | *
32 | * @author Sawan J. Kapai Harpalani
33 | */
34 | public class MAConstants {
35 |
36 | /** The Constant ADDITION_FILE. */
37 | public final static String ADDITION_FILE = "add.data";
38 |
39 | /** The Constant SUBTRACTION_FILE. */
40 | public final static String SUBTRACTION_FILE = "sub.data";
41 |
42 | /** The Constant MULTIPLICATION_FILE. */
43 | public final static String MULTIPLICATION_FILE = "mult.data";
44 |
45 | /** The Constant UNDEFINED. */
46 | public final static int UNDEFINED = -999;
47 |
48 | /** The Constant CHAPTER_WIDTH. */
49 | public final static float CHAPTER_WIDTH = 300f;
50 |
51 | /** The Constant CHAPTER_HEIGHT. */
52 | public final static float CHAPTER_HEIGHT = 279f;
53 |
54 | /** The Constant SMALL_BUTTON_WIDTH. */
55 | public final static float SMALL_BUTTON_WIDTH = 63f;
56 |
57 | /** The Constant SMALL_BUTTON_HEIGHT. */
58 | public final static float SMALL_BUTTON_HEIGHT = 66f;
59 |
60 | /** The Constant CREDITS_WIDTH. */
61 | public final static float CREDITS_WIDTH = 782f;
62 |
63 | /** The Constant CREDITS_HEIGHT. */
64 | public final static float CREDITS_HEIGHT = 502f;
65 |
66 | /** The Constant LEVEL_TABLE_WIDTH. */
67 | public final static float LEVEL_TABLE_WIDTH = 489;
68 |
69 | /** The Constant LEVEL_TABLE_HEIGHT. */
70 | public final static float LEVEL_TABLE_HEIGHT = 429;
71 |
72 | /** The Constant NUMBER_LEVELS. */
73 | public final static int NUMBER_LEVELS = 8;
74 |
75 | /** The Constant CHAPTER_ADDITION. */
76 | public final static int CHAPTER_ADDITION = 1;
77 |
78 | /** The Constant CHAPTER_SUBTRACTION. */
79 | public final static int CHAPTER_SUBTRACTION = 2;
80 |
81 | /** The Constant CHAPTER_MULTIPLICATION. */
82 | public final static int CHAPTER_MULTIPLICATION = 3;
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/game/GameState.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: GameState.java
3 | * Version: 1.0
4 | * Date: @date 13:09:02
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.game;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * Common game states to be used in game logics.
32 | */
33 | public enum GameState {
34 |
35 | /** The game running. */
36 | GAME_RUNNING,
37 |
38 | /** The game paused. */
39 | GAME_PAUSED,
40 |
41 | /** The game update. */
42 | GAME_UPDATE,
43 |
44 | /** The game over. */
45 | GAME_OVER,
46 |
47 | /** The game win. */
48 | GAME_WIN,
49 |
50 | /** The game levelwin. */
51 | GAME_LEVELWIN,
52 |
53 | /** The game idle. */
54 | GAME_IDLE,
55 |
56 | /** The game slowmotion. */
57 | GAME_SLOWMOTION
58 | }
59 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/game/layers/World.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: World.java
3 | * Version: 1.0
4 | * Date: 20/3/2015 10:07:33
5 | * Author: Itop1
6 | * Copyright: Copyright 200X Itop1
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.game.layers;
27 |
28 | import com.sawan.mathattack.game.GameState;
29 | import com.sawan.mathattack.game.managers.MAGameManager;
30 | import com.sawan.mathattack.scene2d.AbstractWorldScene2d;
31 |
32 | /**
33 | * @author Itop1
34 | *
35 | */
36 | public class World extends AbstractWorldScene2d {
37 | MAGameManager gameManager;
38 |
39 | public World(MAGameManager gameManager, float posX, float posY,
40 | float worldWidth, float worldHeight) {
41 | super(posX, posY, worldWidth, worldHeight);
42 | //
43 | this.gameManager = gameManager;
44 | }
45 |
46 | @Override
47 | public void act(float delta) {
48 | //
49 | // Actors act under the world if only game state is Running
50 | // ####################################################################
51 | if (gameManager.getGameState() == GameState.GAME_RUNNING) {
52 | super.act(delta);
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/game_screens/main/helpers/MAMainMenuEnviroment.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: MathAttackMainMenuEnviroment.java
3 | * Version: 1.0
4 | * Date: 07/03/2015 23:49:10
5 | * Author: Sawan
6 | * Copyright: Copyright 200X Sawan
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.game_screens.main.helpers;
27 |
28 | import com.badlogic.gdx.Application.ApplicationType;
29 | import com.badlogic.gdx.Gdx;
30 | import com.badlogic.gdx.scenes.scene2d.actions.Actions;
31 | import com.sawan.mathattack.asset.UIAssets;
32 | import com.sawan.mathattack.game_screens.main.MAMainMenuScreen;
33 | import com.sawan.mathattack.models.EmptyActorLight;
34 | import com.sawan.mathattack.settings.AppSettings;
35 |
36 | // TODO: Auto-generated Javadoc
37 | /**
38 | * The Class MathAttackMainMenuEnviroment.
39 | *
40 | * @author Sawan
41 | */
42 | public class MAMainMenuEnviroment {
43 |
44 | /** The Constant TITLE_W. */
45 | protected final static int TITLE_W = 600;
46 |
47 | /** The Constant TITLE_H. */
48 | protected final static int TITLE_H = 374;
49 |
50 | /**
51 | * Sets the up game name.
52 | *
53 | * @param menu_screen the new up game name
54 | */
55 | public void setUpGameName(final MAMainMenuScreen menu_screen) {
56 | menu_screen.title = new EmptyActorLight(TITLE_W, TITLE_H, true);
57 | menu_screen.title.setTextureRegion(UIAssets.image_main_title, true);
58 | menu_screen.title.setOrigin( menu_screen.title.getWidth() / 2, menu_screen.title.getHeight() / 2);
59 | menu_screen.title.setPosition( AppSettings.SCREEN_W / 2 - menu_screen.title.getWidth() / 2,
60 | AppSettings.SCREEN_H + menu_screen.title.getHeight());
61 |
62 | if (Gdx.app.getType() == ApplicationType.Android) {
63 | menu_screen.title.setPosition( AppSettings.SCREEN_W / 2 - menu_screen.title.getWidth() / 2,
64 | AppSettings.SCREEN_H + menu_screen.title.getHeight() - 50);
65 | }
66 |
67 | //
68 | menu_screen.getStage().addActor(menu_screen.title);
69 | }
70 |
71 | /**
72 | * Send in title.
73 | *
74 | * @param menu_screen the menu_screen
75 | */
76 | public void sendInTitle(final MAMainMenuScreen menu_screen) {
77 | menu_screen.title.addAction(Actions.moveTo(
78 | AppSettings.SCREEN_W / 2
79 | - menu_screen.title.getWidth() / 2,
80 | AppSettings.SCREEN_H
81 | - menu_screen.title.getHeight(), 0.5f));
82 |
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IAssets.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAssets.java
3 | * Version: 1.0
4 | * Date: @date 13:09:32
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.interfaces;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IAssets.
32 | */
33 | public interface IAssets {
34 |
35 | /**
36 | * Load all.
37 | */
38 | public void loadAll();
39 |
40 | /**
41 | * Load skin.
42 | */
43 | public void loadSkin();
44 |
45 | /**
46 | * Load texture atlas.
47 | */
48 | public void loadTextureAtlas();
49 |
50 | /**
51 | * Load images.
52 | */
53 | public void loadImages();
54 |
55 | /**
56 | * Load fonts.
57 | */
58 | public void loadFonts();
59 |
60 | /**
61 | * Load animations.
62 | */
63 | public void loadAnimations();
64 |
65 | /**
66 | * Load sounds and musics.
67 | */
68 | public void loadSoundsAndMusics();
69 | }
70 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IAudioManager.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IAudioManager.java
3 | * Version: 1.0
4 | * Date: @date 13:09:43
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.interfaces;
27 |
28 | // TODO: Auto-generated Javadoc
29 | /**
30 | * The Interface IAudioManager.
31 | */
32 | public interface IAudioManager {
33 |
34 | /**
35 | * Sets the up audios.
36 | */
37 | public void setUpAudios();
38 |
39 | /**
40 | * Stop all musics and sounds.
41 | */
42 | public void stopAllMusicsAndSounds();
43 |
44 | /**
45 | * Pause all music and sounds.
46 | */
47 | public void pauseAllMusicAndSounds();
48 | }
49 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IGame.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IGame.java
3 | * Version: 1.0
4 | * Date: @date 13:09:50
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.interfaces;
28 |
29 |
30 | // TODO: Auto-generated Javadoc
31 | /**
32 | * The Interface IGame.
33 | */
34 | public interface IGame {
35 |
36 | /**
37 | * FIRST THING TO DO - Set up app settings for Stage and World sizes.
38 | */
39 | public void setUpAppSettings();
40 |
41 | /**
42 | * Start loading AssetManager, first load the loading screen asset and
43 | * background music asset.
44 | */
45 | public void setUpAssets();
46 |
47 | /**
48 | * Set loading screen.
49 | */
50 | public void setUpLoadingScreen();
51 | }
52 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IGameManager.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IGameManager.java
3 | * Version: 1.0
4 | * Date: @date 13:09:55
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.interfaces;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IGameManager.
32 | */
33 | public interface IGameManager {
34 |
35 | /**
36 | * Set up data that gathered from database (Server/TextFiles/SQLDB/Json/Xml
37 | * etc...)
38 | * */
39 | public void setUpData();
40 |
41 | /**
42 | * Set up pre-sub-managers that needs to be constructed before world
43 | * creation.
44 | */
45 | public void setUpPreManagers();
46 |
47 | /**
48 | * Set up post-sub-managers that needs to be constructed after world
49 | * creation.
50 | */
51 | public void setUpPostManagers();
52 |
53 | /**
54 | * Set up world and layers.
55 | */
56 | public void setUpWorld();
57 |
58 | /**
59 | * Start a level
60 | * *.
61 | *
62 | * @param levelNumber the level number
63 | */
64 | public void startLevel(int levelNumber);
65 |
66 | /**
67 | * Use this in GameManager's updater(), check the game state for win, lose,
68 | * idle, over etc...
69 | * */
70 | public void checkGameCondition();
71 |
72 | /**
73 | * Use this method in SCREEN's render(). This can be used updating world,
74 | * game condition, chracters and many others, it can be also used for MVC
75 | * style development
76 | *
77 | * @param delta the delta
78 | */
79 | public void update(float delta);
80 |
81 | /**
82 | * Save game, suggested use in Hide() and Pause() methods of Screen class.
83 | */
84 | public void saveGame();
85 | }
86 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IGameScreen.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IGameScreen.java
3 | * Version: 1.0
4 | * Date: @date 13:10:03
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.interfaces;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IGameScreen.
32 | */
33 | public interface IGameScreen {
34 | /**
35 | * Set up game manager, add "GameManager.Update()" method to render() method of Screen,
36 | * game manager also handles World creation and management
37 | * */
38 | public void setUpGameManager();
39 |
40 | /**
41 | * Set up the menu for the game, game buttons, power ups, pause, play, etc...
42 | * */
43 | public void setUpGameMenu();
44 | }
45 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IGameSettingManager.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IGameSettingManager.java
3 | * Version: 1.0
4 | * Date: @date 13:10:31
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.interfaces;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IGameSettingManager.
32 | */
33 | public interface IGameSettingManager {
34 |
35 | /**
36 | * Create first launch files, txts, databases...
37 | * */
38 | public void createFirstLaunchFiles();
39 | }
40 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IScreen.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IScreen.java
3 | * Version: 1.0
4 | * Date: @date 13:11:03
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.interfaces;
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Interface IScreen.
32 | */
33 | public interface IScreen {
34 | /**
35 | * Set up screen elements. Call this method in constructor first
36 | *
37 | * SUCH AS:
38 | * - Load assets
39 | * - Set back button active
40 | * - Set background texture
41 | * */
42 | public void setUpScreenElements();
43 |
44 | /**
45 | * Set up screen menu.
46 | */
47 | public void setUpMenu();
48 | }
49 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/interfaces/IScreenLoading.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IScreenLoading.java
3 | * Version: 1.0
4 | * Date: @date 13:11:08
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.interfaces;
27 |
28 | // TODO: Auto-generated Javadoc
29 | /**
30 | * The Interface IScreenLoading.
31 | */
32 | public interface IScreenLoading {
33 | /**
34 | * Set up loading screen (Loading/Splash assets, optional loading timer,
35 | * etc..)
36 | * */
37 | public void setUpLoading();
38 | }
39 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/managers/AudioManager.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: AudioManager.java
3 | * Version: 1.0
4 | * Date: @date 13:11:29
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.managers;
28 |
29 | import com.badlogic.gdx.audio.Music;
30 | import com.badlogic.gdx.audio.Sound;
31 |
32 | // TODO: Auto-generated Javadoc
33 | /**
34 | * The Class AudioManager.
35 | */
36 | public class AudioManager {
37 |
38 | /**
39 | * Instantiates a new audio manager.
40 | */
41 | public AudioManager() {
42 | }
43 |
44 | /**
45 | * Play sound effect, it only plays if SettingsManager.isSoundOn() is true
46 | *
47 | * @param sound
48 | * to play
49 | * @param volume
50 | * is the volume setting (Range [0.0 - 1.0])
51 | * @see SettingsManager.isSoundOn
52 | *
53 | * */
54 | public void playSound(Sound sound, float volume) {
55 | if (SettingsManager.isSoundOn()) {
56 | sound.play(volume);
57 | }
58 | }
59 |
60 | /**
61 | * Play music, it only plays if SettingsManager.isMusicOn() is true
62 | *
63 | * @param music
64 | * to play
65 | * @param isLooping
66 | * to loop or not
67 | * @param volume
68 | * is the volume setting (Range [0.0 - 1.0])
69 | * @see SettingsManager.isMusicOn
70 | *
71 | * */
72 | public void playMusic(Music music, boolean isLooping, float volume) {
73 | if (SettingsManager.isMusicOn()) {
74 | music.setLooping(isLooping);
75 | music.setVolume(volume);
76 | music.play();
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/managers/TiltManager.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: TiltManager.java
3 | * Version: 1.0
4 | * Date: @date 13:11:54
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.managers;
28 |
29 | import java.util.ArrayList;
30 |
31 | import com.badlogic.gdx.Gdx;
32 | import com.sawan.mathattack.utils.UtilsNumbers;
33 |
34 | // TODO: Auto-generated Javadoc
35 | /**
36 | * The Class TiltManager.
37 | */
38 | public class TiltManager {
39 |
40 | /** The is sensor active. */
41 | private boolean isSensorActive;
42 |
43 | /** The accel list for accuracy. */
44 | private ArrayList accelListForAccuracy;
45 |
46 | /**
47 | * The Enum Accel.
48 | */
49 | public enum Accel {
50 |
51 | /** The x. */
52 | X,
53 | /** The y. */
54 | Y,
55 | /** The z. */
56 | Z
57 | }
58 |
59 | /**
60 | * Instantiates a new tilt manager.
61 | */
62 | public TiltManager() {
63 | isSensorActive = true;
64 | accelListForAccuracy = new ArrayList();
65 | }
66 |
67 | /**
68 | * Gets the accel x.
69 | *
70 | * @return the accel x
71 | */
72 | public float getAccelX() {
73 | if (isSensorActive) {
74 | return Gdx.input.getAccelerometerX();
75 | } else {
76 | return 0.0f;
77 | }
78 | }
79 |
80 | /**
81 | * Gets the accel y.
82 | *
83 | * @return the accel y
84 | */
85 | public float getAccelY() {
86 | if (isSensorActive) {
87 | return Gdx.input.getAccelerometerY();
88 | } else {
89 | return 0.0f;
90 | }
91 | }
92 |
93 | /**
94 | * Gets the accel z.
95 | *
96 | * @return the accel z
97 | */
98 | public float getAccelZ() {
99 | if (isSensorActive) {
100 | return Gdx.input.getAccelerometerZ();
101 | } else {
102 | return 0.0f;
103 | }
104 | }
105 |
106 | /**
107 | * Gets the accurate accel.
108 | *
109 | * @param accel the accel
110 | * @param numberOfAvarage the number of avarage
111 | * @return the accurate accel
112 | */
113 | public float getAccurateAccel(Accel accel, int numberOfAvarage) {
114 | // FIXME
115 | // Not works fine
116 |
117 | float result = 0.0f;
118 |
119 | if (accel == Accel.X) {
120 | result = getAccelX();
121 | } else if (accel == Accel.Y) {
122 | result = getAccelY();
123 | } else if (accel == Accel.Z) {
124 | result = getAccelZ();
125 | } else {
126 | return result;
127 | }
128 |
129 | accelListForAccuracy.add(result);
130 | //
131 | if (accelListForAccuracy.size() >= numberOfAvarage) {
132 | result = UtilsNumbers.calculateAverage(accelListForAccuracy);
133 | accelListForAccuracy.clear();
134 | return result;
135 | } else {
136 | return 0.0f;
137 | }
138 | }
139 |
140 | /**
141 | * Checks if is sensor active.
142 | *
143 | * @return true, if is sensor active
144 | */
145 | public boolean isSensorActive() {
146 | return isSensorActive;
147 | }
148 |
149 | /**
150 | * Sets the sensor active.
151 | *
152 | * @param isSensorActive the new sensor active
153 | */
154 | public void setSensorActive(boolean isSensorActive) {
155 | this.isSensorActive = isSensorActive;
156 | }
157 | }
158 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/managers/VibrationManager.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: VibrationManager.java
3 | * Version: 1.0
4 | * Date: @date 13:11:59
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.managers;
28 |
29 | import com.badlogic.gdx.Gdx;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class VibrationManager.
34 | */
35 | public class VibrationManager {
36 | // Milliseconds (Mostly from MORSE CODE)
37 | /** The Constant BUZZ. */
38 | public static final int BUZZ = 50;
39 |
40 | /** The Constant DOT. */
41 | public static final int DOT = 100;
42 |
43 | /** The Constant DASH. */
44 | public static final int DASH = 500;
45 |
46 | /** The Constant SHORT_GAP. */
47 | public static final int SHORT_GAP = 200;
48 |
49 | /** The Constant MEDIUM_GAP. */
50 | public static final int MEDIUM_GAP = 500;
51 |
52 | /** The Constant LONG_GAP. */
53 | public static final int LONG_GAP = 1000;
54 |
55 | /**
56 | * Instantiates a new vibration manager.
57 | */
58 | public VibrationManager() {
59 | }
60 |
61 | /**
62 | * Vibrate, it only vibrates if SettingsManager.isVibrationOn(), 1000ms is 1
63 | * second, also requires "android.permission.VIBRATE" in android manifest
64 | *
65 | * @param milliseconds the milliseconds
66 | */
67 | public void vibrate(int milliseconds) {
68 | if (SettingsManager.isVibrationOn()) {
69 | Gdx.input.vibrate(milliseconds);
70 | }
71 | }
72 |
73 | /**
74 | * Vibrate with a pattern, it only vibrates if
75 | * SettingsManager.isVibrationOn(), 1000ms is 1 second, also requires
76 | * "android.permission.VIBRATE" in android manifest
77 | *
78 | * @param pattern the pattern
79 | * @param repeat the repeat
80 | */
81 | public void vibrate(long[] pattern, int repeat) {
82 | if (SettingsManager.isVibrationOn()) {
83 | Gdx.input.vibrate(pattern, repeat);
84 | }
85 | }
86 |
87 | /**
88 | * Cancel vibration.
89 | */
90 | public void cancel() {
91 | Gdx.input.cancelVibrate();
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/math/IQuestion.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: IQuestion.java
3 | * Version: 1.0
4 | * Date: 26/3/2015 8:54:45
5 | * Author: Itop1
6 | * Copyright: Copyright 200X Itop1
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.math;
27 |
28 | // TODO: Auto-generated Javadoc
29 | /**
30 | * The Interface IQuestion.
31 | *
32 | * @author Itop1
33 | */
34 | public interface IQuestion {
35 |
36 | /**
37 | * Sets the question.
38 | *
39 | * @param first_number the first_number
40 | * @param second_number the second_number
41 | * @return the string
42 | */
43 | public String setQuestion(int first_number, int second_number);
44 |
45 | /**
46 | * Gets the answer.
47 | *
48 | * @return the answer
49 | */
50 | public int getAnswer();
51 |
52 | /**
53 | * Sets the random answers.
54 | *
55 | * @param correct_answer the new random answers
56 | */
57 | public void setRandomAnswers(int correct_answer);
58 |
59 | /**
60 | * Gets the question.
61 | *
62 | * @return the question
63 | */
64 | public String getQuestion();
65 |
66 | /**
67 | * Gets the correct_answer.
68 | *
69 | * @return the correct_answer
70 | */
71 | int getCorrect_answer();
72 |
73 | /**
74 | * Gets the answers.
75 | *
76 | * @return the answers
77 | */
78 | int[] getAnswers();
79 | }
80 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/math/QuestionsSettings.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: QuestionsSettings.java
3 | * Version: 1.0
4 | * Date: 26/3/2015 9:52:29
5 | * Author: Itop1
6 | * Copyright: Copyright 200X Itop1
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.math;
27 |
28 |
29 | // TODO: Auto-generated Javadoc
30 | /**
31 | * The Class QuestionsSettings.
32 | *
33 | * @author Itop1
34 | */
35 | public class QuestionsSettings {
36 |
37 | /** The Constant OPERATION_SYMBOL_ADDITION. */
38 | public final static String OPERATION_SYMBOL_ADDITION = "+";
39 |
40 | /** The Constant OPERATION_SYMBOL_SUBTRACTION. */
41 | public final static String OPERATION_SYMBOL_SUBTRACTION = "-";
42 |
43 | /** The Constant OPERATION_SYMBOL_MULTIPLICATION. */
44 | public final static String OPERATION_SYMBOL_MULTIPLICATION = "x";
45 |
46 | /** The Constant NUM_ANSWER. */
47 | public final static int NUM_ANSWER = 3;
48 |
49 | /** The Constant MAX_QUIZ_VALUE. */
50 | public final static int MAX_QUIZ_VALUE = 49;
51 |
52 | /** The Constant MIN_QUIZ_VALUE. */
53 | public final static int MIN_QUIZ_VALUE = 0;
54 | }
55 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/math/QuestionsUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: QuestionsUtils.java
3 | * Version: 1.0
4 | * Date: 26/3/2015 13:44:01
5 | * Author: Itop1
6 | * Copyright: Copyright 200X Itop1
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.math;
27 |
28 | import java.util.Random;
29 |
30 | // TODO: Auto-generated Javadoc
31 | /**
32 | * The Class QuestionsUtils.
33 | *
34 | * @author Itop1
35 | */
36 | public class QuestionsUtils {
37 |
38 | // Implementing Fisher�Yates shuffle
39 | /**
40 | * Shuffle array.
41 | *
42 | * @param ar the ar
43 | */
44 | public static void shuffleArray(int[] ar) {
45 | Random rnd = new Random();
46 |
47 | for (int i = ar.length - 1; i > 0; i--) {
48 | int index = rnd.nextInt(i + 1);
49 |
50 | // Simple swap
51 | int a = ar[index];
52 | ar[index] = ar[i];
53 | ar[i] = a;
54 | }
55 | }
56 |
57 | /**
58 | * Random number.
59 | *
60 | * @param lower_bound the lower_bound
61 | * @param higher_bound the higher_bound
62 | * @return the int
63 | */
64 | public static int randomNumber(int lower_bound, int higher_bound) {
65 | // A random integer value in the range [Lower_bound, Higher_bound]
66 | // Lower_bound + (int)(Math.random() * ((Higher_bound - Lower_bound) + 1))
67 | int random_number = lower_bound + (int)(Math.random() * ((higher_bound - lower_bound) + 1)) ;
68 | return random_number;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/models/EmptyActor.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: EmptyActor.java
3 | * Version: 1.0
4 | * Date: @date 13:12:10
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.models;
28 |
29 | import com.sawan.mathattack.scene2d.AbstractActor;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class EmptyActor.
34 | */
35 | public class EmptyActor extends AbstractActor {
36 |
37 | /**
38 | * Instantiates a new empty actor.
39 | *
40 | * @param posX the pos x
41 | * @param posY the pos y
42 | * @param width the width
43 | * @param height the height
44 | */
45 | public EmptyActor(float posX, float posY, float width, float height) {
46 | super(posX, posY, width, height);
47 | }
48 |
49 | /**
50 | * Instantiates a new empty actor.
51 | *
52 | * @param width the width
53 | * @param height the height
54 | * @param DIPActive the DIP active
55 | */
56 | public EmptyActor(float width, float height, boolean DIPActive) {
57 | super(width, height, DIPActive);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/models/EmptyActorLight.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: EmptyActorLight.java
3 | * Version: 1.0
4 | * Date: @date 13:12:14
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.models;
28 |
29 | import com.sawan.mathattack.scene2d.AbstractActorLight;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class EmptyActorLight.
34 | */
35 | public class EmptyActorLight extends AbstractActorLight {
36 |
37 | /**
38 | * Instantiates a new empty actor light.
39 | *
40 | * @param posX the pos x
41 | * @param posY the pos y
42 | * @param width the width
43 | * @param height the height
44 | */
45 | public EmptyActorLight(float posX, float posY, float width, float height) {
46 | super(posX, posY, width, height);
47 | }
48 |
49 | /**
50 | * Instantiates a new empty actor light.
51 | *
52 | * @param width the width
53 | * @param height the height
54 | * @param DIPActive the DIP active
55 | */
56 | public EmptyActorLight(float width, float height,boolean DIPActive) {
57 | super(width, height, DIPActive);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/models/EmptyGroup.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: EmptyGroup.java
3 | * Version: 1.0
4 | * Date: @date 13:12:18
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.models;
28 |
29 | import com.sawan.mathattack.scene2d.AbstractGroup;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class EmptyGroup.
34 | */
35 | public class EmptyGroup extends AbstractGroup {
36 |
37 | /**
38 | * Instantiates a new empty group.
39 | *
40 | * @param posX the pos x
41 | * @param posY the pos y
42 | * @param width the width
43 | * @param height the height
44 | */
45 | public EmptyGroup(float posX, float posY, float width, float height) {
46 | super(posX, posY, width, height);
47 | }
48 |
49 | /**
50 | * Instantiates a new empty group.
51 | *
52 | * @param width the width
53 | * @param height the height
54 | * @param DIPActive the DIP active
55 | */
56 | public EmptyGroup(float width, float height, boolean DIPActive) {
57 | super(width, height, DIPActive);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/models/EmptyGroupLight.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: EmptyGroupLight.java
3 | * Version: 1.0
4 | * Date: @date 13:12:24
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.models;
28 |
29 | import com.sawan.mathattack.scene2d.AbstractGroupLight;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class EmptyGroupLight.
34 | */
35 | public class EmptyGroupLight extends AbstractGroupLight {
36 |
37 | /**
38 | * Instantiates a new empty group light.
39 | *
40 | * @param posX the pos x
41 | * @param posY the pos y
42 | * @param width the width
43 | * @param height the height
44 | */
45 | public EmptyGroupLight(float posX, float posY, float width, float height) {
46 | super(posX, posY, width, height);
47 | }
48 |
49 | /**
50 | * Instantiates a new empty group light.
51 | *
52 | * @param width the width
53 | * @param height the height
54 | * @param DIPActive the DIP active
55 | */
56 | public EmptyGroupLight(float width, float height, boolean DIPActive) {
57 | super(width, height, DIPActive);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/models/ammunition/Bullet.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: Bullet.java
3 | * Version: 1.0
4 | * Date: 27/3/2015 12:02:33
5 | * Author: Itop1
6 | * Copyright: Copyright 200X Itop1
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.models.ammunition;
27 |
28 | import com.sawan.mathattack.scene2d.AbstractActor;
29 |
30 | // TODO: Auto-generated Javadoc
31 | /**
32 | * The Class Bullet.
33 | *
34 | * @author Itop1
35 | */
36 | public class Bullet extends AbstractActor {
37 |
38 | /** The world width. */
39 | float worldWidth;
40 |
41 | /** The speed. */
42 | float speed;
43 |
44 | /** The is moving. */
45 | boolean isMoving;
46 |
47 | /**
48 | * Instantiates a new bullet.
49 | *
50 | * @param width the width
51 | * @param height the height
52 | * @param DIPActive the DIP active
53 | */
54 | public Bullet(float width, float height, boolean DIPActive) {
55 | super(width, height, DIPActive);
56 | }
57 |
58 | /**
59 | * Start moving.
60 | *
61 | * @param worldWidht the world widht
62 | * @param speed the speed
63 | * @param isMoving the is moving
64 | */
65 | public void startMoving(float worldWidht, float speed, boolean isMoving) {
66 | this.worldWidth = worldWidht;
67 | this.speed = speed;
68 | this.isMoving = isMoving;
69 | }
70 |
71 |
72 | /* (non-Javadoc)
73 | * @see com.sawan.mathattack.scene2d.AbstractActor#act(float)
74 | */
75 | @Override
76 | public void act(float delta) {
77 | super.act(delta);
78 |
79 | if(isMoving){
80 | translateWithoutAcc(speed, 0, delta);
81 | }
82 | }
83 |
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/models/characters/enemies/MAMonster.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: BlueMonster.java
3 | * Version: 1.0
4 | * Date: 21/03/2015 18:55:57
5 | * Author: Sawan
6 | * Copyright: Copyright 200X Sawan
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.models.characters.enemies;
27 |
28 | import com.sawan.mathattack.scene2d.AbstractActor;
29 |
30 | // TODO: Auto-generated Javadoc
31 | /**
32 | * The Class MAMonster.
33 | *
34 | * @author Sawan
35 | */
36 | public class MAMonster extends AbstractActor {
37 |
38 | /** The world width. */
39 | float worldWidth;
40 |
41 | /** The speed. */
42 | float speed;
43 |
44 | /** The is moving. */
45 | boolean isMoving;
46 |
47 | /** The is looping. */
48 | boolean isLooping;
49 |
50 | /** The is alive. */
51 | boolean isAlive;
52 |
53 |
54 | /**
55 | * Instantiates a new MA monster.
56 | *
57 | * @param width the width
58 | * @param height the height
59 | * @param DIPActive the DIP active
60 | */
61 | public MAMonster(float width, float height, boolean DIPActive) {
62 | super(width, height, DIPActive);
63 | isAlive = true;
64 | }
65 |
66 | /**
67 | * Start moving.
68 | *
69 | * @param worldWidth the world width
70 | * @param speed the speed
71 | * @param isMoving the is moving
72 | * @param isLooping the is looping
73 | */
74 | public void startMoving(float worldWidth, float speed, boolean isMoving, boolean isLooping){
75 | this.worldWidth = worldWidth;
76 | this.speed = speed;
77 | this.isMoving = isMoving;
78 | this.isLooping = isLooping;
79 |
80 | }
81 |
82 | /* (non-Javadoc)
83 | * @see com.sawan.mathattack.scene2d.AbstractActor#act(float)
84 | */
85 | @Override
86 | public void act(float delta) {
87 | super.act(delta);
88 | //
89 | if (isLooping) {
90 | checkPosition();
91 | }
92 | //
93 | if(isMoving){
94 | translateWithoutAcc(-speed, 0, delta);
95 | }
96 | }
97 |
98 | /**
99 | * Check position.
100 | */
101 | private void checkPosition() {
102 | if(getX() < -200){
103 | setX(worldWidth + 200);
104 | }
105 | }
106 |
107 | /**
108 | * Checks if is alive.
109 | *
110 | * @return the isAlive
111 | */
112 | public boolean isAlive() {
113 | return isAlive;
114 | }
115 |
116 | /**
117 | * Sets the alive.
118 | *
119 | * @param isAlive the isAlive to set
120 | */
121 | public void setAlive(boolean isAlive) {
122 | this.isAlive = isAlive;
123 | }
124 |
125 |
126 | }
127 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/scene2d/ui/ButtonGame.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: ButtonGame.java
3 | * Version: 1.0
4 | * Date: @date 13:14:15
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.scene2d.ui;
28 |
29 |
30 | import com.badlogic.gdx.graphics.g2d.BitmapFont;
31 | import com.badlogic.gdx.graphics.g2d.SpriteBatch;
32 |
33 |
34 | import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
35 |
36 | // TODO: Auto-generated Javadoc
37 | /**
38 | * The Class ButtonGame.
39 | */
40 | public class ButtonGame extends AbstractButton {
41 |
42 | /**
43 | * Instantiates a new button game.
44 | *
45 | * @param bitMapFont the bit map font
46 | * @param up the up
47 | * @param down the down
48 | */
49 | public ButtonGame(BitmapFont bitMapFont, Drawable up, Drawable down) {
50 | super(bitMapFont, up, down);
51 | }
52 |
53 | /**
54 | * Instantiates a new button game.
55 | *
56 | * @param bitMapFont the bit map font
57 | * @param up the up
58 | * @param down the down
59 | * @param width the width
60 | * @param height the height
61 | * @param DIPActive the DIP active
62 | */
63 | public ButtonGame(BitmapFont bitMapFont, Drawable up, Drawable down,
64 | float width, float height, boolean DIPActive) {
65 | super(bitMapFont, up, down, width, height, DIPActive);
66 | }
67 |
68 | /* (non-Javadoc)
69 | * @see com.badlogic.gdx.scenes.scene2d.ui.Button#draw(com.badlogic.gdx.graphics.g2d.SpriteBatch, float)
70 | */
71 | @Override
72 | public void draw(SpriteBatch batch, float parentAlpha) {
73 | // If button locked
74 | // ##################################################################
75 | if (isLockActive && textureLocked != null) {
76 | drawLocked(batch);
77 | }
78 |
79 | // If text set and intented to be used
80 | // ##################################################################
81 | else if (text != "" && bitMapFont != null && isTextActive) {
82 | super.draw(batch, parentAlpha);
83 | drawText(batch);
84 | drawExternalTexture(batch);
85 | }
86 |
87 | // Draw default
88 | // ##################################################################
89 | else {
90 | super.draw(batch, parentAlpha);
91 | drawExternalTexture(batch);
92 | }
93 | }
94 |
95 | /**
96 | * Draw external texture.
97 | *
98 | * @param batch the batch
99 | */
100 | private void drawExternalTexture(SpriteBatch batch) {
101 | if(isExternalTextureActive && textureExternal != null){
102 | batch.draw(textureExternal, getX() + externalTexturePosX, getY() + externalTexturePosY, externalTextureSizeW, externalTextureSizeH);
103 | }
104 | }
105 |
106 | /**
107 | * Draw locked.
108 | *
109 | * @param batch the batch
110 | */
111 | private void drawLocked(SpriteBatch batch) {
112 | batch.draw(textureLocked, getX(), getY(), getWidth(), getHeight());
113 | }
114 |
115 | /**
116 | * Draw text.
117 | *
118 | * @param batch the batch
119 | */
120 | private void drawText(SpriteBatch batch) {
121 | bitMapFont.draw(batch, text, getX() + textPosX, getY() + textPosY);
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/scene2d/ui/ButtonLight.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: ButtonLight.java
3 | * Version: 1.0
4 | * Date: @date 13:14:29
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.scene2d.ui;
27 |
28 | import com.badlogic.gdx.graphics.g2d.TextureRegion;
29 | import com.sawan.mathattack.scene2d.AbstractGroupLight;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class ButtonLight.
34 | */
35 | public class ButtonLight extends AbstractGroupLight {
36 |
37 | //
38 | /** The is toggle active. */
39 | private boolean isToggleActive;
40 |
41 | /**
42 | * Instantiates a new button light.
43 | *
44 | * @param width the width
45 | * @param height the height
46 | * @param texture the texture
47 | * @param DIPActive the DIP active
48 | */
49 | public ButtonLight(float width, float height, TextureRegion texture,
50 | boolean DIPActive) {
51 | super(width, height, DIPActive);
52 | //
53 | setTextureRegion(texture, true);
54 | this.isToggleActive = false;
55 | }
56 |
57 | /**
58 | * Checks if is toggle active.
59 | *
60 | * @return true, if is toggle active
61 | */
62 | public boolean isToggleActive() {
63 | return isToggleActive;
64 | }
65 |
66 | /**
67 | * Sets the toggle active.
68 | *
69 | * @param isToggleActive the new toggle active
70 | */
71 | public void setToggleActive(boolean isToggleActive) {
72 | this.isToggleActive = isToggleActive;
73 | }
74 |
75 | /**
76 | * Sets the toggle switch.
77 | */
78 | public void setToggleSwitch() {
79 | if (isToggleActive) {
80 | isToggleActive = false;
81 | } else {
82 | isToggleActive = true;
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/scene2d/ui/ButtonSlider.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: ButtonSlider.java
3 | * Version: 1.0
4 | * Date: @date 13:14:33
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.scene2d.ui;
27 |
28 | import com.badlogic.gdx.scenes.scene2d.ui.Slider;
29 | import com.sawan.mathattack.settings.AppSettings;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class ButtonSlider.
34 | */
35 | public class ButtonSlider extends Slider {
36 |
37 | /**
38 | * Instantiates a new button slider.
39 | *
40 | * @param min the min
41 | * @param max the max
42 | * @param stepSize the step size
43 | * @param vertical the vertical
44 | * @param style the style
45 | * @param width the width
46 | * @param height the height
47 | * @param DIPActive the DIP active
48 | */
49 | public ButtonSlider(float min, float max, float stepSize, boolean vertical,
50 | SliderStyle style, float width, float height, boolean DIPActive) {
51 | super(min, max, stepSize, vertical, style);
52 | //
53 | if (DIPActive) {
54 | setSize(width * AppSettings.getWorldSizeRatio(), height
55 | * AppSettings.getWorldSizeRatio());
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/scene2d/ui/Text.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: Text.java
3 | * Version: 1.0
4 | * Date: @date 13:15:54
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.scene2d.ui;
28 |
29 | import com.badlogic.gdx.graphics.g2d.BitmapFont;
30 | import com.badlogic.gdx.graphics.g2d.SpriteBatch;
31 | import com.sawan.mathattack.scene2d.AbstractActorLight;
32 | import com.sawan.mathattack.settings.AppSettings;
33 |
34 | // TODO: Auto-generated Javadoc
35 | /**
36 | * The Class Text.
37 | */
38 | public class Text extends AbstractActorLight {
39 |
40 | /** The text. */
41 | private String text = "";
42 |
43 | /** The bit map font. */
44 | private BitmapFont bitMapFont;
45 | //
46 | /** The original pos y. */
47 | private float originalPosY;
48 |
49 | /**
50 | * Instantiates a new text.
51 | *
52 | * @param bitMapFont the bit map font
53 | * @param width the width
54 | * @param height the height
55 | * @param DIPActive the DIP active
56 | */
57 | public Text(BitmapFont bitMapFont, float width, float height,
58 | boolean DIPActive) {
59 | super(width, height, DIPActive);
60 | this.bitMapFont = bitMapFont;
61 | //
62 | if (DIPActive) {
63 | bitMapFont.setScale(AppSettings.getWorldSizeRatio());
64 | }
65 | }
66 |
67 | /**
68 | * Sets the bit map font.
69 | *
70 | * @param bitMapFont the bit map font
71 | * @param DIPActive the DIP active
72 | */
73 | public void setBitMapFont(BitmapFont bitMapFont, boolean DIPActive) {
74 | this.bitMapFont = bitMapFont;
75 | //
76 | if (DIPActive) {
77 | bitMapFont.setScale(AppSettings.getWorldSizeRatio());
78 | }
79 | }
80 |
81 | /* (non-Javadoc)
82 | * @see com.sawan.mathattack.scene2d.AbstractActorLight#draw(com.badlogic.gdx.graphics.g2d.SpriteBatch, float)
83 | */
84 | @Override
85 | public void draw(SpriteBatch batch, float parentAlpha) {
86 | super.draw(batch, parentAlpha);
87 | //
88 | drawText(batch);
89 | }
90 |
91 | /**
92 | * Draw text.
93 | *
94 | * @param batch the batch
95 | */
96 | private void drawText(SpriteBatch batch) {
97 | if (bitMapFont != null) {
98 | bitMapFont.draw(batch, text, getX(), getY());
99 | }
100 | }
101 |
102 | /**
103 | * Gets the text.
104 | *
105 | * @return the text
106 | */
107 | public String getText() {
108 | return text;
109 | }
110 |
111 | /**
112 | * Sets the text.
113 | *
114 | * @param text the new text
115 | */
116 | public void setText(String text) {
117 | this.text = text;
118 | }
119 |
120 | /**
121 | * Gets the bit map font.
122 | *
123 | * @return the bit map font
124 | */
125 | public BitmapFont getBitMapFont() {
126 | return bitMapFont;
127 | }
128 |
129 | /**
130 | * Gets the original pos y.
131 | *
132 | * @return the original pos y
133 | */
134 | public float getOriginalPosY() {
135 | return originalPosY;
136 | }
137 |
138 | /**
139 | * Sets the original pos y.
140 | *
141 | * @param originalPosY the new original pos y
142 | */
143 | public void setOriginalPosY(float originalPosY) {
144 | this.originalPosY = originalPosY;
145 | }
146 | }
147 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/screen/AbstractScreenLoading.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: AbstractScreenLoading.java
3 | * Version: 1.0
4 | * Date: @date 13:16:19
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.screen;
27 |
28 | import com.sawan.mathattack.game.AbstractGame;
29 | import com.sawan.mathattack.interfaces.IScreenLoading;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class AbstractScreenLoading.
34 | */
35 | public abstract class AbstractScreenLoading extends AbstractScreen implements
36 | IScreenLoading {
37 |
38 | // Loading time before proceed to next screen
39 | /** The loading time. */
40 | private float loadingTime;
41 |
42 | /**
43 | * Instantiates a new abstract screen loading.
44 | *
45 | * @param game the game
46 | * @param screenName the screen name
47 | */
48 | public AbstractScreenLoading(AbstractGame game, String screenName) {
49 | super(game, screenName);
50 | loadingTime = 1f;
51 | //
52 | setUpLoading();
53 | }
54 |
55 | /**
56 | * Get loading time.
57 | *
58 | * @return the loading time
59 | */
60 | public float getLoadingTime() {
61 | return loadingTime;
62 | }
63 |
64 | /**
65 | * Set a loading / splash time. Sometimes AssetManager loads very fast. It
66 | * may needed to wait specific amount of time to show logo, spash image,
67 | * etc... before proceeding next screen
68 | *
69 | * @param loadingTime the new loading time
70 | */
71 | public void setLoadingTime(float loadingTime) {
72 | this.loadingTime = loadingTime;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/settings/MtxLogger.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: MtxLogger.java
3 | * Version: 1.0
4 | * Date: @date 13:16:29
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.settings;
28 |
29 | import com.badlogic.gdx.Gdx;
30 | import com.sawan.mathattack.collision.CollisionDetector;
31 | import com.sawan.mathattack.effects.EffectCreator;
32 | import com.sawan.mathattack.game.AbstractGame;
33 | import com.sawan.mathattack.game.AbstractGameManager;
34 | import com.sawan.mathattack.input.InputIntent;
35 | import com.sawan.mathattack.scene2d.AbstractActor;
36 | import com.sawan.mathattack.scene2d.AbstractActorLight;
37 | import com.sawan.mathattack.scene2d.AbstractGroup;
38 | import com.sawan.mathattack.scene2d.AbstractGroupLight;
39 | import com.sawan.mathattack.scene2d.AbstractWorldScene2d;
40 | import com.sawan.mathattack.screen.AbstractScreen;
41 | import com.sawan.mathattack.utils.UtilsDisposer;
42 |
43 | // TODO: Auto-generated Javadoc
44 | /**
45 | * The Class MtxLogger.
46 | */
47 | public class MtxLogger {
48 |
49 | /** The is master logger active. */
50 | private static boolean isMasterLoggerActive = false;
51 |
52 | /**
53 | * Set logs that you want to see, or kill all logs with master logger,
54 | * default masterlog is false.
55 | *
56 | * @param isMasterLoggerActive the new logs
57 | */
58 | public static void setLogs(boolean isMasterLoggerActive) {
59 | // Master log (To show or not to show any log)
60 | MtxLogger.isMasterLoggerActive = isMasterLoggerActive;
61 |
62 | // AppSettings
63 | AppSettings.Log_Active = true;
64 |
65 | // Game
66 | AbstractGame.logActive = true;
67 | AbstractScreen.logActive = true;
68 | AbstractGameManager.logActive = true;
69 |
70 | // Scene 2D
71 | AbstractActor.logActive = true;
72 | AbstractActorLight.logActive = true;
73 | AbstractGroup.logActive = true;
74 | AbstractGroupLight.logActive = true;
75 | AbstractWorldScene2d.logActive = true;
76 |
77 | // Input
78 | InputIntent.logActive = false;
79 |
80 | // Helpers
81 | EffectCreator.logActive = false;
82 | CollisionDetector.logActive = false;
83 |
84 | // Utilizers
85 | UtilsDisposer.logActive = true;
86 | }
87 |
88 | /**
89 | * Log something.
90 | *
91 | * @param objectLoggerActive the object logger active
92 | * @param methodLoggerActive the method logger active
93 | * @param tag the tag
94 | * @param log the log
95 | */
96 | public static void log(boolean objectLoggerActive,
97 | boolean methodLoggerActive, String tag, String log) {
98 | // Log
99 | if (isMasterLoggerActive && objectLoggerActive && methodLoggerActive) {
100 | Gdx.app.log(tag, log);
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/utils/UtilsActor.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: UtilsActor.java
3 | * Version: 1.0
4 | * Date: @date 13:16:33
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.utils;
28 |
29 | import com.badlogic.gdx.math.Rectangle;
30 | import com.badlogic.gdx.scenes.scene2d.Actor;
31 | import com.badlogic.gdx.scenes.scene2d.Touchable;
32 |
33 | // TODO: Auto-generated Javadoc
34 | /**
35 | * The Class UtilsActor.
36 | */
37 | public class UtilsActor {
38 |
39 | /**
40 | * Get the rectangle of an actor from its current position and size.
41 | *
42 | * @param actor the actor
43 | * @return the rectangle of actor
44 | */
45 | public static Rectangle getRectangleOfActor(Actor actor) {
46 | return new Rectangle(actor.getX(), actor.getY(), actor.getWidth(),
47 | actor.getHeight());
48 | }
49 |
50 | /**
51 | * Set touchable for multiple actors at once.
52 | *
53 | * @param touchable the touchable
54 | * @param actors the actors
55 | */
56 | public static void setTouchable(Touchable touchable, Actor... actors) {
57 | for (Actor a : actors) {
58 | a.setTouchable(touchable);
59 | }
60 | }
61 |
62 | /**
63 | * Set visible for multiple actors at once.
64 | *
65 | * @param isVisible the is visible
66 | * @param actors the actors
67 | */
68 | public static void setVisible(boolean isVisible, Actor... actors) {
69 | for (Actor a : actors) {
70 | a.setVisible(isVisible);
71 | }
72 | }
73 |
74 | /**
75 | * Set scale of multiple actors at once.
76 | *
77 | * @param sx the sx
78 | * @param sy the sy
79 | * @param actors the actors
80 | */
81 | public static void setScale(float sx, float sy, Actor... actors) {
82 | for (Actor a : actors) {
83 | a.setScale(sx, sy);
84 | }
85 | }
86 |
87 | /**
88 | * Set size for multiple actors at once.
89 | *
90 | * @param w the w
91 | * @param h the h
92 | * @param actors the actors
93 | */
94 | public static void setSize(float w, float h, Actor... actors) {
95 | for (Actor a : actors) {
96 | a.setSize(w, h);
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/utils/UtilsDevice.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: UtilsDevice.java
3 | * Version: 1.0
4 | * Date: @date 13:16:50
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.utils;
28 |
29 | import com.badlogic.gdx.Gdx;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class UtilsDevice.
34 | */
35 | public class UtilsDevice {
36 |
37 | /**
38 | * Check if device portrait or landscape, square screens counted as portrait.
39 | *
40 | * @return true, if is orientation portrait
41 | */
42 | public static boolean isOrientationPortrait() {
43 | if (Gdx.graphics.getWidth() <= Gdx.graphics.getHeight())
44 | return true;
45 | else
46 | return false;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/utils/UtilsNumbers.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: UtilsNumbers.java
3 | * Version: 1.0
4 | * Date: @date 13:16:58
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.utils;
28 |
29 | import java.util.ArrayList;
30 | import java.util.Random;
31 | import java.util.regex.Pattern;
32 |
33 | // TODO: Auto-generated Javadoc
34 | /**
35 | * The Class UtilsNumbers.
36 | */
37 | public class UtilsNumbers {
38 | //
39 | /** The Constant logTag. */
40 | protected final static String logTag = "MtxUtilsNumbersLog";
41 |
42 | /** The log active. */
43 | public static boolean logActive = true;
44 |
45 | /** The double pattern. */
46 | private static Pattern doublePattern = Pattern.compile("-?\\d+(\\.\\d*)?");
47 |
48 | /**
49 | * Check if a string is parseable to integer/double.
50 | *
51 | * @param string the string
52 | * @return true, if is int dob
53 | */
54 | public static boolean isIntDob(String string) {
55 | return doublePattern.matcher(string).matches();
56 | }
57 |
58 | /**
59 | * Shuffle an array for integers
60 | *
61 | * EXAMPLE:
62 | * Array [1,2,3,4,5,6] getting shuffled
63 | * After shuffle [2,1,6,3,5,4] or any other combination.
64 | *
65 | * @param a array to shuffle
66 | */
67 | public static void shuffleArray(int[] a) {
68 | int n = a.length;
69 | Random random = new Random();
70 | random.nextInt();
71 | for (int i = 0; i < n; i++) {
72 | int change = i + random.nextInt(n - i);
73 | swap(a, i, change);
74 | }
75 | }
76 |
77 | /**
78 | * Shuffle helper.
79 | *
80 | * @param a the a
81 | * @param i the i
82 | * @param change the change
83 | */
84 | public static void swap(int[] a, int i, int change) {
85 | int helper = a[i];
86 | a[i] = a[change];
87 | a[change] = helper;
88 | }
89 |
90 | /**
91 | * Calculate average number of float list.
92 | *
93 | * @param numbersList the numbers list
94 | * @return the float
95 | */
96 | public static float calculateAverage(ArrayList numbersList) {
97 | Float sum = 0f;
98 | for (Float number : numbersList) {
99 | sum += number;
100 | }
101 | return sum.floatValue() / numbersList.size();
102 | }
103 |
104 | /**
105 | * Find the closets integer of a given integer among integer array list.
106 | *
107 | * @param list the list
108 | * @param value the value
109 | * @return the value found else -1
110 | */
111 | public static int findClosestNumber(ArrayList list, int value) {
112 | int closestMatch = -1;
113 | boolean isFirstNumberTaken = false;
114 | for (int i = 0; i < list.size(); i++) {
115 | if (!isFirstNumberTaken) {
116 | closestMatch = list.get(i);
117 | isFirstNumberTaken = true;
118 | } else {
119 | int current = Math.abs(value - closestMatch);
120 | int next = Math.abs(value - list.get(i));
121 | if (current > next) {
122 | closestMatch = list.get(i);
123 | }
124 | }
125 | }
126 | return closestMatch;
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/utils/UtilsOrigin.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: UtilsOrigin.java
3 | * Version: 1.0
4 | * Date: @date 13:17:02
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 |
27 | package com.sawan.mathattack.utils;
28 |
29 | import com.badlogic.gdx.scenes.scene2d.Actor;
30 |
31 | // TODO: Auto-generated Javadoc
32 | /**
33 | * The Class UtilsOrigin.
34 | */
35 | public class UtilsOrigin {
36 |
37 | /**
38 | * The Enum Origin.
39 | */
40 | public enum Origin {
41 |
42 | /** The center. */
43 | CENTER,
44 | /** The top left. */
45 | TOP_LEFT,
46 | /** The top right. */
47 | TOP_RIGHT,
48 | /** The bottom left. */
49 | BOTTOM_LEFT,
50 | /** The bottom right. */
51 | BOTTOM_RIGHT,
52 | /** The left center. */
53 | LEFT_CENTER,
54 | /** The top center. */
55 | TOP_CENTER,
56 | /** The bottom center. */
57 | BOTTOM_CENTER,
58 | /** The right center. */
59 | RIGHT_CENTER
60 | }
61 |
62 | /**
63 | * Set origin of an actor, since actors are complex objects, its variables
64 | * pointing same reference with copies, so the origin will be set in
65 | * original object.
66 | *
67 | * @param actor actor to set the origin
68 | * @param origin position of the origin, comes from Origin enum class
69 | */
70 | public static void setActorOrigin(Actor actor, Origin origin) {
71 | setOrigin(actor, origin);
72 | }
73 |
74 | /**
75 | * Set multiple actors origin at once.
76 | *
77 | * @param origin position of the origin, comes from Origin enum class
78 | * @param actors multiple actors to set the origin
79 | */
80 | public static void setActorsOrigin(Origin origin, Actor... actors) {
81 | for (Actor a : actors) {
82 | setOrigin(a, origin);
83 | }
84 | }
85 |
86 | /**
87 | * Sets the origin.
88 | *
89 | * @param actor the actor
90 | * @param origin the origin
91 | */
92 | private static void setOrigin(Actor actor, Origin origin) {
93 | switch (origin) {
94 | case CENTER:
95 | actor.setOrigin(actor.getWidth() / 2.0f, actor.getHeight() / 2.0f);
96 | break;
97 | case TOP_LEFT:
98 | actor.setOrigin(0.0f, actor.getHeight());
99 | break;
100 | case TOP_RIGHT:
101 | actor.setOrigin(actor.getWidth(), actor.getHeight());
102 | break;
103 | case BOTTOM_LEFT:
104 | actor.setOrigin(0.0f, 0.0f);
105 | break;
106 | case BOTTOM_RIGHT:
107 | actor.setOrigin(actor.getWidth(), 0.0f);
108 | break;
109 | case LEFT_CENTER:
110 | actor.setOrigin(0.0f, actor.getHeight() / 2.0f);
111 | break;
112 | case TOP_CENTER:
113 | actor.setOrigin(actor.getWidth() / 2.0f, actor.getHeight());
114 | break;
115 | case BOTTOM_CENTER:
116 | actor.setOrigin(actor.getWidth() / 2.0f, 0.0f);
117 | break;
118 | case RIGHT_CENTER:
119 | actor.setOrigin(actor.getWidth(), actor.getHeight() / 2.0f);
120 | break;
121 | default:
122 | actor.setOrigin(actor.getOriginX(), actor.getOriginY());
123 | break;
124 | }
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/utils/UtilsRandomizer.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: UtilsRandomizer.java
3 | * Version: 1.0
4 | * Date: @date 13:17:16
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.utils;
27 |
28 | import java.util.Random;
29 |
30 | public class UtilsRandomizer {
31 | /**
32 | * Get random number in a range (inclusive)
33 | * */
34 | public static int getRandomInclusive(Random rnd, int min, int max) {
35 | return (rnd.nextInt(max + 1 - min) + min);
36 | }
37 |
38 | /**
39 | * Get random number in a range (exclusive)
40 | * */
41 | public static int getRandomExclusive(Random rnd, int min, int max) {
42 | int rndNumber = rnd.nextInt(max - min);
43 | if (rndNumber != 0)
44 | return rndNumber + min;
45 | else
46 | return rndNumber + min + 1;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/core/src/com/sawan/mathattack/utils/UtilsString.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: UtilsString.java
3 | * Version: 1.0
4 | * Date: @date 13:17:19
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.utils;
27 |
28 | // TODO: Auto-generated Javadoc
29 | /**
30 | * The Class UtilsString.
31 | */
32 | public class UtilsString {
33 |
34 | /**
35 | * Remove last chracter of a string.
36 | *
37 | * @param s the s
38 | * @return the string
39 | */
40 | public static String removeLastChar(String s) {
41 | if (s == null || s.length() == 0) {
42 | return s;
43 | }
44 | return s.substring(0, s.length() - 1);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/desktop/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/desktop/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MathAttack-desktop
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.springsource.ide.eclipse.gradle.core.nature
16 | org.eclipse.jdt.core.javanature
17 |
18 |
19 |
20 | assets
21 | 2
22 | PARENT-1-PROJECT_LOC/android/assets
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/desktop/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
2 | #Mon Mar 30 22:48:37 BST 2015
3 | build.family.org.gradle.tooling.model.eclipse.HierarchicalEclipseProject=;
4 | org.springsource.ide.eclipse.gradle.linkedresources=assets/;
5 | org.springsource.ide.eclipse.gradle.rootprojectloc=..
6 |
--------------------------------------------------------------------------------
/desktop/.settings/gradle/org.springsource.ide.eclipse.gradle.refresh.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
2 | #Mon Jan 19 17:02:18 GMT 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | useHierarchicalNames=false
10 |
--------------------------------------------------------------------------------
/desktop/.settings/net.sf.jautodoc.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | header_text=/**\r\n * File name\:\t${file_name}\r\n * Version\:\t\t1.0\r\n * Date\:\t\t${date} ${time}\r\n * Author\:\t\t${user}\r\n * Copyright\:\tCopyright 200X ${user}\r\n *\r\n *\t\t\t\tThis file is part of Math Attack.\r\n *\r\n *\t\t\t\tMath Attack is free software\: you can redistribute it \r\n *\t\t\t\tand/or modify it under the terms of the GNU General\r\n *\t\t\t\tPublic License as published by the Free Software \r\n *\t\t\t\tFoundation, either version 3 of the License, \r\n *\t\t\t\tor (at your option) any later version.\r\n *\r\n *\t\t\t\tMath Attack is distributed in the hope that it will \r\n *\t\t\t\tbe useful, but WITHOUT ANY WARRANTY; without even \r\n *\t\t\t\tthe implied warranty of MERCHANTABILITY or FITNESS \r\n *\t\t\t\tFOR A PARTICULAR PURPOSE. See the GNU General Public\r\n *\t\t\t License for more details.\r\n *\r\n *\t\t\t\tYou should have received a copy of the GNU General \r\n *\t\t\t\tPublic License along with Math Attack. If not, see \r\n *\t\t\t\thttp\://www.gnu.org/licenses/.\r\n */
3 | project_specific_settings=true
4 | properties=date,
5 | properties.date=@date
6 | replacements=\n\n\nGets the\nSets the\nAdds the\nEdits the\nRemoves the\nInits the\nParses the\nCreates the\nBuilds the\nChecks if is\nPrints the\nChecks for\n\n\n
7 |
--------------------------------------------------------------------------------
/desktop/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #
2 | #Mon Mar 30 22:54:21 BST 2015
3 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
7 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
8 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
9 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
10 | eclipse.preferences.version=1
11 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
12 | org.eclipse.jdt.core.compiler.source=1.6
13 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
14 |
--------------------------------------------------------------------------------
/desktop/add.data:
--------------------------------------------------------------------------------
1 | 3
2 | 0
3 | 0
4 | 0
5 | 0
6 | 0
7 | 0
8 | 0
9 |
--------------------------------------------------------------------------------
/desktop/bin/.gitignore:
--------------------------------------------------------------------------------
1 | /com
2 | /data
3 | /menu_back.jpg
4 | /skin
5 | /title.png
6 |
--------------------------------------------------------------------------------
/desktop/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "java"
2 |
3 | sourceCompatibility = 1.6
4 | sourceSets.main.java.srcDirs = [ "src/" ]
5 |
6 | project.ext.mainClassName = "com.sawan.mathattack.desktop.DesktopLauncher"
7 | project.ext.assetsDir = new File("../android/assets");
8 |
9 | task run(dependsOn: classes, type: JavaExec) {
10 | main = project.mainClassName
11 | classpath = sourceSets.main.runtimeClasspath
12 | standardInput = System.in
13 | workingDir = project.assetsDir
14 | ignoreExitValue = true
15 | }
16 |
17 | task dist(type: Jar) {
18 | from files(sourceSets.main.output.classesDir)
19 | from files(sourceSets.main.output.resourcesDir)
20 | from {configurations.compile.collect {zipTree(it)}}
21 | from files(project.assetsDir);
22 |
23 | manifest {
24 | attributes 'Main-Class': project.mainClassName
25 | }
26 | }
27 |
28 | dist.dependsOn classes
29 |
30 | eclipse {
31 | project {
32 | name = appName + "-desktop"
33 | linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets'
34 | }
35 | }
36 |
37 | task afterEclipseImport(description: "Post processing after project generation", group: "IDE") {
38 | doLast {
39 | def classpath = new XmlParser().parse(file(".classpath"))
40 | new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]);
41 | def writer = new FileWriter(file(".classpath"))
42 | def printer = new XmlNodePrinter(new PrintWriter(writer))
43 | printer.setPreserveWhitespace(true)
44 | printer.print(classpath)
45 | }
46 | }
--------------------------------------------------------------------------------
/desktop/mult.data:
--------------------------------------------------------------------------------
1 | 0
2 | 0
3 | 0
4 | 0
5 | 0
6 | 0
7 | 0
8 | 0
9 |
--------------------------------------------------------------------------------
/desktop/profile.data:
--------------------------------------------------------------------------------
1 | 0
2 | 0
3 | 0
4 | 0
5 | 0
6 | 0
7 | 0
8 | 0
9 |
--------------------------------------------------------------------------------
/desktop/src/com/sawan/mathattack/desktop/DesktopLauncher.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: DesktopLauncher.java
3 | * Version: 1.0
4 | * Date: @date 15:39:31
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.desktop;
27 |
28 | import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
29 | import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
30 | import com.sawan.mathattack.MainStarter;
31 |
32 | public class DesktopLauncher {
33 | public static void main (String[] arg) {
34 | LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
35 | config.width = 800;
36 | config.height = 600;
37 |
38 | new LwjglApplication(new MainStarter(), config);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/desktop/sub.data:
--------------------------------------------------------------------------------
1 | 3
2 | 0
3 | 0
4 | 0
5 | 0
6 | 0
7 | 0
8 | 0
9 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.daemon=true
2 | org.gradle.jvmargs=-Xms128m -Xmx512m
3 | org.gradle.configureondemand=true
--------------------------------------------------------------------------------
/gradle/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/gradle/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | gradle
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.springsource.ide.eclipse.gradle.core.nature
16 | org.eclipse.jdt.core.javanature
17 |
18 |
19 |
--------------------------------------------------------------------------------
/gradle/.settings/gradle/org.springsource.ide.eclipse.gradle.core.import.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleImportPreferences
2 | #Thu Feb 19 12:27:23 GMT 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | enableDependendencyManagement=true
10 | projects=;
11 |
--------------------------------------------------------------------------------
/gradle/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
2 | #Thu Feb 19 12:27:25 GMT 2015
3 | build.family.org.gradle.tooling.model.eclipse.HierarchicalEclipseProject=;
4 | org.springsource.ide.eclipse.gradle.linkedresources=
5 | org.springsource.ide.eclipse.gradle.rootprojectloc=
6 |
--------------------------------------------------------------------------------
/gradle/.settings/gradle/org.springsource.ide.eclipse.gradle.refresh.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
2 | #Thu Feb 19 12:27:24 GMT 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | useHierarchicalNames=false
10 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Sep 21 13:08:26 CEST 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-2.2-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/html/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/html/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MathAttack-html
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | com.google.gwt.eclipse.core.gwtProjectValidator
15 |
16 |
17 |
18 |
19 | com.google.gdt.eclipse.core.webAppProjectValidator
20 |
21 |
22 |
23 |
24 |
25 | org.springsource.ide.eclipse.gradle.core.nature
26 | org.eclipse.jdt.core.javanature
27 | com.google.gwt.eclipse.core.gwtNature
28 |
29 |
30 |
--------------------------------------------------------------------------------
/html/.settings/com.google.gdt.eclipse.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | lastWarOutDir=C\:\\Users\\Sawan\\workspace\\MathAttack\\html\\war
3 | warSrcDir=webapp/
4 | warSrcDirIsOutput=false
5 |
--------------------------------------------------------------------------------
/html/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
2 | #Mon Mar 30 22:48:38 BST 2015
3 | org.springsource.ide.eclipse.gradle.linkedresources=
4 | org.springsource.ide.eclipse.gradle.rootprojectloc=..
5 |
--------------------------------------------------------------------------------
/html/.settings/gradle/org.springsource.ide.eclipse.gradle.refresh.prefs:
--------------------------------------------------------------------------------
1 | #org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
2 | #Mon Jan 19 17:02:19 GMT 2015
3 | addResourceFilters=true
4 | afterTasks=afterEclipseImport;
5 | beforeTasks=cleanEclipse;eclipse;
6 | enableAfterTasks=true
7 | enableBeforeTasks=true
8 | enableDSLD=false
9 | useHierarchicalNames=false
10 |
--------------------------------------------------------------------------------
/html/.settings/net.sf.jautodoc.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | header_text=/**\r\n * File name\:\t${file_name}\r\n * Version\:\t\t1.0\r\n * Date\:\t\t${date} ${time}\r\n * Author\:\t\t${user}\r\n * Copyright\:\tCopyright 200X ${user}\r\n *\r\n *\t\t\t\tThis file is part of Math Attack.\r\n *\r\n *\t\t\t\tMath Attack is free software\: you can redistribute it \r\n *\t\t\t\tand/or modify it under the terms of the GNU General\r\n *\t\t\t\tPublic License as published by the Free Software \r\n *\t\t\t\tFoundation, either version 3 of the License, \r\n *\t\t\t\tor (at your option) any later version.\r\n *\r\n *\t\t\t\tMath Attack is distributed in the hope that it will \r\n *\t\t\t\tbe useful, but WITHOUT ANY WARRANTY; without even \r\n *\t\t\t\tthe implied warranty of MERCHANTABILITY or FITNESS \r\n *\t\t\t\tFOR A PARTICULAR PURPOSE. See the GNU General Public\r\n *\t\t\t License for more details.\r\n *\r\n *\t\t\t\tYou should have received a copy of the GNU General \r\n *\t\t\t\tPublic License along with Math Attack. If not, see \r\n *\t\t\t\thttp\://www.gnu.org/licenses/.\r\n */
3 | project_specific_settings=true
4 | properties=date,
5 | properties.date=@date
6 | replacements=\n\n\nGets the\nSets the\nAdds the\nEdits the\nRemoves the\nInits the\nParses the\nCreates the\nBuilds the\nChecks if is\nPrints the\nChecks for\n\n\n
7 |
--------------------------------------------------------------------------------
/html/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #
2 | #Mon Mar 30 22:54:22 BST 2015
3 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
7 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
8 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
9 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
10 | eclipse.preferences.version=1
11 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
12 | org.eclipse.jdt.core.compiler.source=1.6
13 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
14 |
--------------------------------------------------------------------------------
/html/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "java"
2 | apply plugin: "jetty"
3 |
4 | gwt {
5 | gwtVersion='2.6.0' // Should match the gwt version used for building the gwt backend
6 | maxHeapSize="1G" // Default 256m is not enough for gwt compiler. GWT is HUNGRY
7 | minHeapSize="1G"
8 |
9 | src = files(file("src/")) // Needs to be in front of "modules" below.
10 | modules 'com.sawan.mathattack.GdxDefinition'
11 | devModules 'com.sawan.mathattack.GdxDefinitionSuperdev'
12 | project.webAppDirName = 'webapp'
13 |
14 | compiler {
15 | strict = true;
16 | enableClosureCompiler = true;
17 | disableCastChecking = true;
18 | }
19 | }
20 |
21 | task draftRun(type: JettyRunWar) {
22 | dependsOn draftWar
23 | dependsOn.remove('war')
24 | webApp=draftWar.archivePath
25 | daemon=true
26 | }
27 |
28 | task superDev(type: de.richsource.gradle.plugins.gwt.GwtSuperDev) {
29 | dependsOn draftRun
30 | doFirst {
31 | gwt.modules = gwt.devModules
32 | }
33 | }
34 |
35 | task dist(dependsOn: [clean, compileGwt]) {
36 | doLast {
37 | file("build/dist").mkdirs()
38 | copy {
39 | from "build/gwt/out"
40 | into "build/dist"
41 | }
42 | copy {
43 | from "webapp"
44 | into "build/dist"
45 | }
46 | copy {
47 | from "war"
48 | into "build/dist"
49 | }
50 | }
51 | }
52 |
53 | draftWar {
54 | from "war"
55 | }
56 |
57 | task addSource << {
58 | sourceSets.main.compileClasspath += files(project(':core').sourceSets.main.allJava.srcDirs)
59 | }
60 |
61 | tasks.compileGwt.dependsOn(addSource)
62 | tasks.draftCompileGwt.dependsOn(addSource)
63 |
64 | sourceCompatibility = 1.6
65 | sourceSets.main.java.srcDirs = [ "src/" ]
66 |
67 |
68 | eclipse.project {
69 | name = appName + "-html"
70 | }
71 |
--------------------------------------------------------------------------------
/html/src/com/sawan/mathattack/GdxDefinition.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/html/src/com/sawan/mathattack/GdxDefinitionSuperdev.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/html/src/com/sawan/mathattack/client/HtmlLauncher.java:
--------------------------------------------------------------------------------
1 | /**
2 | * File name: HtmlLauncher.java
3 | * Version: 1.0
4 | * Date: @date 15:40:27
5 | * Author: Sawan J. Kapai Harpalani
6 | * Copyright: Copyright 200X Sawan J. Kapai Harpalani
7 | *
8 | * This file is part of Math Attack.
9 | *
10 | * Math Attack is free software: you can redistribute it
11 | * and/or modify it under the terms of the GNU General
12 | * Public License as published by the Free Software
13 | * Foundation, either version 3 of the License,
14 | * or (at your option) any later version.
15 | *
16 | * Math Attack is distributed in the hope that it will
17 | * be useful, but WITHOUT ANY WARRANTY; without even
18 | * the implied warranty of MERCHANTABILITY or FITNESS
19 | * FOR A PARTICULAR PURPOSE. See the GNU General Public
20 | * License for more details.
21 | *
22 | * You should have received a copy of the GNU General
23 | * Public License along with Math Attack. If not, see
24 | * http://www.gnu.org/licenses/.
25 | */
26 | package com.sawan.mathattack.client;
27 |
28 | import com.badlogic.gdx.ApplicationListener;
29 | import com.badlogic.gdx.backends.gwt.GwtApplication;
30 | import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
31 | import com.sawan.mathattack.MainStarter;
32 |
33 | public class HtmlLauncher extends GwtApplication {
34 |
35 | @Override
36 | public GwtApplicationConfiguration getConfig () {
37 | return new GwtApplicationConfiguration(480, 320);
38 | }
39 |
40 | @Override
41 | public ApplicationListener getApplicationListener () {
42 | return new MainStarter();
43 | }
44 | }
--------------------------------------------------------------------------------
/html/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/html/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MathAttack
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
31 |
--------------------------------------------------------------------------------
/html/webapp/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sawankh/MathAttack/119f27cb2ab22d360fe6c40edc10bb8c3b56db5c/html/webapp/refresh.png
--------------------------------------------------------------------------------
/html/webapp/soundmanager2-setup.js:
--------------------------------------------------------------------------------
1 | window.SM2_DEFER = true;
--------------------------------------------------------------------------------
/html/webapp/styles.css:
--------------------------------------------------------------------------------
1 | canvas {
2 | cursor: default;
3 | outline: none;
4 | }
5 |
6 | body {
7 | background-color: #ffffff;
8 | }
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | # Location of the android SDK
2 | sdk.dir=C:\\Users\\Sawan\\Downloads\\INSTALADORES\\adt-bundle-windows-x86_64-20130717\\adt-bundle-windows-x86_64-20130717\\sdk
3 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include 'desktop', 'android', 'html', 'core'
--------------------------------------------------------------------------------