Different distribution of safed user data

New currency (Energy) -> once each level
Levelpacks are shown by their names in WorldsScreen and also ordered by their id
Stars and Energy don't have their sizes safed in levelpacks because they are static
Different Ramp size and Spring effect
Lv up can be shown on every Screen
If clicked on Tool-Bounty on lv-up screen, transfer to Toolshop
This commit is contained in:
= 2017-02-19 15:05:43 +01:00
parent aea336d850
commit 0bad3e064c
98 changed files with 1662 additions and 1110 deletions

View File

@ -456,10 +456,10 @@ public final class R {
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f020042;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f020043;
public static final int abc_textfield_search_material = 0x7f020044;
public static final int notification_template_icon_bg = 0x7f020074;
public static final int notification_template_icon_bg = 0x7f020070;
}
public static final class id {
public static final int action0 = 0x7f0d006b;
public static final int action0 = 0x7f0d006a;
public static final int action_bar = 0x7f0d0041;
public static final int action_bar_activity_content = 0x7f0d0000;
public static final int action_bar_container = 0x7f0d0040;
@ -468,7 +468,7 @@ public final class R {
public static final int action_bar_subtitle = 0x7f0d0022;
public static final int action_bar_title = 0x7f0d0021;
public static final int action_context_bar = 0x7f0d0042;
public static final int action_divider = 0x7f0d006f;
public static final int action_divider = 0x7f0d006e;
public static final int action_menu_divider = 0x7f0d0002;
public static final int action_menu_presenter = 0x7f0d0003;
public static final int action_mode_bar = 0x7f0d003e;
@ -479,9 +479,9 @@ public final class R {
public static final int always = 0x7f0d001b;
public static final int beginning = 0x7f0d0018;
public static final int buttonPanel = 0x7f0d002b;
public static final int cancel_action = 0x7f0d006c;
public static final int cancel_action = 0x7f0d006b;
public static final int checkbox = 0x7f0d0039;
public static final int chronometer = 0x7f0d0072;
public static final int chronometer = 0x7f0d0071;
public static final int collapseActionView = 0x7f0d001c;
public static final int contentPanel = 0x7f0d0031;
public static final int custom = 0x7f0d0037;
@ -491,7 +491,7 @@ public final class R {
public static final int disableHome = 0x7f0d000c;
public static final int edit_query = 0x7f0d0043;
public static final int end = 0x7f0d0019;
public static final int end_padder = 0x7f0d0077;
public static final int end_padder = 0x7f0d0076;
public static final int expand_activities_button = 0x7f0d0025;
public static final int expanded_menu = 0x7f0d0038;
public static final int home = 0x7f0d0004;
@ -499,12 +499,12 @@ public final class R {
public static final int icon = 0x7f0d0029;
public static final int ifRoom = 0x7f0d001d;
public static final int image = 0x7f0d0026;
public static final int info = 0x7f0d0076;
public static final int line1 = 0x7f0d0070;
public static final int line3 = 0x7f0d0074;
public static final int info = 0x7f0d0075;
public static final int line1 = 0x7f0d006f;
public static final int line3 = 0x7f0d0073;
public static final int listMode = 0x7f0d0009;
public static final int list_item = 0x7f0d0028;
public static final int media_actions = 0x7f0d006e;
public static final int media_actions = 0x7f0d006d;
public static final int middle = 0x7f0d001a;
public static final int multiply = 0x7f0d0013;
public static final int never = 0x7f0d001e;
@ -538,13 +538,13 @@ public final class R {
public static final int src_atop = 0x7f0d0015;
public static final int src_in = 0x7f0d0016;
public static final int src_over = 0x7f0d0017;
public static final int status_bar_latest_event_content = 0x7f0d006d;
public static final int status_bar_latest_event_content = 0x7f0d006c;
public static final int submit_area = 0x7f0d004c;
public static final int tabMode = 0x7f0d000b;
public static final int text = 0x7f0d0075;
public static final int text2 = 0x7f0d0073;
public static final int text = 0x7f0d0074;
public static final int text2 = 0x7f0d0072;
public static final int textSpacerNoButtons = 0x7f0d0034;
public static final int time = 0x7f0d0071;
public static final int time = 0x7f0d0070;
public static final int title = 0x7f0d002a;
public static final int title_template = 0x7f0d002f;
public static final int topPanel = 0x7f0d002e;

View File

@ -1628,44 +1628,40 @@ containing a value of this type.
public static final int guis_sound_on=0x7f02004f;
public static final int lock_locked=0x7f020050;
public static final int lock_unlocked=0x7f020051;
public static final int notification_template_icon_bg=0x7f020074;
public static final int obstacle=0x7f020052;
public static final int obstacles_cave=0x7f020053;
public static final int obstacles_grass=0x7f020054;
public static final int obstacles_mountains=0x7f020055;
public static final int playershapes_ball=0x7f020056;
public static final int previews_grass=0x7f020057;
public static final int purple=0x7f020058;
public static final int ramp=0x7f020059;
public static final int rampbutton=0x7f02005a;
public static final int splitter=0x7f02005b;
public static final int star=0x7f02005c;
public static final int star_empty=0x7f02005d;
public static final int star_icon=0x7f02005e;
public static final int stars_0=0x7f02005f;
public static final int stars_1=0x7f020060;
public static final int stars_2=0x7f020061;
public static final int stars_3=0x7f020062;
public static final int terrain_t_grass=0x7f020063;
public static final int tools_bomb=0x7f020064;
public static final int tools_bombbutton=0x7f020065;
public static final int tools_emptybutton=0x7f020066;
public static final int tools_lockedbutton=0x7f020067;
public static final int tools_magnet=0x7f020068;
public static final int tools_magnetbutton=0x7f020069;
public static final int tools_spring=0x7f02006a;
public static final int tools_springbutton=0x7f02006b;
public static final int tools_unlockedbutton=0x7f02006c;
public static final int xml_custom_button=0x7f02006d;
public static final int xml_levelbutton_background=0x7f02006e;
public static final int xml_sound_toggle=0x7f02006f;
public static final int xml_tool_slot_background=0x7f020070;
public static final int xml_toolprogressbarlayers=0x7f020071;
public static final int xml_unlock_message_background=0x7f020072;
public static final int xml_worldbutton_background=0x7f020073;
public static final int notification_template_icon_bg=0x7f020070;
public static final int obstacles_cave=0x7f020052;
public static final int obstacles_grass=0x7f020053;
public static final int obstacles_mountains=0x7f020054;
public static final int playershapes_ball=0x7f020055;
public static final int previews_grass=0x7f020056;
public static final int purple=0x7f020057;
public static final int ramp=0x7f020058;
public static final int rampbutton=0x7f020059;
public static final int splitter=0x7f02005a;
public static final int star=0x7f02005b;
public static final int star_empty=0x7f02005c;
public static final int star_icon=0x7f02005d;
public static final int terrain_c_grass=0x7f02005e;
public static final int terrain_t_grass=0x7f02005f;
public static final int tools_bomb=0x7f020060;
public static final int tools_bombbutton=0x7f020061;
public static final int tools_emptybutton=0x7f020062;
public static final int tools_lockedbutton=0x7f020063;
public static final int tools_magnet=0x7f020064;
public static final int tools_magnetbutton=0x7f020065;
public static final int tools_spring=0x7f020066;
public static final int tools_springbutton=0x7f020067;
public static final int tools_unlockedbutton=0x7f020068;
public static final int xml_custom_button=0x7f020069;
public static final int xml_levelbutton_background=0x7f02006a;
public static final int xml_sound_toggle=0x7f02006b;
public static final int xml_tool_slot_background=0x7f02006c;
public static final int xml_toolprogressbarlayers=0x7f02006d;
public static final int xml_unlock_message_background=0x7f02006e;
public static final int xml_worldbutton_background=0x7f02006f;
}
public static final class id {
public static final int action0=0x7f0d006b;
public static final int action0=0x7f0d006a;
public static final int action_bar=0x7f0d0041;
public static final int action_bar_activity_content=0x7f0d0000;
public static final int action_bar_container=0x7f0d0040;
@ -1674,7 +1670,7 @@ containing a value of this type.
public static final int action_bar_subtitle=0x7f0d0022;
public static final int action_bar_title=0x7f0d0021;
public static final int action_context_bar=0x7f0d0042;
public static final int action_divider=0x7f0d006f;
public static final int action_divider=0x7f0d006e;
public static final int action_menu_divider=0x7f0d0002;
public static final int action_menu_presenter=0x7f0d0003;
public static final int action_mode_bar=0x7f0d003e;
@ -1686,9 +1682,9 @@ containing a value of this type.
public static final int beginning=0x7f0d0018;
public static final int button3=0x7f0d007f;
public static final int buttonPanel=0x7f0d002b;
public static final int cancel_action=0x7f0d006c;
public static final int cancel_action=0x7f0d006b;
public static final int checkbox=0x7f0d0039;
public static final int chronometer=0x7f0d0072;
public static final int chronometer=0x7f0d0071;
public static final int collapseActionView=0x7f0d001c;
public static final int contentPanel=0x7f0d0031;
public static final int custom=0x7f0d0037;
@ -1698,12 +1694,11 @@ containing a value of this type.
public static final int disableHome=0x7f0d000c;
public static final int edit_query=0x7f0d0043;
public static final int end=0x7f0d0019;
public static final int end_padder=0x7f0d0077;
public static final int end_padder=0x7f0d0076;
public static final int expand_activities_button=0x7f0d0025;
public static final int expanded_menu=0x7f0d0038;
public static final int game_countdown=0x7f0d0058;
public static final int game_countdown=0x7f0d0057;
public static final int game_fps=0x7f0d0054;
public static final int game_levelup=0x7f0d0057;
public static final int game_message=0x7f0d0056;
public static final int game_pausebutton=0x7f0d0050;
public static final int game_playerprogress=0x7f0d0052;
@ -1712,35 +1707,35 @@ containing a value of this type.
public static final int game_toolbuttonbar=0x7f0d0051;
public static final int home=0x7f0d0004;
public static final int homeAsUp=0x7f0d000d;
public static final int horizontalScrollView=0x7f0d005f;
public static final int horizontalScrollView=0x7f0d005e;
public static final int icon=0x7f0d0029;
public static final int ifRoom=0x7f0d001d;
public static final int image=0x7f0d0026;
public static final int imageView=0x7f0d0065;
public static final int imageView=0x7f0d0064;
public static final int imageView2=0x7f0d00a4;
public static final int imageView3=0x7f0d00a2;
public static final int info=0x7f0d0076;
public static final int levelbutton_lock=0x7f0d005d;
public static final int levelbutton_star1=0x7f0d005a;
public static final int levelbutton_star2=0x7f0d005b;
public static final int levelbutton_star3=0x7f0d005c;
public static final int levelbutton_textview=0x7f0d0059;
public static final int levels_bottomRow=0x7f0d0061;
public static final int levels_topRow=0x7f0d0060;
public static final int levels_topbar=0x7f0d005e;
public static final int levelup_level=0x7f0d0063;
public static final int levelup_mainlayout=0x7f0d0062;
public static final int levelup_text=0x7f0d0064;
public static final int levelup_unlocklist=0x7f0d0066;
public static final int line1=0x7f0d0070;
public static final int line3=0x7f0d0074;
public static final int info=0x7f0d0075;
public static final int levelbutton_lock=0x7f0d005c;
public static final int levelbutton_star1=0x7f0d0059;
public static final int levelbutton_star2=0x7f0d005a;
public static final int levelbutton_star3=0x7f0d005b;
public static final int levelbutton_textview=0x7f0d0058;
public static final int levels_bottomRow=0x7f0d0060;
public static final int levels_topRow=0x7f0d005f;
public static final int levels_topbar=0x7f0d005d;
public static final int levelup_level=0x7f0d0062;
public static final int levelup_mainlayout=0x7f0d0061;
public static final int levelup_text=0x7f0d0063;
public static final int levelup_unlocklist=0x7f0d0065;
public static final int line1=0x7f0d006f;
public static final int line3=0x7f0d0073;
public static final int listMode=0x7f0d0009;
public static final int list_item=0x7f0d0028;
public static final int media_actions=0x7f0d006e;
public static final int message_exitbutton=0x7f0d0069;
public static final int message_leftbutton=0x7f0d0068;
public static final int message_title=0x7f0d0067;
public static final int message_tryagainbutton=0x7f0d006a;
public static final int media_actions=0x7f0d006d;
public static final int message_exitbutton=0x7f0d0068;
public static final int message_leftbutton=0x7f0d0067;
public static final int message_title=0x7f0d0066;
public static final int message_tryagainbutton=0x7f0d0069;
public static final int middle=0x7f0d001a;
public static final int multiply=0x7f0d0013;
public static final int never=0x7f0d001e;
@ -1766,10 +1761,10 @@ containing a value of this type.
public static final int search_voice_btn=0x7f0d004e;
public static final int select_dialog_listview=0x7f0d004f;
public static final int shortcut=0x7f0d003a;
public static final int shortmenu_continue=0x7f0d0079;
public static final int shortmenu_exit=0x7f0d007b;
public static final int shortmenu_restart=0x7f0d007a;
public static final int shortmenu_topbar=0x7f0d0078;
public static final int shortmenu_continue=0x7f0d0078;
public static final int shortmenu_exit=0x7f0d007a;
public static final int shortmenu_restart=0x7f0d0079;
public static final int shortmenu_topbar=0x7f0d0077;
public static final int showCustom=0x7f0d000f;
public static final int showHome=0x7f0d0010;
public static final int showTitle=0x7f0d0011;
@ -1779,15 +1774,16 @@ containing a value of this type.
public static final int src_in=0x7f0d0016;
public static final int src_over=0x7f0d0017;
public static final int startscreen_comingsoon=0x7f0d007d;
public static final int startscreen_maxcheat=0x7f0d007e;
public static final int startscreen_play=0x7f0d007c;
public static final int startscreen_sound=0x7f0d007e;
public static final int status_bar_latest_event_content=0x7f0d006d;
public static final int startscreen_sound=0x7f0d007b;
public static final int status_bar_latest_event_content=0x7f0d006c;
public static final int submit_area=0x7f0d004c;
public static final int tabMode=0x7f0d000b;
public static final int text=0x7f0d0075;
public static final int text2=0x7f0d0073;
public static final int text=0x7f0d0074;
public static final int text2=0x7f0d0072;
public static final int textSpacerNoButtons=0x7f0d0034;
public static final int time=0x7f0d0071;
public static final int time=0x7f0d0070;
public static final int title=0x7f0d002a;
public static final int title_template=0x7f0d002f;
public static final int toolProgressBar=0x7f0d0085;

View File

@ -1,7 +1,7 @@
<levelPack>
<world>GRASSLANDS</world>
<levelPack id="0">
<theme>GRASSLANDS</theme>
<levels class="java.util.ArrayList">
<level number="1" goalX="22.606565" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="1" goalX="22.606565" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.5854988" width="7.1709976"/>
<tileData x="10.153494" width="10.408993"/>
@ -15,12 +15,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="22.166656" rightEdge="22.666656" height="0.639" y="-0.28050002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="11.159975" y="-0.15999995" width="0.25" height="0.25"/>
<starData index="2" x="15.106676" y="-0.14000002" width="0.25" height="0.25"/>
<starData index="3" x="22.043303" y="-0.20666662" width="0.25" height="0.25"/>
<positionData x="11.159975" y="-0.15999995"/>
<positionData x="15.106676" y="-0.14000002"/>
<positionData x="22.043303" y="-0.20666662"/>
</stars>
</level>
<level number="2" goalX="22.366613" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="2" goalX="22.366613" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.9448314" width="7.8896627"/>
<tileData x="8.345928" width="4.4445295"/>
@ -42,12 +42,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="20.123379" rightEdge="20.623379" height="0.5" y="-0.35000002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="10.94335" y="-0.61999965" width="0.25" height="0.25"/>
<starData index="2" x="15.7367" y="0.3199999" width="0.25" height="0.25"/>
<starData index="3" x="18.893328" y="-0.12666662" width="0.25" height="0.25"/>
<positionData x="10.94335" y="-0.61999965"/>
<positionData x="15.7367" y="0.3199999"/>
<positionData x="18.893328" y="-0.12666662"/>
</stars>
</level>
<level number="3" goalX="19.200012" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="3" goalX="19.200012" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-0.4151678" width="5.1696644"/>
<tileData x="7.1337633" width="8.020197"/>
@ -63,12 +63,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="18.396694" rightEdge="18.896694" height="0.789" y="-0.20550004"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.6399994" y="0.10666669" width="0.25" height="0.25"/>
<starData index="2" x="8.793346" y="-0.4733331" width="0.25" height="0.25"/>
<starData index="3" x="12.253348" y="-0.13333318" width="0.25" height="0.25"/>
<positionData x="2.6399994" y="0.10666669"/>
<positionData x="8.793346" y="-0.4733331"/>
<positionData x="12.253348" y="-0.13333318"/>
</stars>
</level>
<level number="4" goalX="23.933224" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="4" goalX="23.933224" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="6.06402" width="18.12804"/>
<tileData x="19.269924" width="3.0757751"/>
@ -87,12 +87,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="5.79467" rightEdge="8.37867" height="0.544" y="-0.328"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="11.560022" y="-0.26000002" width="0.25" height="0.25"/>
<starData index="2" x="16.310017" y="0.80666655" width="0.25" height="0.25"/>
<starData index="3" x="21.9833" y="-0.099999994" width="0.25" height="0.25"/>
<positionData x="11.560022" y="-0.26000002"/>
<positionData x="16.310017" y="0.80666655"/>
<positionData x="21.9833" y="-0.099999994"/>
</stars>
</level>
<level number="5" goalX="16.249996" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="5" goalX="16.249996" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="1.9915047" width="9.983009"/>
<tileData x="12.045149" width="7.65627"/>
@ -105,12 +105,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="15.29672" rightEdge="15.79672" height="1.539" y="0.1695"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.5799987" y="0.62" width="0.25" height="0.25"/>
<starData index="2" x="7.5566673" y="0.26000008" width="0.25" height="0.25"/>
<starData index="3" x="11.85002" y="-0.4533334" width="0.25" height="0.25"/>
<positionData x="2.5799987" y="0.62"/>
<positionData x="7.5566673" y="0.26000008"/>
<positionData x="11.85002" y="-0.4533334"/>
</stars>
</level>
<level number="6" goalX="27.539873" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="6" goalX="27.539873" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.4867487" width="6.9734974"/>
<tileData x="7.8615937" width="5.390193"/>
@ -135,12 +135,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="24.34991" rightEdge="24.84991" height="0.5" y="-0.35000002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="4.586666" y="-0.5866665" width="0.25" height="0.25"/>
<starData index="2" x="10.696706" y="-0.46666694" width="0.25" height="0.25"/>
<starData index="3" x="20.64665" y="0.39999995" width="0.25" height="0.25"/>
<positionData x="4.586666" y="-0.5866665"/>
<positionData x="10.696706" y="-0.46666694"/>
<positionData x="20.64665" y="0.39999995"/>
</stars>
</level>
<level number="7" goalX="25.866587" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="7" goalX="25.866587" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="2.1916704" width="10.383341"/>
<tileData x="11.639271" width="7.31187"/>
@ -166,12 +166,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="24.1271" rightEdge="24.886099" height="0.694" y="-0.25300002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="6.6800065" y="-0.38666666" width="0.25" height="0.25"/>
<starData index="2" x="13.066695" y="0.48666692" width="0.25" height="0.25"/>
<starData index="3" x="20.679989" y="0.85333335" width="0.25" height="0.25"/>
<positionData x="6.6800065" y="-0.38666666"/>
<positionData x="13.066695" y="0.48666692"/>
<positionData x="20.679989" y="0.85333335"/>
</stars>
</level>
<level number="8" goalX="17.896662" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="8" goalX="17.896662" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-2.0766673" width="1.8466654"/>
<tileData x="2.5266657" width="0.7200012"/>
@ -192,10 +192,94 @@
<obstacleData floating="true" moving="false" deadly="false" leftEdge="-1.0233328" rightEdge="1.9766672" height="0.136" y="-0.86666656"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.543333" y="0.3933335" width="0.25" height="0.25"/>
<starData index="2" x="14.12338" y="-0.79999965" width="0.25" height="0.25"/>
<starData index="3" x="17.523336" y="0.4799996" width="0.25" height="0.25"/>
<positionData x="2.543333" y="0.3933335"/>
<positionData x="14.12338" y="-0.79999965"/>
<positionData x="17.523336" y="0.4799996"/>
</stars>
</level>
<level packId="0" id="9" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="0.45000017" rightEdge="0.95000017" height="0.5" y="-0.35000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="-0.103333026" rightEdge="0.39666697" height="0.5" y="0.22666666">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="true" leftEdge="-1.7966661" rightEdge="-1.2966661" height="0.5" y="-0.35000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="true" leftEdge="-0.7099999" rightEdge="-0.20999992" height="0.5" y="0.21999998">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="0" id="10" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="-0.68833333" rightEdge="0.82166666" height="1.541" y="0.17049998">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="0" id="11" goalX="22.569973" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.23241591" width="6.464832"/>
<tileData x="8.307598" width="7.651533"/>
<tileData x="18.551668" width="8.036609"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="9.7849865" width="25.569973"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.3666725" rightEdge="8.8666725" height="0.344" y="-0.42800003">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="19.186697" rightEdge="19.606695" height="0.4" y="-0.40000004">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.026669" rightEdge="6.026669" height="0.229" y="0.7399997">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="0" id="12" goalX="28.746628" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-0.34033322" width="5.3193336"/>
<tileData x="9.0306835" width="10.206701"/>
<tileData x="22.446331" width="12.600594"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="12.873314" width="31.746628"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.236673" rightEdge="8.736673" height="0.8" y="-0.20000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="21.91664" rightEdge="22.41664" height="0.968" y="-0.11600003">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.5333319" rightEdge="4.533332" height="0.344" y="0.5999999">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.538332" rightEdge="5.6083317" height="0.306" y="0.59999996">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
</levels>
</levelPack>

View File

@ -1,7 +1,7 @@
<levelPack>
<world>TESTCAVE</world>
<levelPack id="1">
<theme>TESTCAVE</theme>
<levels class="java.util.ArrayList">
<level number="1" goalX="33.663338" startSpeed="0.6" endSpeed="0.6" terrainEdge="-0.979" ceilingEdge="1.0">
<level packId="1" id="1" goalX="33.663338" startSpeed="0.6" endSpeed="0.6" terrainEdge="-0.979" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="15.331669" width="36.663338"/>
</terrainTiles>
@ -24,7 +24,7 @@
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="2" goalX="13.38005" startSpeed="0.5" endSpeed="0.6" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="1" id="2" goalX="13.38005" startSpeed="0.5" endSpeed="0.6" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="2.2557545" width="10.511509"/>
<tileData x="8.660347" width="0.8236685"/>
@ -51,12 +51,12 @@
<obstacleData floating="true" moving="false" deadly="false" leftEdge="11.386221" rightEdge="13.067221" height="0.34" y="0.07999999"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="3.0633316" y="-0.43333337" width="0.25" height="0.25"/>
<starData index="2" x="9.686677" y="-0.76000005" width="0.25" height="0.25"/>
<starData index="3" x="13.110031" y="0.8466663" width="0.25" height="0.25"/>
<positionData x="3.0633316" y="-0.43333337"/>
<positionData x="9.686677" y="-0.76000005"/>
<positionData x="13.110031" y="0.8466663"/>
</stars>
</level>
<level number="3" goalX="16.630037" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="0.692">
<level packId="1" id="3" goalX="16.630037" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="0.692">
<terrainTiles class="java.util.ArrayList">
<tileData x="6.8150187" width="19.630037"/>
</terrainTiles>
@ -80,7 +80,7 @@
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="4" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="1" id="4" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
@ -97,5 +97,15 @@
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="1" id="9" goalX="3.0" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList"/>
<stars class="java.util.ArrayList"/>
</level>
</levels>
</levelPack>

View File

@ -67,10 +67,6 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\lock_unlocked.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\lock_unlocked.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\obstacle.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\obstacle.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tools_springbutton.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tools_springbutton.png"
@ -91,10 +87,6 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\goal.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\goal.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\stars_2.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\stars_2.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\obstacles_mountains.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\obstacles_mountains.png"
@ -103,14 +95,14 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_btn_colored_material.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.1.1\\res\\drawable\\abc_btn_colored_material.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\lock_locked.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\lock_locked.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\xml_toolprogressbarlayers.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\xml_toolprogressbarlayers.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\lock_locked.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\lock_locked.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\backgrounds_menu_levelup.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\backgrounds_menu_levelup.png"
@ -128,12 +120,12 @@
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tools_lockedbutton.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tools_magnet.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tools_magnet.png"
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\terrain_c_grass.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\terrain_c_grass.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\stars_1.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\stars_1.png"
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tools_magnet.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tools_magnet.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\playershapes_ball.png",
@ -203,10 +195,6 @@
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_cab_background_top_material.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.1.1\\res\\drawable\\abc_cab_background_top_material.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\stars_3.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\stars_3.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_text_cursor_material.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.1.1\\res\\drawable\\abc_text_cursor_material.xml"
@ -220,17 +208,13 @@
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\obstacles_grass.png"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\stars_0.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\stars_0.png"
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_switch_thumb_material.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.1.1\\res\\drawable\\abc_switch_thumb_material.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_list_selector_holo_light.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.1.1\\res\\drawable\\abc_list_selector_holo_light.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\abc_switch_thumb_material.xml",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.1.1\\res\\drawable\\abc_switch_thumb_material.xml"
},
{
"merged": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\tools_bombbutton.png",
"source": "C:\\Users\\Julian\\AndroidStudioProjects\\EndlessRoll\\app\\src\\main\\res\\drawable\\tools_bombbutton.png"

View File

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="23.1.1"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.1.1\assets"/></dataSet><dataSet config="23.1.1"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\assets"/></dataSet><dataSet config="main"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets"><file name="fontBaron.ttf" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\fontBaron.ttf"/><file name="levelpacks/Grasslands.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpacks\Grasslands.xml"/><file name="levelpacks/Icy Mountains.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpacks\Icy Mountains.xml"/><file name="levelpacks/Testcave.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpacks\Testcave.xml"/><file name="levelpack_01.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpack_01.xml"/><file name="particleEffects/collectStar.pe" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\collectStar.pe"/><file name="particleEffects/explosion.pe" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\explosion.pe"/><file name="particleEffects/magnet.pe" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\magnet.pe"/><file name="particleEffects/particle.png" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\particle.png"/><file name="particleEffects/star.png" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\star.png"/><file name="shader/entityFragmentShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\entityFragmentShader.glsl"/><file name="shader/entityVertexShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\entityVertexShader.glsl"/><file name="shader/particleFragmentShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\particleFragmentShader.glsl"/><file name="shader/simpleFragmentShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\simpleFragmentShader.glsl"/><file name="shader/simpleVertexShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\simpleVertexShader.glsl"/><file name="shader/terrainVertexShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\terrainVertexShader.glsl"/><file name="testlevelpack.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\testlevelpack.xml"/></source><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\build\generated\assets\shaders\debug"/></dataSet><dataSet config="debug"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\debug\assets"/></dataSet></merger>
<merger version="3"><dataSet config="23.1.1"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.1.1\assets"/></dataSet><dataSet config="23.1.1"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\assets"/></dataSet><dataSet config="main"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets"><file name="fontBaron.ttf" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\fontBaron.ttf"/><file name="Grasslands.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\Grasslands.xml"/><file name="Icy Mountains.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\Icy Mountains.xml"/><file name="levelpacks/Testcave.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpacks\Testcave.xml"/><file name="levelpack_01.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpack_01.xml"/><file name="particleEffects/collectStar.pe" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\collectStar.pe"/><file name="particleEffects/explosion.pe" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\explosion.pe"/><file name="particleEffects/magnet.pe" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\magnet.pe"/><file name="particleEffects/particle.png" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\particle.png"/><file name="particleEffects/star.png" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\particleEffects\star.png"/><file name="shader/entityFragmentShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\entityFragmentShader.glsl"/><file name="shader/entityVertexShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\entityVertexShader.glsl"/><file name="shader/particleFragmentShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\particleFragmentShader.glsl"/><file name="shader/simpleFragmentShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\simpleFragmentShader.glsl"/><file name="shader/simpleVertexShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\simpleVertexShader.glsl"/><file name="shader/terrainVertexShader.glsl" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\shader\terrainVertexShader.glsl"/><file name="testlevelpack.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\testlevelpack.xml"/><file name="levelpacks/Beginning.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpacks\Beginning.xml"/><file name="levelpacks/Icy Mountains.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpacks\Icy Mountains.xml"/><file name="levelpacks/Grasslands.xml" path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\main\assets\levelpacks\Grasslands.xml"/></source><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\build\generated\assets\shaders\debug"/></dataSet><dataSet config="debug"><source path="C:\Users\Julian\AndroidStudioProjects\EndlessRoll\app\src\debug\assets"/></dataSet></merger>

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -73,15 +73,6 @@
android:layout_centerVertical="true"
android:visibility="invisible"/>
<include
android:id="@+id/game_levelup"
android:layout_width="match_parent"
android:layout_height="match_parent"
layout="@layout/levelup_message"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:visibility="invisible"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -1,41 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/startscreen_play"
android:layout_width="110dp"
android:layout_height="110dp"
android:text="Play"
android:background="@drawable/playershapes_ball"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="44dp"
android:textSize="25sp" />
<Button
android:id="@+id/startscreen_comingsoon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Coming Soon"
style="@style/customButton"
android:layout_alignBottom="@+id/startscreen_sound"
android:layout_toLeftOf="@+id/startscreen_play"
android:layout_toStartOf="@+id/startscreen_play" />
android:layout_height="match_parent">
<ToggleButton
android:id="@+id/startscreen_sound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/xml_sound_toggle"
android:textOff=""
android:textOn=""
android:layout_below="@+id/startscreen_play"
android:layout_toRightOf="@+id/startscreen_play"
android:layout_marginTop="26dp"
android:layout_toEndOf="@+id/startscreen_play"
android:layout_marginTop="26dp" />
android:layout_toRightOf="@+id/startscreen_play"
android:background="@drawable/xml_sound_toggle"
android:textOff=""
android:textOn="" />
<Button
android:id="@+id/startscreen_play"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_marginTop="40dp"
android:background="@drawable/playershapes_ball"
android:text="Play"
android:textSize="25sp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<Button
android:id="@+id/startscreen_comingsoon"
style="@style/customButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Level Up"
android:layout_alignTop="@+id/startscreen_play"
android:layout_toRightOf="@+id/startscreen_sound"
android:layout_toEndOf="@+id/startscreen_sound" />
<Button
android:id="@+id/startscreen_maxcheat"
style="@style/customButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lv to 100"
android:layout_below="@+id/startscreen_play"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="48dp"
android:layout_marginStart="48dp" />
</RelativeLayout>

View File

@ -476,42 +476,38 @@ int drawable guis_sound_off 0x7f02004e
int drawable guis_sound_on 0x7f02004f
int drawable lock_locked 0x7f020050
int drawable lock_unlocked 0x7f020051
int drawable notification_template_icon_bg 0x7f020074
int drawable obstacle 0x7f020052
int drawable obstacles_cave 0x7f020053
int drawable obstacles_grass 0x7f020054
int drawable obstacles_mountains 0x7f020055
int drawable playershapes_ball 0x7f020056
int drawable previews_grass 0x7f020057
int drawable purple 0x7f020058
int drawable ramp 0x7f020059
int drawable rampbutton 0x7f02005a
int drawable splitter 0x7f02005b
int drawable star 0x7f02005c
int drawable star_empty 0x7f02005d
int drawable star_icon 0x7f02005e
int drawable stars_0 0x7f02005f
int drawable stars_1 0x7f020060
int drawable stars_2 0x7f020061
int drawable stars_3 0x7f020062
int drawable terrain_t_grass 0x7f020063
int drawable tools_bomb 0x7f020064
int drawable tools_bombbutton 0x7f020065
int drawable tools_emptybutton 0x7f020066
int drawable tools_lockedbutton 0x7f020067
int drawable tools_magnet 0x7f020068
int drawable tools_magnetbutton 0x7f020069
int drawable tools_spring 0x7f02006a
int drawable tools_springbutton 0x7f02006b
int drawable tools_unlockedbutton 0x7f02006c
int drawable xml_custom_button 0x7f02006d
int drawable xml_levelbutton_background 0x7f02006e
int drawable xml_sound_toggle 0x7f02006f
int drawable xml_tool_slot_background 0x7f020070
int drawable xml_toolprogressbarlayers 0x7f020071
int drawable xml_unlock_message_background 0x7f020072
int drawable xml_worldbutton_background 0x7f020073
int id action0 0x7f0d006b
int drawable notification_template_icon_bg 0x7f020070
int drawable obstacles_cave 0x7f020052
int drawable obstacles_grass 0x7f020053
int drawable obstacles_mountains 0x7f020054
int drawable playershapes_ball 0x7f020055
int drawable previews_grass 0x7f020056
int drawable purple 0x7f020057
int drawable ramp 0x7f020058
int drawable rampbutton 0x7f020059
int drawable splitter 0x7f02005a
int drawable star 0x7f02005b
int drawable star_empty 0x7f02005c
int drawable star_icon 0x7f02005d
int drawable terrain_c_grass 0x7f02005e
int drawable terrain_t_grass 0x7f02005f
int drawable tools_bomb 0x7f020060
int drawable tools_bombbutton 0x7f020061
int drawable tools_emptybutton 0x7f020062
int drawable tools_lockedbutton 0x7f020063
int drawable tools_magnet 0x7f020064
int drawable tools_magnetbutton 0x7f020065
int drawable tools_spring 0x7f020066
int drawable tools_springbutton 0x7f020067
int drawable tools_unlockedbutton 0x7f020068
int drawable xml_custom_button 0x7f020069
int drawable xml_levelbutton_background 0x7f02006a
int drawable xml_sound_toggle 0x7f02006b
int drawable xml_tool_slot_background 0x7f02006c
int drawable xml_toolprogressbarlayers 0x7f02006d
int drawable xml_unlock_message_background 0x7f02006e
int drawable xml_worldbutton_background 0x7f02006f
int id action0 0x7f0d006a
int id action_bar 0x7f0d0041
int id action_bar_activity_content 0x7f0d0000
int id action_bar_container 0x7f0d0040
@ -520,7 +516,7 @@ int id action_bar_spinner 0x7f0d0001
int id action_bar_subtitle 0x7f0d0022
int id action_bar_title 0x7f0d0021
int id action_context_bar 0x7f0d0042
int id action_divider 0x7f0d006f
int id action_divider 0x7f0d006e
int id action_menu_divider 0x7f0d0002
int id action_menu_presenter 0x7f0d0003
int id action_mode_bar 0x7f0d003e
@ -532,9 +528,9 @@ int id always 0x7f0d001b
int id beginning 0x7f0d0018
int id button3 0x7f0d007f
int id buttonPanel 0x7f0d002b
int id cancel_action 0x7f0d006c
int id cancel_action 0x7f0d006b
int id checkbox 0x7f0d0039
int id chronometer 0x7f0d0072
int id chronometer 0x7f0d0071
int id collapseActionView 0x7f0d001c
int id contentPanel 0x7f0d0031
int id custom 0x7f0d0037
@ -544,12 +540,11 @@ int id default_activity_button 0x7f0d0027
int id disableHome 0x7f0d000c
int id edit_query 0x7f0d0043
int id end 0x7f0d0019
int id end_padder 0x7f0d0077
int id end_padder 0x7f0d0076
int id expand_activities_button 0x7f0d0025
int id expanded_menu 0x7f0d0038
int id game_countdown 0x7f0d0058
int id game_countdown 0x7f0d0057
int id game_fps 0x7f0d0054
int id game_levelup 0x7f0d0057
int id game_message 0x7f0d0056
int id game_pausebutton 0x7f0d0050
int id game_playerprogress 0x7f0d0052
@ -558,35 +553,35 @@ int id game_shortmenu 0x7f0d0055
int id game_toolbuttonbar 0x7f0d0051
int id home 0x7f0d0004
int id homeAsUp 0x7f0d000d
int id horizontalScrollView 0x7f0d005f
int id horizontalScrollView 0x7f0d005e
int id icon 0x7f0d0029
int id ifRoom 0x7f0d001d
int id image 0x7f0d0026
int id imageView 0x7f0d0065
int id imageView 0x7f0d0064
int id imageView2 0x7f0d00a4
int id imageView3 0x7f0d00a2
int id info 0x7f0d0076
int id levelbutton_lock 0x7f0d005d
int id levelbutton_star1 0x7f0d005a
int id levelbutton_star2 0x7f0d005b
int id levelbutton_star3 0x7f0d005c
int id levelbutton_textview 0x7f0d0059
int id levels_bottomRow 0x7f0d0061
int id levels_topRow 0x7f0d0060
int id levels_topbar 0x7f0d005e
int id levelup_level 0x7f0d0063
int id levelup_mainlayout 0x7f0d0062
int id levelup_text 0x7f0d0064
int id levelup_unlocklist 0x7f0d0066
int id line1 0x7f0d0070
int id line3 0x7f0d0074
int id info 0x7f0d0075
int id levelbutton_lock 0x7f0d005c
int id levelbutton_star1 0x7f0d0059
int id levelbutton_star2 0x7f0d005a
int id levelbutton_star3 0x7f0d005b
int id levelbutton_textview 0x7f0d0058
int id levels_bottomRow 0x7f0d0060
int id levels_topRow 0x7f0d005f
int id levels_topbar 0x7f0d005d
int id levelup_level 0x7f0d0062
int id levelup_mainlayout 0x7f0d0061
int id levelup_text 0x7f0d0063
int id levelup_unlocklist 0x7f0d0065
int id line1 0x7f0d006f
int id line3 0x7f0d0073
int id listMode 0x7f0d0009
int id list_item 0x7f0d0028
int id media_actions 0x7f0d006e
int id message_exitbutton 0x7f0d0069
int id message_leftbutton 0x7f0d0068
int id message_title 0x7f0d0067
int id message_tryagainbutton 0x7f0d006a
int id media_actions 0x7f0d006d
int id message_exitbutton 0x7f0d0068
int id message_leftbutton 0x7f0d0067
int id message_title 0x7f0d0066
int id message_tryagainbutton 0x7f0d0069
int id middle 0x7f0d001a
int id multiply 0x7f0d0013
int id never 0x7f0d001e
@ -612,10 +607,10 @@ int id search_src_text 0x7f0d004a
int id search_voice_btn 0x7f0d004e
int id select_dialog_listview 0x7f0d004f
int id shortcut 0x7f0d003a
int id shortmenu_continue 0x7f0d0079
int id shortmenu_exit 0x7f0d007b
int id shortmenu_restart 0x7f0d007a
int id shortmenu_topbar 0x7f0d0078
int id shortmenu_continue 0x7f0d0078
int id shortmenu_exit 0x7f0d007a
int id shortmenu_restart 0x7f0d0079
int id shortmenu_topbar 0x7f0d0077
int id showCustom 0x7f0d000f
int id showHome 0x7f0d0010
int id showTitle 0x7f0d0011
@ -625,15 +620,16 @@ int id src_atop 0x7f0d0015
int id src_in 0x7f0d0016
int id src_over 0x7f0d0017
int id startscreen_comingsoon 0x7f0d007d
int id startscreen_maxcheat 0x7f0d007e
int id startscreen_play 0x7f0d007c
int id startscreen_sound 0x7f0d007e
int id status_bar_latest_event_content 0x7f0d006d
int id startscreen_sound 0x7f0d007b
int id status_bar_latest_event_content 0x7f0d006c
int id submit_area 0x7f0d004c
int id tabMode 0x7f0d000b
int id text 0x7f0d0075
int id text2 0x7f0d0073
int id text 0x7f0d0074
int id text2 0x7f0d0072
int id textSpacerNoButtons 0x7f0d0034
int id time 0x7f0d0071
int id time 0x7f0d0070
int id title 0x7f0d002a
int id title_template 0x7f0d002f
int id toolProgressBar 0x7f0d0085

View File

@ -0,0 +1,285 @@
<levelPack>
<theme>GRASSLANDS</theme>
<levels class="java.util.ArrayList">
<level number="1" goalX="22.606565" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.5854988" width="7.1709976"/>
<tileData x="10.153494" width="10.408993"/>
<tileData x="21.640932" width="11.797886"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList"/>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="10.873024" rightEdge="11.427025" height="0.304" y="-0.448"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="14.860029" rightEdge="15.360029" height="0.3" y="-0.45000002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="20.096622" rightEdge="22.096622" height="0.25" y="-0.47500002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="22.166656" rightEdge="22.666656" height="0.639" y="-0.28050002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="11.159975" y="-0.15999995" width="0.25" height="0.25"/>
<starData index="2" x="15.106676" y="-0.14000002" width="0.25" height="0.25"/>
<starData index="3" x="22.043303" y="-0.20666662" width="0.25" height="0.25"/>
</stars>
</level>
<level number="2" goalX="22.366613" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.9448314" width="7.8896627"/>
<tileData x="8.345928" width="4.4445295"/>
<tileData x="15.41926" width="8.228134"/>
<tileData x="20.374657" width="0.4826603"/>
<tileData x="24.32193" width="6.43589"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList"/>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="3.3708305" rightEdge="4.8758307" height="0.2" y="-0.5"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="11.334382" rightEdge="11.912381" height="0.319" y="-0.44050002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="2.4509985" rightEdge="3.3089983" height="0.275" y="-0.46250004"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="1.6111658" rightEdge="2.3221657" height="0.338" y="-0.43100002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="16.037212" rightEdge="16.856213" height="0.435" y="-0.38250002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="16.873312" rightEdge="17.873312" height="0.367" y="-0.41650003"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="17.884027" rightEdge="18.896029" height="0.327" y="-0.4365"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="19.046677" rightEdge="19.546677" height="0.884" y="-0.15800002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="15.948046" rightEdge="16.852045" height="0.5" y="-0.35000002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="20.123379" rightEdge="20.623379" height="0.5" y="-0.35000002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="10.94335" y="-0.61999965" width="0.25" height="0.25"/>
<starData index="2" x="15.7367" y="0.3199999" width="0.25" height="0.25"/>
<starData index="3" x="18.893328" y="-0.12666662" width="0.25" height="0.25"/>
</stars>
</level>
<level number="3" goalX="19.200012" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-0.4151678" width="5.1696644"/>
<tileData x="7.1337633" width="8.020197"/>
<tileData x="15.293072" width="7.220421"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList"/>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.00651" rightEdge="8.67351" height="0.319" y="-0.44050002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="11.703371" rightEdge="12.7233715" height="0.299" y="-0.4505"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="15.164396" rightEdge="15.762396" height="0.466" y="-0.36700004"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="15.891703" rightEdge="16.901701" height="0.402" y="-0.39900002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="16.998373" rightEdge="18.248373" height="0.353" y="-0.42350003"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="18.396694" rightEdge="18.896694" height="0.789" y="-0.20550004"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.6399994" y="0.10666669" width="0.25" height="0.25"/>
<starData index="2" x="8.793346" y="-0.4733331" width="0.25" height="0.25"/>
<starData index="3" x="12.253348" y="-0.13333318" width="0.25" height="0.25"/>
</stars>
</level>
<level number="4" goalX="23.933224" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="6.06402" width="18.12804"/>
<tileData x="19.269924" width="3.0757751"/>
<tileData x="25.439342" width="4.201065"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="23.786556" width="0.29333496"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="1.9489989" rightEdge="2.5509992" height="0.354" y="-0.42300004"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="18.512207" rightEdge="21.241207" height="0.408" y="0.50399995"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.408872" rightEdge="11.137872" height="0.803" y="-0.19850004"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="11.196732" rightEdge="14.196732" height="0.5" y="0.3966666"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="14.865067" rightEdge="17.775066" height="0.299" y="0.48666632"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="17.824553" rightEdge="18.475554" height="1.415" y="0.10749996"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="5.79467" rightEdge="8.37867" height="0.544" y="-0.328"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="11.560022" y="-0.26000002" width="0.25" height="0.25"/>
<starData index="2" x="16.310017" y="0.80666655" width="0.25" height="0.25"/>
<starData index="3" x="21.9833" y="-0.099999994" width="0.25" height="0.25"/>
</stars>
</level>
<level number="5" goalX="16.249996" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="1.9915047" width="9.983009"/>
<tileData x="12.045149" width="7.65627"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList"/>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="2.3669987" rightEdge="2.7929988" height="1.074" y="-0.06300002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="12.000204" rightEdge="13.373203" height="0.946" y="-0.12700003"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="13.539708" rightEdge="15.093709" height="0.725" y="-0.23750001"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="15.29672" rightEdge="15.79672" height="1.539" y="0.1695"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.5799987" y="0.62" width="0.25" height="0.25"/>
<starData index="2" x="7.5566673" y="0.26000008" width="0.25" height="0.25"/>
<starData index="3" x="11.85002" y="-0.4533334" width="0.25" height="0.25"/>
</stars>
</level>
<level number="6" goalX="27.539873" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.4867487" width="6.9734974"/>
<tileData x="7.8615937" width="5.390193"/>
<tileData x="13.799343" width="5.285305"/>
<tileData x="21.770779" width="9.7455635"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList"/>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="1.1131666" rightEdge="1.5001667" height="0.941" y="-0.12950003"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="1.6498328" rightEdge="1.7768329" height="0.902" y="-0.14900002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="1.9103339" rightEdge="2.1163337" height="0.838" y="-0.18100002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="2.224499" rightEdge="2.415499" height="0.735" y="-0.23250002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="2.500666" rightEdge="2.6726658" height="0.613" y="-0.29350004"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="2.7449994" rightEdge="3.9749994" height="0.5" y="-0.35000002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="5.1713314" rightEdge="5.955332" height="0.186" y="-0.507"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="10.060041" rightEdge="10.560041" height="0.843" y="-0.17850003"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="20.506636" rightEdge="20.806635" height="0.558" y="-0.321"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="20.5105" rightEdge="20.8095" height="0.286" y="0.9333331"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="14.943075" rightEdge="16.437075" height="0.231" y="-0.48450002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="25.300407" rightEdge="26.619408" height="0.612" y="-0.29400003"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="23.873228" rightEdge="24.373228" height="0.5" y="-0.35000002"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="24.34991" rightEdge="24.84991" height="0.5" y="-0.35000002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="4.586666" y="-0.5866665" width="0.25" height="0.25"/>
<starData index="2" x="10.696706" y="-0.46666694" width="0.25" height="0.25"/>
<starData index="3" x="20.64665" y="0.39999995" width="0.25" height="0.25"/>
</stars>
</level>
<level number="7" goalX="25.866587" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="2.1916704" width="10.383341"/>
<tileData x="11.639271" width="7.31187"/>
<tileData x="17.96075" width="3.4850826"/>
<tileData x="22.583197" width="4.5598145"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="25.669922" width="0.39332962"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="true" moving="false" deadly="false" leftEdge="2.9593315" rightEdge="3.9473314" height="0.313" y="-0.01333334"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.987667" rightEdge="5.565667" height="0.272" y="-0.046666723"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="10.1723585" rightEdge="12.214358" height="0.095" y="0.027500032"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="5.595845" rightEdge="6.950845" height="0.19" y="-0.073333286"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="8.669004" rightEdge="10.151005" height="0.218" y="0.0023332927"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="6.992841" rightEdge="7.353841" height="0.558" y="-0.321"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="19.32099" rightEdge="19.718988" height="0.762" y="-0.21900001"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="19.963318" rightEdge="20.463318" height="0.5" y="0.7533332"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="20.287636" rightEdge="21.245636" height="0.435" y="-0.38250002"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="12.539991" rightEdge="13.659992" height="0.395" y="0.124166645"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="11.773358" rightEdge="12.273358" height="0.884" y="0.5499999"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="20.503757" rightEdge="21.642757" height="0.327" y="0.3799999"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="24.1271" rightEdge="24.886099" height="0.694" y="-0.25300002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="6.6800065" y="-0.38666666" width="0.25" height="0.25"/>
<starData index="2" x="13.066695" y="0.48666692" width="0.25" height="0.25"/>
<starData index="3" x="20.679989" y="0.85333335" width="0.25" height="0.25"/>
</stars>
</level>
<level number="8" goalX="17.896662" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-2.0766673" width="1.8466654"/>
<tileData x="2.5266657" width="0.7200012"/>
<tileData x="9.478603" width="3.1838756"/>
<tileData x="16.133102" width="3.5271206"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList"/>
<obstacles class="java.util.ArrayList">
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.979664" rightEdge="5.9736643" height="0.286" y="-0.89333284"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.057998" rightEdge="3.9619977" height="0.299" y="-0.81333286"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.9729972" rightEdge="4.9669976" height="0.286" y="-0.8533326"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="5.997839" rightEdge="6.8288393" height="0.231" y="-0.9199996"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="11.854198" rightEdge="13.119198" height="1.02" y="0.023333304"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="13.15453" rightEdge="13.805531" height="0.639" y="0.13999994"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="14.541548" rightEdge="15.698547" height="0.422" y="-0.38900003"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="11.286684" rightEdge="14.286684" height="0.218" y="-1.1266662"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="6.876839" rightEdge="7.689839" height="0.286" y="-1.0"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="-1.0233328" rightEdge="1.9766672" height="0.136" y="-0.86666656"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.543333" y="0.3933335" width="0.25" height="0.25"/>
<starData index="2" x="14.12338" y="-0.79999965" width="0.25" height="0.25"/>
<starData index="3" x="17.523336" y="0.4799996" width="0.25" height="0.25"/>
</stars>
</level>
<level number="9" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="0.45000017" rightEdge="0.95000017" height="0.5" y="-0.35000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="-0.103333026" rightEdge="0.39666697" height="0.5" y="0.22666666">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="true" leftEdge="-1.7966661" rightEdge="-1.2966661" height="0.5" y="-0.35000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="true" leftEdge="-0.7099999" rightEdge="-0.20999992" height="0.5" y="0.21999998">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="10" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="-0.68833333" rightEdge="0.82166666" height="1.541" y="0.17049998">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="11" goalX="22.569973" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.23241591" width="6.464832"/>
<tileData x="8.307598" width="7.651533"/>
<tileData x="18.551668" width="8.036609"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="9.7849865" width="25.569973"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.3666725" rightEdge="8.8666725" height="0.344" y="-0.42800003">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="19.186697" rightEdge="19.606695" height="0.4" y="-0.40000004">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.026669" rightEdge="6.026669" height="0.229" y="0.7399997">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="12" goalX="28.746628" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-0.34033322" width="5.3193336"/>
<tileData x="9.0306835" width="10.206701"/>
<tileData x="22.446331" width="12.600594"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="12.873314" width="31.746628"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.236673" rightEdge="8.736673" height="0.8" y="-0.20000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="21.91664" rightEdge="22.41664" height="0.968" y="-0.11600003">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.5333319" rightEdge="4.533332" height="0.344" y="0.5999999">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.538332" rightEdge="5.6083317" height="0.306" y="0.59999996">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
</levels>
</levelPack>

View File

@ -0,0 +1,57 @@
<levelPack>
<theme>ICY_MOUNTAINS</theme>
<levels class="java.util.ArrayList">
<level number="1" goalX="29.37652" startSpeed="0.6" endSpeed="0.6" terrainEdge="-0.957" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="13.188259" width="32.37652"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="13.188259" width="32.37652"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList"/>
<stars class="java.util.ArrayList"/>
</level>
<level number="2" goalX="3.0" startSpeed="0.1" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="1.6566663" rightEdge="2.1566663" height="0.5" y="-0.35000002"/>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="3" goalX="20.986637" startSpeed="0.5" endSpeed="0.6" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-0.08241773" width="5.8351645"/>
<tileData x="4.4789143" width="0.9214988"/>
<tileData x="7.7215056" width="0.33568478"/>
<tileData x="11.007034" width="0.25934982"/>
<tileData x="18.561672" width="4.84993"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="8.993319" width="23.986637"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="1.9333316" rightEdge="4.9333315" height="0.218" y="-0.49100003"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="5.698176" rightEdge="6.8551755" height="0.558" y="-0.38666666"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="7.399845" rightEdge="8.086845" height="0.5" y="-0.26666665"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="8.412685" rightEdge="9.840685" height="0.395" y="-0.06666667"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="10.084207" rightEdge="11.729207" height="0.286" y="-0.18666662"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="12.520058" rightEdge="15.520058" height="0.354" y="0.080000006"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="11.280017" rightEdge="14.280017" height="0.19" y="-1.1199995"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="15.560076" rightEdge="15.940075" height="2.0" y="0.89333296"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="14.299717" rightEdge="16.793716" height="0.177" y="-1.1399996"/>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="19.028896" rightEdge="19.317898" height="0.871" y="-0.16450003"/>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="19.86667" rightEdge="20.36667" height="0.5" y="0.35999995"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="3.426661" y="-0.76666605" width="0.25" height="0.25"/>
<starData index="2" x="11.003345" y="-0.43999967" width="0.25" height="0.25"/>
<starData index="3" x="20.120005" y="0.7799998" width="0.25" height="0.25"/>
</stars>
</level>
</levels>
</levelPack>

View File

@ -1,7 +1,7 @@
<levelPack>
<world>GRASSLANDS</world>
<levelPack id="0">
<theme>GRASSLANDS</theme>
<levels class="java.util.ArrayList">
<level number="1" goalX="22.606565" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="1" goalX="22.606565" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.5854988" width="7.1709976"/>
<tileData x="10.153494" width="10.408993"/>
@ -15,12 +15,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="22.166656" rightEdge="22.666656" height="0.639" y="-0.28050002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="11.159975" y="-0.15999995" width="0.25" height="0.25"/>
<starData index="2" x="15.106676" y="-0.14000002" width="0.25" height="0.25"/>
<starData index="3" x="22.043303" y="-0.20666662" width="0.25" height="0.25"/>
<positionData x="11.159975" y="-0.15999995"/>
<positionData x="15.106676" y="-0.14000002"/>
<positionData x="22.043303" y="-0.20666662"/>
</stars>
</level>
<level number="2" goalX="22.366613" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="2" goalX="22.366613" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.9448314" width="7.8896627"/>
<tileData x="8.345928" width="4.4445295"/>
@ -42,12 +42,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="20.123379" rightEdge="20.623379" height="0.5" y="-0.35000002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="10.94335" y="-0.61999965" width="0.25" height="0.25"/>
<starData index="2" x="15.7367" y="0.3199999" width="0.25" height="0.25"/>
<starData index="3" x="18.893328" y="-0.12666662" width="0.25" height="0.25"/>
<positionData x="10.94335" y="-0.61999965"/>
<positionData x="15.7367" y="0.3199999"/>
<positionData x="18.893328" y="-0.12666662"/>
</stars>
</level>
<level number="3" goalX="19.200012" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="3" goalX="19.200012" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-0.4151678" width="5.1696644"/>
<tileData x="7.1337633" width="8.020197"/>
@ -63,12 +63,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="18.396694" rightEdge="18.896694" height="0.789" y="-0.20550004"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.6399994" y="0.10666669" width="0.25" height="0.25"/>
<starData index="2" x="8.793346" y="-0.4733331" width="0.25" height="0.25"/>
<starData index="3" x="12.253348" y="-0.13333318" width="0.25" height="0.25"/>
<positionData x="2.6399994" y="0.10666669"/>
<positionData x="8.793346" y="-0.4733331"/>
<positionData x="12.253348" y="-0.13333318"/>
</stars>
</level>
<level number="4" goalX="23.933224" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="4" goalX="23.933224" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="6.06402" width="18.12804"/>
<tileData x="19.269924" width="3.0757751"/>
@ -87,12 +87,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="5.79467" rightEdge="8.37867" height="0.544" y="-0.328"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="11.560022" y="-0.26000002" width="0.25" height="0.25"/>
<starData index="2" x="16.310017" y="0.80666655" width="0.25" height="0.25"/>
<starData index="3" x="21.9833" y="-0.099999994" width="0.25" height="0.25"/>
<positionData x="11.560022" y="-0.26000002"/>
<positionData x="16.310017" y="0.80666655"/>
<positionData x="21.9833" y="-0.099999994"/>
</stars>
</level>
<level number="5" goalX="16.249996" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="5" goalX="16.249996" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="1.9915047" width="9.983009"/>
<tileData x="12.045149" width="7.65627"/>
@ -105,12 +105,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="15.29672" rightEdge="15.79672" height="1.539" y="0.1695"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.5799987" y="0.62" width="0.25" height="0.25"/>
<starData index="2" x="7.5566673" y="0.26000008" width="0.25" height="0.25"/>
<starData index="3" x="11.85002" y="-0.4533334" width="0.25" height="0.25"/>
<positionData x="2.5799987" y="0.62"/>
<positionData x="7.5566673" y="0.26000008"/>
<positionData x="11.85002" y="-0.4533334"/>
</stars>
</level>
<level number="6" goalX="27.539873" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="6" goalX="27.539873" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.4867487" width="6.9734974"/>
<tileData x="7.8615937" width="5.390193"/>
@ -135,12 +135,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="24.34991" rightEdge="24.84991" height="0.5" y="-0.35000002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="4.586666" y="-0.5866665" width="0.25" height="0.25"/>
<starData index="2" x="10.696706" y="-0.46666694" width="0.25" height="0.25"/>
<starData index="3" x="20.64665" y="0.39999995" width="0.25" height="0.25"/>
<positionData x="4.586666" y="-0.5866665"/>
<positionData x="10.696706" y="-0.46666694"/>
<positionData x="20.64665" y="0.39999995"/>
</stars>
</level>
<level number="7" goalX="25.866587" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="7" goalX="25.866587" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="2.1916704" width="10.383341"/>
<tileData x="11.639271" width="7.31187"/>
@ -166,12 +166,12 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="24.1271" rightEdge="24.886099" height="0.694" y="-0.25300002"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="6.6800065" y="-0.38666666" width="0.25" height="0.25"/>
<starData index="2" x="13.066695" y="0.48666692" width="0.25" height="0.25"/>
<starData index="3" x="20.679989" y="0.85333335" width="0.25" height="0.25"/>
<positionData x="6.6800065" y="-0.38666666"/>
<positionData x="13.066695" y="0.48666692"/>
<positionData x="20.679989" y="0.85333335"/>
</stars>
</level>
<level number="8" goalX="17.896662" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="0" id="8" goalX="17.896662" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-2.0766673" width="1.8466654"/>
<tileData x="2.5266657" width="0.7200012"/>
@ -192,10 +192,94 @@
<obstacleData floating="true" moving="false" deadly="false" leftEdge="-1.0233328" rightEdge="1.9766672" height="0.136" y="-0.86666656"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="2.543333" y="0.3933335" width="0.25" height="0.25"/>
<starData index="2" x="14.12338" y="-0.79999965" width="0.25" height="0.25"/>
<starData index="3" x="17.523336" y="0.4799996" width="0.25" height="0.25"/>
<positionData x="2.543333" y="0.3933335"/>
<positionData x="14.12338" y="-0.79999965"/>
<positionData x="17.523336" y="0.4799996"/>
</stars>
</level>
<level packId="0" id="9" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="0.45000017" rightEdge="0.95000017" height="0.5" y="-0.35000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="-0.103333026" rightEdge="0.39666697" height="0.5" y="0.22666666">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="true" leftEdge="-1.7966661" rightEdge="-1.2966661" height="0.5" y="-0.35000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="true" leftEdge="-0.7099999" rightEdge="-0.20999992" height="0.5" y="0.21999998">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="0" id="10" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="-0.68833333" rightEdge="0.82166666" height="1.541" y="0.17049998">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="0" id="11" goalX="22.569973" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.23241591" width="6.464832"/>
<tileData x="8.307598" width="7.651533"/>
<tileData x="18.551668" width="8.036609"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="9.7849865" width="25.569973"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.3666725" rightEdge="8.8666725" height="0.344" y="-0.42800003">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="19.186697" rightEdge="19.606695" height="0.4" y="-0.40000004">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.026669" rightEdge="6.026669" height="0.229" y="0.7399997">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="0" id="12" goalX="28.746628" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="-0.34033322" width="5.3193336"/>
<tileData x="9.0306835" width="10.206701"/>
<tileData x="22.446331" width="12.600594"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="12.873314" width="31.746628"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList">
<obstacleData floating="false" moving="false" deadly="false" leftEdge="8.236673" rightEdge="8.736673" height="0.8" y="-0.20000002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="21.91664" rightEdge="22.41664" height="0.968" y="-0.11600003">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.5333319" rightEdge="4.533332" height="0.344" y="0.5999999">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.538332" rightEdge="5.6083317" height="0.306" y="0.59999996">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
</levels>
</levelPack>

View File

@ -1,7 +1,7 @@
<levelPack>
<world>TESTCAVE</world>
<levelPack id="1">
<theme>TESTCAVE</theme>
<levels class="java.util.ArrayList">
<level number="1" goalX="33.663338" startSpeed="0.6" endSpeed="0.6" terrainEdge="-0.979" ceilingEdge="1.0">
<level packId="1" id="1" goalX="33.663338" startSpeed="0.6" endSpeed="0.6" terrainEdge="-0.979" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="15.331669" width="36.663338"/>
</terrainTiles>
@ -24,7 +24,7 @@
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="2" goalX="13.38005" startSpeed="0.5" endSpeed="0.6" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="1" id="2" goalX="13.38005" startSpeed="0.5" endSpeed="0.6" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="2.2557545" width="10.511509"/>
<tileData x="8.660347" width="0.8236685"/>
@ -51,12 +51,12 @@
<obstacleData floating="true" moving="false" deadly="false" leftEdge="11.386221" rightEdge="13.067221" height="0.34" y="0.07999999"/>
</obstacles>
<stars class="java.util.ArrayList">
<starData index="1" x="3.0633316" y="-0.43333337" width="0.25" height="0.25"/>
<starData index="2" x="9.686677" y="-0.76000005" width="0.25" height="0.25"/>
<starData index="3" x="13.110031" y="0.8466663" width="0.25" height="0.25"/>
<positionData x="3.0633316" y="-0.43333337"/>
<positionData x="9.686677" y="-0.76000005"/>
<positionData x="13.110031" y="0.8466663"/>
</stars>
</level>
<level number="3" goalX="16.630037" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="0.692">
<level packId="1" id="3" goalX="16.630037" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="0.692">
<terrainTiles class="java.util.ArrayList">
<tileData x="6.8150187" width="19.630037"/>
</terrainTiles>
@ -80,7 +80,7 @@
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level number="4" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<level packId="1" id="4" goalX="3.0" startSpeed="0.0" endSpeed="0.0" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
@ -97,5 +97,15 @@
</obstacles>
<stars class="java.util.ArrayList"/>
</level>
<level packId="1" id="9" goalX="3.0" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
<terrainTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</terrainTiles>
<ceilingTiles class="java.util.ArrayList">
<tileData x="0.0" width="6.0"/>
</ceilingTiles>
<obstacles class="java.util.ArrayList"/>
<stars class="java.util.ArrayList"/>
</level>
</levels>
</levelPack>

View File

@ -10,7 +10,7 @@ public class Color {
public Color() {
}
public Color(float r, float g, float b){
public Color(float r, float g, float b) {
this.r = r;
this.g = g;
this.b = b;

View File

@ -0,0 +1,14 @@
package com.example.julian.endlessroll.entities;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.entities.textures.Texture;
import com.example.julian.endlessroll.levels.PositionData;
public class Energy extends Entity {
private final static float SIZE = 0.3f;
public Energy(Texture texture, PositionData data) {
super(texture, new Vector(data.getX(), data.getY()), SIZE, SIZE);
}
}

View File

@ -9,6 +9,7 @@ import com.example.julian.endlessroll.entities.textures.Texture;
*/
public class Entity extends Quad {
private int textureAtlasIndex;
private Texture texture;
private Vector movement;
private float rotation;
@ -34,7 +35,7 @@ public class Entity extends Quad {
position.y = terrainEdge + height / 2;
}
public void setTopEdge(float y){
public void setTopEdge(float y) {
position.y = y - height / 2;
}
@ -82,4 +83,12 @@ public class Entity extends Quad {
public DestroyEffect getDestroyEffect() {
return destroyEffect;
}
public void setTextureAtlasIndex(int textureAtlasIndex) {
this.textureAtlasIndex = textureAtlasIndex;
}
public int getTextureAtlasIndex() {
return textureAtlasIndex;
}
}

View File

@ -3,7 +3,7 @@ package com.example.julian.endlessroll.entities;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.levels.MoveComponent;
import com.example.julian.endlessroll.levels.ObstacleData;
import com.example.julian.endlessroll.levels.worlds.World;
import com.example.julian.endlessroll.levels.worlds.Theme;
import java.util.Random;
@ -23,8 +23,8 @@ public class Obstacle extends Entity {
private float moveProgress;
public Obstacle(World world, ObstacleData data, float terrainEdge) {
super(world.getObstacleTexture(), new Vector(data.getX(), data.getY()), data.getWidth(), data.getHeight());
public Obstacle(Theme theme, ObstacleData data, float terrainEdge) {
super(theme.getObstacleTexture(), new Vector(data.getX(), data.getY()), data.getWidth(), data.getHeight());
this.deadly = data.isDeadly();
this.floating = data.isFloating();
this.moving = data.isMoving();
@ -73,14 +73,14 @@ public class Obstacle extends Entity {
}
private void setTextureAtlasIndex() {
if (deadly)
super.setTextureAtlasIndex(2);
if (floating)
super.setTextureAtlasIndex(0);
if (deadly && floating)
super.getTexture().setAtlasIndex(1);
else if (deadly)
super.getTexture().setAtlasIndex(2);
else if (floating)
super.getTexture().setAtlasIndex(0);
else
super.getTexture().setAtlasIndex(3);
super.setTextureAtlasIndex(1);
if (!deadly && !floating)
super.setTextureAtlasIndex(3);
}
public boolean isMoving() {

View File

@ -1,7 +1,5 @@
package com.example.julian.endlessroll.entities;
import android.util.Log;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.entities.textures.Texture;
import com.example.julian.endlessroll.main.GameLog;
@ -26,7 +24,7 @@ public class Player extends Entity {
}
public void init(float terrainEdge, float startSpeed, float endSpeed) {
GameLog.i("init: "+startSpeed+"; "+endSpeed);
GameLog.i("init: " + startSpeed + "; " + endSpeed);
super.setToTerrain(terrainEdge);
super.getPosition().x = START_X;
super.setMovement(new Vector(speed, 0));

View File

@ -2,18 +2,19 @@ package com.example.julian.endlessroll.entities;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.entities.textures.Texture;
import com.example.julian.endlessroll.levels.StarData;
import com.example.julian.endlessroll.levels.PositionData;
public class Star extends Entity {
private int index;
private final static float SIZE = 0.25f;
private int index;
public Star(Texture texture, StarData starData) {
super(texture, new Vector(starData.getX(), starData.getY()), starData.getWidth(), starData.getHeight());
this.index = starData.getIndex();
}
public Star(int index, Texture texture, PositionData data) {
super(texture, new Vector(data.getX(), data.getY()), SIZE, SIZE);
this.index = index;
}
public int getIndex() {
return index;
}
public int getIndex() {
return index;
}
}

View File

@ -1,6 +1,5 @@
package com.example.julian.endlessroll.entities;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.main.GameLog;
/**
@ -31,7 +30,7 @@ public enum Vertex {
for (Vertex vertex : values())
if (vertex.index == newIndex)
return vertex;
GameLog.e("No vertex with index "+ index +" found!!!");
GameLog.e("No vertex with index " + index + " found!!!");
return null;
}

View File

@ -1,5 +1,6 @@
package com.example.julian.endlessroll.entities.collision;
import com.example.julian.endlessroll.entities.Energy;
import com.example.julian.endlessroll.entities.Obstacle;
import com.example.julian.endlessroll.entities.Player;
import com.example.julian.endlessroll.entities.Star;
@ -38,6 +39,8 @@ public class CollisionManager {
checkToolCollision(data.getToolCollisionData());
if (data.isStarCollision())
game.onStarCollision((Star) data.getStarCollisionData().getEntity());
if (data.isEnergyCollision())
game.onEnergyCollision((Energy) data.getEnergyCollisionData().getEntity());
}
private void checkTerrainCollision(EntityCollisionData data) {
@ -60,7 +63,7 @@ public class CollisionManager {
private void checkObstacleCollision(ObstacleCollisionData data) {
for (EntityCollisionData entityData : data.getCollisions()) {
checkEntityCollision(entityData, 0);
if (entityData.getEdge() != Edge.TOP || ((Obstacle)entityData.getEntity()).isDeadly())
if (entityData.getEdge() != Edge.TOP || ((Obstacle) entityData.getEntity()).isDeadly())
game.onGameOver(true);
}
}

View File

@ -10,13 +10,15 @@ public class PlayerCollisionData {
private ObstacleCollisionData obstacleCollision;
private ToolCollisionData toolCollision;
private EntityCollisionData starCollision;
private EntityCollisionData energyCollision;
public PlayerCollisionData(EntityCollisionData terrainCollision, EntityCollisionData ceilingCollision, ObstacleCollisionData obstacleCollision, ToolCollisionData toolCollision, EntityCollisionData starCollision) {
public PlayerCollisionData(EntityCollisionData terrainCollision, EntityCollisionData ceilingCollision, ObstacleCollisionData obstacleCollision, ToolCollisionData toolCollision, EntityCollisionData starCollision, EntityCollisionData energyCollision) {
this.terrainCollision = terrainCollision;
this.ceilingCollision = ceilingCollision;
this.obstacleCollision = obstacleCollision;
this.toolCollision = toolCollision;
this.starCollision = starCollision;
this.energyCollision = energyCollision;
}
public boolean isTerrainCollision() {
@ -58,4 +60,12 @@ public class PlayerCollisionData {
public EntityCollisionData getStarCollisionData() {
return starCollision;
}
public boolean isEnergyCollision() {
return energyCollision.isCollision();
}
public EntityCollisionData getEnergyCollisionData() {
return energyCollision;
}
}

View File

@ -30,7 +30,7 @@ public class ParticleSource {
private float windStrength;
private float gravityStrength;
private Vector spawnSize = null;
private Vector spawnSize = null;
private ParticleData particleData;
private List<Particle> activeParticles = new ArrayList<>();
private List<Particle> inactiveParticles = new ArrayList<>();
@ -101,7 +101,7 @@ public class ParticleSource {
start();
}
public void kill(){
public void kill() {
alife = false;
}
@ -112,15 +112,15 @@ public class ParticleSource {
float yOff = effect.getyOffset().createValue(random, 0) * ParticleSystem.TRANSFER_VALUE;
if (effect.getSpawnShape() == SpawnShape.Shape.SQUARE) {
float width, height;
if(spawnSize == null) {
if (spawnSize == null) {
width = effect.getSpawnWidth().getRange().createValue(random, effect.getSpawnWidth().getTimeline().getValueAtTime(lifePercent));
height = effect.getSpawnHeight().getRange().createValue(random, effect.getSpawnHeight().getTimeline().getValueAtTime(lifePercent));
}else{
} else {
width = spawnSize.getX() / ParticleSystem.TRANSFER_VALUE;
height = spawnSize.getY() / ParticleSystem.TRANSFER_VALUE;
}
xOff += (random.nextFloat() * width - width * 0.5f)*ParticleSystem.TRANSFER_VALUE;
yOff += (random.nextFloat() * height - height * 0.5f)*ParticleSystem.TRANSFER_VALUE;
xOff += (random.nextFloat() * width - width * 0.5f) * ParticleSystem.TRANSFER_VALUE;
yOff += (random.nextFloat() * height - height * 0.5f) * ParticleSystem.TRANSFER_VALUE;
}
setUpParticle(new Vector(position).translate(xOff, yOff));
}

View File

@ -24,7 +24,7 @@ public class Attribute {
for (ParticleAttributeValue v : values)
if (v.getType() == valueType)
return v;
throw new Exception("ParticleAttributeValue with type: " + valueType + " does not exist in Attribute "+type);
throw new Exception("ParticleAttributeValue with type: " + valueType + " does not exist in Attribute " + type);
}
public ParticleAttributeType getType() {

View File

@ -7,7 +7,7 @@ public abstract class ParticleAttributeValue {
private ParticleAttributeValueType type;
public ParticleAttributeValue(ParticleAttributeValueType type){
public ParticleAttributeValue(ParticleAttributeValueType type) {
this.type = type;
}

View File

@ -7,8 +7,8 @@ public enum ParticleAttributeValueType {
RANGE, TIMELINE, TINT_TIMELINE, SPAWN_SHAPE, OPTIONS, IMAGE_PATH;
public ParticleAttributeValue createInstance(){
switch (this){
public ParticleAttributeValue createInstance() {
switch (this) {
case RANGE:
return new Range();
case TIMELINE:

View File

@ -14,11 +14,11 @@ public class SpawnShape extends ParticleAttributeValue {
this.name = name;
}
public static Shape byName(String text) throws Exception{
for(Shape shape : values())
if(shape.name.equals(text))
public static Shape byName(String text) throws Exception {
for (Shape shape : values())
if (shape.name.equals(text))
return shape;
throw new Exception("Shape with name \""+text+"\" does not exist");
throw new Exception("Shape with name \"" + text + "\" does not exist");
}
}

View File

@ -1,7 +1,6 @@
package com.example.julian.endlessroll.entities.particles.attributes.attributeValues;
import com.example.julian.endlessroll.data.Color;
import com.example.julian.endlessroll.main.GameLog;
import java.util.ArrayList;
import java.util.List;

View File

@ -8,7 +8,6 @@ public class Texture {
private int id;
private int atlasWidth;
private int atlasHeight;
private int atlasIndex;
public Texture(int id, int atlasWidth, int atlasHeight) {
this.id = id;
@ -34,11 +33,4 @@ public class Texture {
return atlasHeight;
}
public int getAtlasIndex() {
return atlasIndex;
}
public void setAtlasIndex(int atlasIndex) {
this.atlasIndex = atlasIndex;
}
}

View File

@ -5,10 +5,7 @@ import android.support.annotation.DrawableRes;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.levels.worlds.World;
import java.util.HashMap;
import java.util.Map;
import com.example.julian.endlessroll.levels.worlds.Theme;
/**
* Created by Julian on 05.12.2015.
@ -31,7 +28,7 @@ public class TexturePack {
star = loadTexture(R.drawable.star);
ToolType.loadAllToolTextures(this);
World.loadAllSpecificTextures(this);
Theme.loadAllSpecificTextures(this);
}
public Texture loadTexture(@DrawableRes int id) {

View File

@ -1,13 +1,12 @@
package com.example.julian.endlessroll.entities.tileLists;
import com.example.julian.endlessroll.entities.textures.Texture;
import com.example.julian.endlessroll.entities.textures.TexturePack;
@SuppressWarnings("serial")
public class Ceiling extends TileList {
public Ceiling(Texture texture) {
super(Type.CEILING, texture);
}
public Ceiling(Texture texture) {
super(Type.CEILING, texture);
}
}

View File

@ -1,13 +1,12 @@
package com.example.julian.endlessroll.entities.tileLists;
import com.example.julian.endlessroll.entities.textures.Texture;
import com.example.julian.endlessroll.entities.textures.TexturePack;
@SuppressWarnings("serial")
public class Terrain extends TileList {
public Terrain(Texture texture) {
super(TileList.Type.TERRAIN, texture);
}
public Terrain(Texture texture) {
super(TileList.Type.TERRAIN, texture);
}
}

View File

@ -3,7 +3,7 @@ package com.example.julian.endlessroll.entities.tileLists;
import com.example.julian.endlessroll.data.SynchronizedArrayList;
import com.example.julian.endlessroll.entities.textures.Texture;
import com.example.julian.endlessroll.levels.TileData;
import com.example.julian.endlessroll.levels.worlds.World;
import com.example.julian.endlessroll.levels.worlds.Theme;
import java.util.ArrayList;
import java.util.List;
@ -36,17 +36,21 @@ public class TileList extends SynchronizedArrayList<Tile> {
this.texture = texture;
}
public void loadData(World world, float edge, List<TileData> tileData) {
this.texture = world.getTerrainTexture();
public void loadData(Theme theme, float edge, List<TileData> tileData) {
this.texture = theme.getTerrainTexture();
if (type == Type.CEILING)
this.texture = theme.getCeilingTexture();
this.endless = false;
super.clear();
for (TileData data : tileData)
super.add(new Tile(type, texture, edge, data));
this.edge = edge;
if (edge >= 1 || edge <= -1)
super.clear();
}
public void createEndless(World world, float edge) {
loadData(world, edge, new ArrayList<TileData>());
public void createEndless(Theme theme, float edge) {
loadData(theme, edge, new ArrayList<TileData>());
super.add(createEndlessTile(0));
this.endless = true;
}

View File

@ -13,7 +13,7 @@ public class Ramp extends Tool {
public Ramp(Vector position) {
super(ToolType.RAMP, position, .4f, .4f, true, true);
super(ToolType.RAMP, position, .4f, .35f, true, true);
animation.setLooping(true);
}

View File

@ -29,7 +29,7 @@ public class Spring extends Tool {
public void onPlayerCollision(Player player) {
if (!hasYetCollided) {
hasYetCollided = true;
player.getMovement().y = .0024f;
player.getMovement().y = .0022f;
}
}

View File

@ -28,7 +28,7 @@ public abstract class Tool extends Entity {
public void update(Timer timer) {
animation.update(timer);
super.getTexture().setAtlasIndex(animation.getCurrentTexIndex());
super.setTextureAtlasIndex(animation.getCurrentTexIndex());
}
public abstract void onPlayerCollision(Player player);

View File

@ -10,17 +10,22 @@ public class ToolSlot {
private ToolType toolType;
private boolean locked;
public ToolSlot(ToolType toolType, boolean locked){
public ToolSlot(ToolType toolType, boolean locked) {
this.toolType = toolType;
this.locked = locked;
}
public ToolSlot(String type) {
this.toolType = ToolType.valueOf(type);
this.locked = toolType == ToolType.NONE;
}
public ToolType getToolType() {
return toolType;
}
public int getDrawable(){
if(locked)
public int getDrawable() {
if (locked)
return R.drawable.tools_lockedbutton;
else
return toolType.getButtonDrawable();

View File

@ -3,27 +3,17 @@ package com.example.julian.endlessroll.entities.tools;
import com.example.julian.endlessroll.levels.levelup.LevelUpBounties;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Julian on 15.07.2016.
*/
public class ToolSlotSettings extends ArrayList<ToolSlot> {
public ToolSlotSettings() {
this(new ToolSlot(ToolType.RAMP, false), new ToolSlot(ToolType.NONE, true), new ToolSlot(ToolType.NONE, true), new ToolSlot(ToolType.NONE, true));
}
public ToolSlotSettings(ToolSlot slot1, ToolSlot slot2, ToolSlot slot3, ToolSlot slot4) {
super(4);
super.add(slot1);
super.add(slot2);
super.add(slot3);
super.add(slot4);
}
public ToolSlotSettings(List<ToolSlot> list) {
super(list);
public ToolSlotSettings(String slot1, String slot2, String slot3, String slot4, int slotsLocked) throws Exception {
super.add(new ToolSlot(ToolType.valueOf(slot1), false));
super.add(new ToolSlot(ToolType.valueOf(slot2), slotsLocked < 3));
super.add(new ToolSlot(ToolType.valueOf(slot3), slotsLocked < 2));
super.add(new ToolSlot(ToolType.valueOf(slot4), slotsLocked < 1));
}
public void reset() {
@ -42,9 +32,17 @@ public class ToolSlotSettings extends ArrayList<ToolSlot> {
}
}
public void unlockSlotsIfLevelReached(int level, LevelUpBounties levelUpBounties) {
for (int i = 0; i < 4; i++) {
super.get(i).setLocked(!levelUpBounties.isToolSlotUnlockedAtLevel(i, level));
}
public void unlockSlotsIfLevelReached(LevelUpBounties levelUpBounties) {
for (int i = 0; i < 4; i++)
super.get(i).setLocked(levelUpBounties.isToolSlotLocked(i));
}
public int getLockedSlotCount() {
for (int i = super.size() - 1; i > 0; i--) {
if (!super.get(i).isLocked())
return i + 1;
}
return 0;
}
}

View File

@ -1,6 +1,7 @@
package com.example.julian.endlessroll.levels;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import java.util.List;
@ -11,7 +12,9 @@ import java.util.List;
public class Level {
@Attribute
private int number;
private int packId;
@Attribute
private int id;
@Attribute
private float goalX;
@Attribute
@ -29,16 +32,21 @@ public class Level {
@ElementList
private List<ObstacleData> obstacles;
@ElementList
private List<StarData> stars;
private List<PositionData> stars;
@Element(required = false)
private PositionData energy;
private boolean completed;
private boolean unlocked;
private boolean firstStarCollected;
private boolean secondStarCollected;
private boolean thirdStarCollected;
private boolean finished;
private boolean locked;
private boolean[] collectedStars = {false, false, false};
private boolean energyCollected;
public int getNumber() {
return number;
public int getPackId() {
return packId;
}
public int getId() {
return id;
}
public float getGoalX() {
@ -73,67 +81,67 @@ public class Level {
return obstacles;
}
public List<StarData> getStars() {
public List<PositionData> getStars() {
return stars;
}
public boolean isUnlocked() {
return unlocked;
public PositionData getEnergyData() {
return energy;
}
public void setUnlocked(boolean unlocked) {
this.unlocked = unlocked;
public boolean isLocked() {
return locked;
}
public boolean isCompleted() {
return completed;
public void setLocked(boolean locked) {
this.locked = locked;
}
public void setCompleted(boolean completed) {
this.completed = completed;
public boolean isFinished() {
return finished;
}
public boolean isFirstStarCollected() {
return firstStarCollected;
public void setFinished(boolean finished) {
this.finished = finished;
}
public boolean isSecondStarCollected() {
return secondStarCollected;
public boolean isStarCollected(int index) {
return collectedStars[index];
}
public boolean isThirdStarCollected() {
return thirdStarCollected;
public void setStarCollected(int index, boolean collected) {
collectedStars[index] = collected;
}
public void setStarCollected(int index, boolean collected){
if(index == 1)
firstStarCollected = collected;
else if(index == 2)
secondStarCollected = collected;
else if(index == 3)
thirdStarCollected = collected;
}
public String getCollectedStars(){
public String getCollectedStarCodeForSQL() {
String code = "";
code+= firstStarCollected?"1":"";
code+= secondStarCollected?"2":"";
code+= thirdStarCollected?"3":"";
for (int i = 0; i < 3; i++)
code += collectedStars[i] ? (i + 1) + "" : "";
return code;
}
public void setCollectedStars(String code){
firstStarCollected = code.contains("1");
secondStarCollected = code.contains("2");
thirdStarCollected = code.contains("3");
public void setCollectedStarsFromSQL(String code) {
for (int i = 0; i < 3; i++)
collectedStars[i] = code.contains((i + 1) + "");
}
public void reset(){
completed = false;
unlocked = false;
firstStarCollected = false;
secondStarCollected = false;
thirdStarCollected = false;
public boolean[] getCollectedStars() {
return collectedStars;
}
public boolean isEnergyCollected() {
return energyCollected;
}
public void setEnergyCollected(boolean collected) {
this.energyCollected = collected;
}
public void reset() {
finished = false;
locked = false;
collectedStars = new boolean[]{false, false, false};
energyCollected = false;
}
}

View File

@ -20,26 +20,22 @@ public class LevelManager extends ArrayList<LevelPack> {
for (String asset : assets) {
try {
LevelPack pack = loadLevelPack(context, "levelpacks/" + asset);
pack.setName(asset.split(".xml")[0]);
dataStorageHandler.readLevelProgress(pack);
dataStorageHandler.readLevelPackLocked(pack);
pack.tryToUnlockFirstLevel();
if (pack.getWorld().getIndex() == 0)
if (pack.getId() == 0)
pack.setLocked(false);
super.add(pack);
} catch (Exception e) {
GameLog.e(e);
}
sort();
}
sortPacks();
}
private void sort() {
Collections.sort(this, new Comparator<LevelPack>() {
@Override
public int compare(LevelPack lhs, LevelPack rhs) {
return lhs.getWorld().getIndex() - rhs.getWorld().getIndex();
}
});
private void sortPacks(){
Collections.sort(this, packComparator);
}
private LevelPack loadLevelPack(Context context, String name) throws Exception {
@ -52,14 +48,31 @@ public class LevelManager extends ArrayList<LevelPack> {
}
}
public LevelPack getNextLevelPack(LevelPack currentPack) {
int searchedId = currentPack.getId() + 1;
for (LevelPack pack : this) {
if (pack.getId() == searchedId)
return pack;
}
return null;
}
public void reset() {
for (LevelPack pack : this) {
pack.reset();
if (pack.getWorld().getIndex() != 0)
pack.setLocked(true);
if (pack.getId() == 0)
pack.setLocked(false);
}
}
private Comparator<LevelPack> packComparator = new Comparator<LevelPack>() {
@Override
public int compare(LevelPack lhs, LevelPack rhs) {
return lhs.getId() - rhs.getId();
}
};
//CHEAT
public void unlockAllPacks() {
for (LevelPack levelPack : this)
levelPack.setLocked(false);
@ -68,17 +81,8 @@ public class LevelManager extends ArrayList<LevelPack> {
public void unlockAllLevels() {
for (LevelPack levelPack : this) {
for (Level level : levelPack.getLevels())
level.setUnlocked(true);
level.setLocked(false);
}
}
public LevelPack nextLevelPack(LevelPack old) {
int oldId = old.getWorld().getIndex();
for (LevelPack pack : this) {
if (pack.getWorld().getIndex() == oldId + 1)
return pack;
}
return null;
}
}

View File

@ -1,6 +1,6 @@
package com.example.julian.endlessroll.levels;
import com.example.julian.endlessroll.levels.worlds.World;
import com.example.julian.endlessroll.levels.worlds.Theme;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
@ -15,70 +15,80 @@ import java.util.List;
@Root
public class LevelPack {
@Attribute
private int id;
@Element
private World world;
private Theme theme;
@ElementList
private List<Level> levels;
private String name;
private boolean locked;
public int getId() {
return id;
}
public List<Level> getLevels() {
return levels;
}
public int getUnlockedLevels(){
public Theme getTheme() {
return theme;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public int getFinishedLevelCount() {
int count = 0;
for(Level level : levels)
if(level.isUnlocked())
for (Level level : levels)
if (level.isFinished())
count++;
return count;
}
public int getCollectedStars(){
public int getCollectedStarCount() {
int count = 0;
for(Level level : levels)
count += level.getCollectedStars().length();
for (Level level : levels)
count += level.getCollectedStarCodeForSQL().length();
return count;
}
public int getAvailableStars(){
public int getAvailableStars() {
return levels.size() * 3;
}
public World getWorld() {
return world;
}
public void tryToUnlockFirstLevel() {
try {
levels.get(0).setUnlocked(true);
} catch (Exception e) {
}
Level firstLevel = getLevel(0);
if (firstLevel != null)
firstLevel.setLocked(false);
}
public Level getLevel(int number) {
public Level getLevel(int id) {
for (Level level : levels)
if (level.getNumber() == number)
if (level.getId() == id)
return level;
return null;
}
public Level getNextLevel(Level currentLevel) {
if (isLastLevel(currentLevel)) {
return null;
}
int index = levels.indexOf(currentLevel);
return levels.get(index + 1);
return getLevel(currentLevel.getId() + 1);
}
public boolean isLastLevel(Level level) {
int index = levels.indexOf(level);
return levels.size() == index + 1;
return getNextLevel(level) == null;
}
public void reset(){
for(Level level : levels){
public void reset() {
for (Level level : levels)
level.reset();
}
setLocked(true);
tryToUnlockFirstLevel();
}

View File

@ -44,12 +44,12 @@ public class MoveComponent {
return new Vector(x, y);
}
public void shrink(Vector value){
public void shrink(Vector value) {
this.width -= value.getX();
this.height -= value.getY();
if(width < 0)
if (width < 0)
width = 0;
if(height < 0)
if (height < 0)
height = 0;
}

View File

@ -0,0 +1,23 @@
package com.example.julian.endlessroll.levels;
import org.simpleframework.xml.Attribute;
/**
* Created by Julian on 27.01.2017.
*/
public class PositionData {
@Attribute
private float x;
@Attribute
private float y;
public float getX() {
return x;
}
public float getY() {
return y;
}
}

View File

@ -1,37 +0,0 @@
package com.example.julian.endlessroll.levels;
import org.simpleframework.xml.Attribute;
public class StarData {
@Attribute
private int index;
@Attribute
private float x;
@Attribute
private float y;
@Attribute
private float width;
@Attribute
private float height;
public int getIndex() {
return index;
}
public float getX() {
return x;
}
public float getY() {
return y;
}
public float getWidth() {
return width;
}
public float getHeight() {
return height;
}
}

View File

@ -4,16 +4,16 @@ import org.simpleframework.xml.Attribute;
public class TileData {
@Attribute
private float x;
@Attribute
private float width;
@Attribute
private float x;
@Attribute
private float width;
public float getX() {
return x;
}
public float getX() {
return x;
}
public float getWidth() {
return width;
}
public float getWidth() {
return width;
}
}

View File

@ -1,71 +1,50 @@
package com.example.julian.endlessroll.levels.levelup;
import android.content.Context;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.views.BountyMessage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by Julian on 17.07.2016.
*/
public class LevelUpBounties extends HashMap<Integer, List<LevelUpBounties.Bounty>> {
public class LevelUpBounties extends HashMap<Integer, LevelBounty> {
public interface Bounty {
BountyMessage createMessage(Context context);
private List<ToolType> unlockedTools = new ArrayList<>();
private int unlockedToolSlots;
public LevelUpBounties(int level) {
super.put(1, new LevelBounty(0, 0, ToolType.RAMP, true));
super.put(2, new LevelBounty(5, 0, ToolType.SPRING, false));
super.put(3, new LevelBounty(6, 0, ToolType.MAGNET, true));
super.put(4, new LevelBounty(7, 0, ToolType.BOMB, true));
super.put(5, new LevelBounty(8, 0, ToolType.NONE, false));
loadAllForLevel(level);
}
private Map<ToolBounty, Integer> allToolBounties = new HashMap<>();
private List<Integer> allToolSlotLevels = new ArrayList<>();
public LevelUpBounties() {
addBounties(1, new ToolBounty(ToolType.RAMP), new ToolSlotBounty());
addBounties(2, new StarBounty(5), new ToolBounty(ToolType.SPRING));
addBounties(3, new StarBounty(6), new ToolBounty(ToolType.MAGNET), new ToolSlotBounty());
addBounties(4, new StarBounty(7), new ToolBounty(ToolType.BOMB), new ToolSlotBounty());
addBounties(5, new StarBounty(8), new ToolSlotBounty());
public void loadAllForLevel(int level) {
unlockedTools.clear();
unlockedToolSlots = 0;
for (int i = level; i > 0; i--)
loadBounty(super.get(i));
}
private void addBounties(int unlockLevel, Bounty... bounties) {
List<Bounty> list = new ArrayList<>();
for (Bounty bounty : bounties) {
list.add(bounty);
if (bounty instanceof ToolBounty)
allToolBounties.put((ToolBounty) bounty, unlockLevel);
else if (bounty instanceof ToolSlotBounty)
allToolSlotLevels.add(unlockLevel);
private void loadBounty(LevelBounty bounty) {
if (bounty != null) {
if (bounty.getToolType() != ToolType.NONE)
unlockedTools.add(bounty.getToolType());
if (bounty.isToolSlot())
unlockedToolSlots++;
}
super.put(unlockLevel, list);
}
public boolean isToolAlreadyUnlockedAtLevel(int level, ToolType toolType) {
for (ToolBounty bounty : allToolBounties.keySet())
if (bounty.getToolType() == toolType && allToolBounties.get(bounty) <= level)
return true;
return false;
public boolean isToolLocked(ToolType tool) {
return !unlockedTools.contains(tool);
}
public boolean isToolSlotUnlockedAtLevel(int toolSlotIndex, int level) {
return allToolSlotLevels.get(toolSlotIndex) <= level;
public boolean isToolSlotLocked(int index) {
return index >= unlockedToolSlots;
}
public int getBountyStarsAtLevel(int level) {
for (Bounty bounty : this.get(level)) {
if (bounty instanceof StarBounty)
return ((StarBounty) bounty).getStarCount();
}
return 0;
}
@Override
public List<Bounty> get(Object key) {
List<Bounty> list = super.get(key);
if (list == null)
return new ArrayList<>();
return list;
}
}

View File

@ -1,26 +0,0 @@
package com.example.julian.endlessroll.levels.levelup;
import android.content.Context;
import com.example.julian.endlessroll.views.BountyMessage;
/**
* Created by Julian on 17.07.2016.
*/
public class StarBounty implements LevelUpBounties.Bounty {
private int starCount;
public StarBounty(int starCount) {
this.starCount = starCount;
}
public int getStarCount() {
return starCount;
}
@Override
public BountyMessage createMessage(Context context) {
return new BountyMessage(context, starCount);
}
}

View File

@ -1,27 +0,0 @@
package com.example.julian.endlessroll.levels.levelup;
import android.content.Context;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.views.BountyMessage;
/**
* Created by Julian on 17.07.2016.
*/
public class ToolBounty implements LevelUpBounties.Bounty {
private ToolType toolType;
public ToolBounty(ToolType toolType) {
this.toolType = toolType;
}
public ToolType getToolType() {
return toolType;
}
@Override
public BountyMessage createMessage(Context context) {
return new BountyMessage(context, toolType);
}
}

View File

@ -1,16 +0,0 @@
package com.example.julian.endlessroll.levels.levelup;
import android.content.Context;
import com.example.julian.endlessroll.views.BountyMessage;
/**
* Created by Julian on 17.07.2016.
*/
public class ToolSlotBounty implements LevelUpBounties.Bounty {
@Override
public BountyMessage createMessage(Context context) {
return new BountyMessage(context);
}
}

View File

@ -10,13 +10,12 @@ import com.example.julian.endlessroll.entities.textures.TexturePack;
* Created by Julian on 14.11.2016.
*/
public enum World {
public enum Theme {
GRASSLANDS(0, "Grasslands", R.drawable.previews_grass, R.drawable.backgrounds_game_grass, R.drawable.terrain_t_grass, R.drawable.obstacles_grass),
TESTCAVE(1, "Testcave", R.drawable.previews_grass, R.drawable.backgrounds_game_cave, R.drawable.terrain_t_grass, R.drawable.obstacles_cave),
ICY_MOUNTAINS(2, "Icy Mountains", R.drawable.previews_grass, R.drawable.backgrounds_game_mountains, R.drawable.terrain_t_grass, R.drawable.obstacles_mountains);
GRASSLANDS("Grasslands", R.drawable.previews_grass, R.drawable.backgrounds_game_grass, R.drawable.terrain_t_grass, R.drawable.terrain_c_grass, R.drawable.obstacles_grass),
TESTCAVE("Testcave", R.drawable.previews_grass, R.drawable.backgrounds_game_cave, R.drawable.terrain_t_grass, R.drawable.terrain_c_grass, R.drawable.obstacles_cave),
ICY_MOUNTAINS("Icy Mountains", R.drawable.previews_grass, R.drawable.backgrounds_game_mountains, R.drawable.terrain_t_grass, R.drawable.terrain_c_grass, R.drawable.obstacles_mountains);
private int index;
private String name;
@DrawableRes
private int previewId;
@ -25,36 +24,36 @@ public enum World {
@DrawableRes
private int terrainId;
@DrawableRes
private int ceilingId;
@DrawableRes
private int obstacleId;
private Texture background;
private Texture terrain;
private Texture ceiling;
private Texture obstacle;
World(int index, String name, @DrawableRes int previewId, @DrawableRes int backgroundId, @DrawableRes int terrainId, @DrawableRes int obstacleId) {
this.index = index;
Theme(String name, @DrawableRes int previewId, @DrawableRes int backgroundId, @DrawableRes int terrainId, @DrawableRes int ceilingId, @DrawableRes int obstacleId) {
this.name = name;
this.previewId = previewId;
this.backgroundId = backgroundId;
this.terrainId = terrainId;
this.ceilingId = ceilingId;
this.obstacleId = obstacleId;
}
public static void loadAllSpecificTextures(TexturePack texturePack){
for(World world : values())
world.loadSpecificTextures(texturePack);
public static void loadAllSpecificTextures(TexturePack texturePack) {
for (Theme theme : values())
theme.loadSpecificTextures(texturePack);
}
private void loadSpecificTextures(TexturePack texturePack) {
background = texturePack.loadTexture(backgroundId);
terrain = texturePack.loadTexture(terrainId);
ceiling = texturePack.loadTexture(ceilingId);
obstacle = texturePack.loadAtlas(obstacleId, 2, 2);
}
public int getIndex() {
return index;
}
public String getName() {
return name;
}
@ -71,6 +70,10 @@ public enum World {
return terrain;
}
public Texture getCeilingTexture() {
return ceiling;
}
public Texture getObstacleTexture() {
return obstacle;
}

View File

@ -4,8 +4,8 @@ import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import com.example.julian.endlessroll.entities.tools.ToolSlot;
import com.example.julian.endlessroll.entities.tools.ToolSlotSettings;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.levels.Level;
import com.example.julian.endlessroll.levels.LevelPack;
import com.example.julian.endlessroll.main.game.User;
@ -18,9 +18,15 @@ public class DataStorageHandler {
private final String PREFERENCES_NAME = "GamePreferences";
private final String SOUND_ON = "Sound";
private final String USER_STARS = "Stars";
private final String USER_EP = "EP";
private final String USER_LEVEL = "Level";
private final String USER_LEVEL_PROGRESS = "LevelProgress";
private final String USER_STARS = "Stars";
private final String USER_ENERGY = "Energy";
private final String USER_TOOL_1 = "Tool1";
private final String USER_TOOL_2 = "Tool2";
private final String USER_TOOL_3 = "Tool3";
private final String USER_TOOL_4 = "Tool4";
private final String USER_TOOLS_LOCKED = "ToolsLocked";
private SharedPreferences preferences;
private MyDatabase database;
@ -40,32 +46,37 @@ public class DataStorageHandler {
editor.apply();
}
public User readUserData() {
int stars = preferences.getInt(USER_STARS, 0);
public User readUserData(User.LvUpListener lvUpListener) throws Exception {
int ep = preferences.getInt(USER_EP, 0);
int level = preferences.getInt(USER_LEVEL, 1);
int levelProgress = preferences.getInt(USER_LEVEL_PROGRESS, 0);
//TODO: Default Tooltypes to NONE
database.open();
ToolSlotSettings toolSlotSettings = database.readToolSlotSettings();
database.close();
return new User(stars, level, levelProgress, toolSlotSettings);
int stars = preferences.getInt(USER_STARS, 0);
int energy = preferences.getInt(USER_ENERGY, 0);
int toolsLocked = preferences.getInt(USER_TOOLS_LOCKED, 3);
String tool1 = preferences.getString(USER_TOOL_1, ToolType.RAMP.name());
String tool2 = preferences.getString(USER_TOOL_2, ToolType.NONE.name());
String tool3 = preferences.getString(USER_TOOL_3, ToolType.NONE.name());
String tool4 = preferences.getString(USER_TOOL_4, ToolType.NONE.name());
ToolSlotSettings toolSlotSettings = new ToolSlotSettings(tool1, tool2, tool3, tool4, toolsLocked);
return new User(lvUpListener, ep, level, stars, energy, toolSlotSettings);
}
public void writeUserData(User user) {
SharedPreferences.Editor editor = preferences.edit();
editor.putInt(USER_STARS, user.getStarCount());
editor.putInt(USER_EP, user.getEp());
editor.putInt(USER_LEVEL, user.getLevel());
editor.putInt(USER_LEVEL_PROGRESS, user.getLevelProgress());
editor.putInt(USER_STARS, user.getStarCount());
editor.putInt(USER_ENERGY, user.getEnergyCount());
editor.putString(USER_TOOL_1, user.getToolSlotSettings().get(0).getToolType().name());
editor.putString(USER_TOOL_2, user.getToolSlotSettings().get(1).getToolType().name());
editor.putString(USER_TOOL_3, user.getToolSlotSettings().get(2).getToolType().name());
editor.putString(USER_TOOL_4, user.getToolSlotSettings().get(3).getToolType().name());
editor.putInt(USER_TOOLS_LOCKED, user.getToolSlotSettings().getLockedSlotCount());
editor.apply();
database.open();
for (ToolSlot toolSlot : user.getToolSlotSettings())
database.writeToolSlot(user.getToolSlotSettings().indexOf(toolSlot), toolSlot);
database.close();
}
public void writeLevelProgress(int levelpackNumber, Level level) {
public void writeLevelProgress(Level level) {
database.open();
database.writeLevelProgress(levelpackNumber, level);
database.writeLevelProgress(level);
database.close();
}
@ -75,7 +86,7 @@ public class DataStorageHandler {
database.close();
}
public void readLevelPackLocked(LevelPack levelPack){
public void readLevelPackLocked(LevelPack levelPack) {
database.open();
database.readLevelPackLocked(levelPack);
database.close();
@ -83,9 +94,8 @@ public class DataStorageHandler {
public void readLevelProgress(LevelPack levelPack) {
database.open();
for (Level level : levelPack.getLevels()) {
database.readLevelProgress(levelPack.getWorld().getIndex(), level);
}
for (Level level : levelPack.getLevels())
database.readLevelProgress(level);
database.close();
}

View File

@ -25,12 +25,13 @@ import com.example.julian.endlessroll.main.screens.ToolShopScreen;
import com.example.julian.endlessroll.main.screens.WorldsScreen;
import com.example.julian.endlessroll.rendering.renderer.GameRenderer;
import com.example.julian.endlessroll.sounds.SoundManager;
import com.example.julian.endlessroll.views.LevelupMessage;
import com.example.julian.endlessroll.views.TopBarData;
/**
* Created by Julian on 06.02.2016.
*/
public class GameActivity extends Activity implements ExceptionHandler {
public class GameActivity extends Activity implements ExceptionHandler, User.LvUpListener {
private DataStorageHandler dataStorageHandler;
private LevelManager levelManager;
@ -45,6 +46,8 @@ public class GameActivity extends Activity implements ExceptionHandler {
private ToolShopScreen toolShopScreen;
private GameScreen gameScreen;
private LevelupMessage levelupMessage;
@Override
protected void onCreate(Bundle savedInstanceState) {
try {
@ -58,7 +61,7 @@ public class GameActivity extends Activity implements ExceptionHandler {
dataStorageHandler = new DataStorageHandler(this);
dataStorageHandler.readBoughtTools();
user = dataStorageHandler.readUserData();
user = dataStorageHandler.readUserData(this);
soundManager = new SoundManager(this);
soundManager.setSoundOn(dataStorageHandler.readIsSoundOn());
soundManager.backgroundMusic.getPlayer().setLooping(true);
@ -74,10 +77,14 @@ public class GameActivity extends Activity implements ExceptionHandler {
toolShopScreen = new ToolShopScreen(topBarData);
gameScreen = new GameScreen(topBarData, glSurfaceView);
levelupMessage = new LevelupMessage(this, typeface, user);
flipper = new ScreenFlipper(this, startScreen, worldsScreen, levelsScreen, gameScreen, toolShopScreen);
RelativeLayout relativeLayout = new RelativeLayout(this);
relativeLayout.addView(glSurfaceView);
relativeLayout.addView(flipper);
relativeLayout.addView(levelupMessage.getLayout());
//TODO: add Tutorial
setContentView(relativeLayout);
} catch (Exception e) {
onException(e);
@ -98,6 +105,10 @@ public class GameActivity extends Activity implements ExceptionHandler {
toolShopScreen.setCaller(caller);
}
public Screen.ScreenType getCurrentScreenType() {
return flipper.getCurrentScreen().getType();
}
public void selectWorld(LevelPack levelPack) {
levelsScreen.createList(levelPack);
}
@ -112,6 +123,16 @@ public class GameActivity extends Activity implements ExceptionHandler {
});
}
@Override
public void onLvUp(final int level) {
runOnUiThread(new Runnable() {
@Override
public void run() {
levelupMessage.show(level);
}
});
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
try {
@ -134,8 +155,8 @@ public class GameActivity extends Activity implements ExceptionHandler {
@Override
protected void onPause() {
GameLog.d("OnPause");
glSurfaceView.onPause();
if(flipper.getCurrentScreen() == gameScreen)
glSurfaceView.onPause();
if (flipper.getCurrentScreen() == gameScreen)
gameScreen.onPause();
soundManager.pause();
super.onPause();
@ -144,7 +165,7 @@ public class GameActivity extends Activity implements ExceptionHandler {
@Override
protected void onResume() {
GameLog.d("OnResume");
glSurfaceView.onResume();
glSurfaceView.onResume();
soundManager.resume();
super.onResume();
}
@ -168,5 +189,4 @@ public class GameActivity extends Activity implements ExceptionHandler {
ConfigurationInfo info = am.getDeviceConfigurationInfo();
return info.reqGlEsVersion >= 0x20000;
}
}

View File

@ -2,6 +2,8 @@ package com.example.julian.endlessroll.main;
import android.widget.RelativeLayout;
import com.example.julian.endlessroll.main.screens.Screen;
/**
* Created by Julian on 08.12.2015.
*/
@ -9,7 +11,7 @@ public interface GameHandler extends ExceptionHandler {
void startInUiThread(Runnable runnable);
void toLevelsScreen();
void toScreen(Screen.ScreenType screen);
RelativeLayout getRootLayout();

View File

@ -3,8 +3,8 @@ package com.example.julian.endlessroll.main;
import android.content.Context;
import android.opengl.GLSurfaceView;
import com.example.julian.endlessroll.rendering.renderer.GameRenderer;
import com.example.julian.endlessroll.rendering.Rendering;
import com.example.julian.endlessroll.rendering.renderer.GameRenderer;
/**
* Created by Julian on 30.07.2016.
@ -22,7 +22,7 @@ public class MyGlSurfaceView extends GLSurfaceView {
rendererSet = true;
}
public void addRendering(Rendering rendering){
public void addRendering(Rendering rendering) {
renderer.addRendering(rendering);
}

View File

@ -5,6 +5,7 @@ import android.view.View;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.entities.DestroyEffect;
import com.example.julian.endlessroll.entities.Energy;
import com.example.julian.endlessroll.entities.Player;
import com.example.julian.endlessroll.entities.Star;
import com.example.julian.endlessroll.entities.collision.CollisionManager;
@ -18,6 +19,7 @@ import com.example.julian.endlessroll.levels.levelup.LevelUpBounties;
import com.example.julian.endlessroll.main.DataStorageHandler;
import com.example.julian.endlessroll.main.GameHandler;
import com.example.julian.endlessroll.main.GameLog;
import com.example.julian.endlessroll.main.screens.Screen;
import com.example.julian.endlessroll.rendering.Rendering;
import com.example.julian.endlessroll.sounds.SoundManager;
import com.example.julian.endlessroll.views.MessageType;
@ -53,14 +55,15 @@ public class Game extends Rendering<GameScene> {
private Level level;
private List<Integer> collectedStars = new ArrayList<>();
private boolean energyCollected;
public Game(GameHandler handler, TopBarData topBarData) throws Exception{
public Game(GameHandler handler, TopBarData topBarData) throws Exception {
super(topBarData.getGameActivity());
this.handler = handler;
this.user = topBarData.getUser();
this.levelManager = topBarData.getLevelManager();
this.sounds = topBarData.getSoundManager();
levelUpBounties = new LevelUpBounties();
levelUpBounties = new LevelUpBounties(0);
physics = new Physics();
collisionManager = new CollisionManager(this);
particleSystem = new ParticleSystem(getContext());
@ -95,7 +98,7 @@ public class Game extends Rendering<GameScene> {
if (scene != null) {
collectedStars.clear();
particleSystem.deleteAllSources();
scene.loadLevel(level, levelPack.getWorld());
scene.loadLevel(level, levelPack.getTheme());
player = scene.getPlayer();
if (viewManager.isScreenSizeSet())
viewManager.resetViews();
@ -141,7 +144,7 @@ public class Game extends Rendering<GameScene> {
onGoalReached();
return;
}
physics.applyGravity(scene);
physics.applyGravity(scene, timer);
scene.update(timer);
collisionManager.update(physics, scene);
break;
@ -183,7 +186,7 @@ public class Game extends Rendering<GameScene> {
}
public void toLevelsScreen() {
handler.toLevelsScreen();
handler.toScreen(Screen.ScreenType.LEVELS);
}
public void setCurrentTool(ToolType toolType) {
@ -219,9 +222,9 @@ public class Game extends Rendering<GameScene> {
private void onGoalReached() {
gameState = GameState.LEVEL_FINISHED;
if (!level.isCompleted())
user.gainLvUpExp();
level.setCompleted(true);
if (!level.isFinished())
user.gainLvFinishedEp();
level.setFinished(true);
for (int i = 1; i <= 3; i++) {
if (collectedStars.contains(i)) {
@ -230,23 +233,19 @@ public class Game extends Rendering<GameScene> {
}
}
if (user.isShowLevelUp()) {
user.levelUpShown();
viewManager.showLevelUp(user.getLevel());
user.getToolSlotSettings().unlockSlotsIfLevelReached(user.getLevel(), levelUpBounties);
user.increaseStarCount(levelUpBounties.getBountyStarsAtLevel(user.getLevel()));
viewManager.resetViews();
}
level.setEnergyCollected(true);
user.increaseEnergyCount();
viewManager.showMessage(levelPack.isLastLevel(level), MessageType.WIN);
dataStorageHandler.writeLevelProgress(levelPack.getWorld().getIndex(), level);
dataStorageHandler.writeLevelProgress(level);
Level nextLevel = levelPack.getNextLevel(level);
if (nextLevel != null) {
nextLevel.setUnlocked(true);
dataStorageHandler.writeLevelProgress(levelPack.getWorld().getIndex(), nextLevel);
}else{
LevelPack nextLevelPack = levelManager.nextLevelPack(levelPack);
if(nextLevelPack != null){
nextLevel.setLocked(false);
dataStorageHandler.writeLevelProgress(nextLevel);
} else {
LevelPack nextLevelPack = levelManager.getNextLevelPack(levelPack);
if (nextLevelPack != null) {
nextLevelPack.setLocked(false);
dataStorageHandler.writeLevelPackLocked(nextLevelPack);
}
@ -259,6 +258,11 @@ public class Game extends Rendering<GameScene> {
collectedStars.add(star.getIndex());
}
public void onEnergyCollision(Energy energy){
scene.onEnergyCollision(energy);
energyCollected = true;
}
@Override
public void onException(Exception e) {
handler.onException(e);

View File

@ -2,6 +2,7 @@ package com.example.julian.endlessroll.main.game;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.entities.DestroyEffect;
import com.example.julian.endlessroll.entities.Energy;
import com.example.julian.endlessroll.entities.Entity;
import com.example.julian.endlessroll.entities.Goal;
import com.example.julian.endlessroll.entities.Obstacle;
@ -14,8 +15,8 @@ import com.example.julian.endlessroll.entities.tools.Tool;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.levels.Level;
import com.example.julian.endlessroll.levels.ObstacleData;
import com.example.julian.endlessroll.levels.StarData;
import com.example.julian.endlessroll.levels.worlds.World;
import com.example.julian.endlessroll.levels.PositionData;
import com.example.julian.endlessroll.levels.worlds.Theme;
import com.example.julian.endlessroll.main.GameLog;
import java.util.ArrayList;
@ -28,7 +29,7 @@ import java.util.List;
*/
public class GameScene extends Scene {
private World currentWorld;
private Theme currentTheme;
private CollisionDetector collisionDetector;
private Goal goal;
@ -36,6 +37,7 @@ public class GameScene extends Scene {
private List<Obstacle> obstacles = Collections.synchronizedList(new ArrayList<Obstacle>());
private List<Star> stars = Collections.synchronizedList(new ArrayList<Star>());
private List<Tool> tools = Collections.synchronizedList(new ArrayList<Tool>());
private Energy energy;
public GameScene(TexturePack texturePack, ParticleSystem particleSystem) throws Exception {
super(texturePack, particleSystem);
@ -44,35 +46,41 @@ public class GameScene extends Scene {
goal = new Goal(textures.goal);
}
public void loadLevel(Level level, World world) throws Exception {
this.currentWorld = world;
public void loadLevel(Level level, Theme theme) throws Exception {
this.currentTheme = theme;
reset();
background.changeTexture(world.getBackgroundTexture());
terrain.loadData(world, level.getTerrainEdge(), level.getTerrainTiles());
ceiling.loadData(world, level.getCeilingEdge(), level.getCeilingTiles());
background.changeTexture(theme.getBackgroundTexture());
terrain.loadData(theme, level.getTerrainEdge(), level.getTerrainTiles());
ceiling.loadData(theme, level.getCeilingEdge(), level.getCeilingTiles());
super.add(goal);
player.init(terrain.getEdge(), level.getStartSpeed(), level.getEndSpeed());
super.add(player);
tryToAddEnergy(level);
for (ObstacleData data : level.getObstacles())
addObstacle(data);
for (StarData data : level.getStars()) {
if (data.getIndex() == 1 && level.isFirstStarCollected())
for (int i = 0; i < level.getStars().size(); i++) {
if (level.isStarCollected(i))
continue;
if (data.getIndex() == 2 && level.isSecondStarCollected())
continue;
if (data.getIndex() == 3 && level.isThirdStarCollected())
continue;
addStar(data);
addStar(i, level.getStars().get(i));
}
goalX = level.getGoalX();
goal.setGoalX(goalX);
GameLog.d("Level " + level.getNumber() + " successfully loaded");
GameLog.d("Level " + level.getId() + " successfully loaded");
}
private void tryToAddEnergy(Level level){
PositionData data = level.getEnergyData();
if(data != null && !level.isEnergyCollected()) {
energy = new Energy(textures.player, data);
super.add(energy);
}
}
private void reset() {
super.clear();
obstacles.clear();
tools.clear();
energy = null;
cameraX = 0;
background.resetPosition();
}
@ -90,14 +98,18 @@ public class GameScene extends Scene {
}
}
public void onEnergyCollision(Energy energy){
energy.destroy(DestroyEffect.STAR_EXPLOSION);
}
public void addObstacle(ObstacleData data) {
Obstacle obstacle = new Obstacle(currentWorld, data, terrain.getEdge());
Obstacle obstacle = new Obstacle(currentTheme, data, terrain.getEdge());
super.add(obstacle);
obstacles.add(obstacle);
}
public void addStar(StarData data) {
Star star = new Star(textures.star, data);
public void addStar(int index, PositionData data) {
Star star = new Star(index, textures.star, data);
super.add(star);
stars.add(star);
}
@ -152,6 +164,14 @@ public class GameScene extends Scene {
return stars;
}
public Energy getEnergy() {
return energy;
}
public boolean hasEnergy(){
return energy != null;
}
public float getGoalX() {
return goalX;
}

View File

@ -5,15 +5,15 @@ import android.support.annotation.Nullable;
import com.example.julian.endlessroll.entities.Entity;
import com.example.julian.endlessroll.entities.Obstacle;
import com.example.julian.endlessroll.entities.Star;
import com.example.julian.endlessroll.entities.tileLists.Ceiling;
import com.example.julian.endlessroll.entities.tileLists.Terrain;
import com.example.julian.endlessroll.entities.tileLists.Tile;
import com.example.julian.endlessroll.entities.collision.CollisionDetector;
import com.example.julian.endlessroll.entities.collision.collisionData.EntityCollisionData;
import com.example.julian.endlessroll.entities.collision.collisionData.ObstacleCollisionData;
import com.example.julian.endlessroll.entities.collision.collisionData.PlayerCollisionData;
import com.example.julian.endlessroll.entities.collision.collisionData.ToolCollisionData;
import com.example.julian.endlessroll.entities.collision.geometry.Circle;
import com.example.julian.endlessroll.entities.tileLists.Ceiling;
import com.example.julian.endlessroll.entities.tileLists.Terrain;
import com.example.julian.endlessroll.entities.tileLists.Tile;
import com.example.julian.endlessroll.entities.tools.Bomb;
import com.example.julian.endlessroll.entities.tools.Tool;
import com.example.julian.endlessroll.main.GameLog;
@ -28,65 +28,70 @@ import java.util.Map;
*/
public class Physics {
public final float GRAVITY_FORCE = .00004f;
public final float GRAVITY_FORCE = .0000025f;
private CollisionDetector detector;
public Physics() {
detector = new CollisionDetector();
}
public void applyGravity(GameScene scene) {
scene.getPlayer().getMovement().y -= GRAVITY_FORCE;
synchronized (scene.getTools()){
for (Tool tool : scene.getTools()) {
if (tool.isFloating())
continue;
if (tool instanceof Bomb) {
for (Obstacle obstacle : scene.getObstacles()) {
if (detector.quadQuadCollision(obstacle, tool)) {
GameLog.i("collision");
tool.setFloating(true);
tool.getMovement().y = 0;
break;
}
}
public void applyGravity(GameScene scene, Timer timer) {
float gravity = GRAVITY_FORCE * timer.getFrameTime();
GameLog.i("FrameTime: " + timer.getFrameTime());
scene.getPlayer().getMovement().y -= gravity;
synchronized (scene.getTools()) {
for (Tool tool : scene.getTools()) {
if (tool.isFloating())
continue;
}
float terrainEdge = getTerrainEdge(tool, scene.getTerrain());
Obstacle toolIsOver = getObstacleToolIsOver(tool, scene.getObstacles());
if (tool instanceof Bomb) {
for (Obstacle obstacle : scene.getObstacles()) {
if (detector.quadQuadCollision(obstacle, tool)) {
GameLog.i("collision");
tool.setFloating(true);
tool.getMovement().y = 0;
break;
}
}
if (tool.isFloating())
continue;
}
float terrainEdge = getTerrainEdge(tool, scene.getTerrain());
Obstacle toolIsOver = getObstacleToolIsOver(tool, scene.getObstacles());
float orientingHeight = terrainEdge;
if (toolIsOver != null) {
if (toolIsOver.getBottomEdge() < tool.getTopEdge())
orientingHeight = Math.max(toolIsOver.getTopEdge(), terrainEdge);
else{
orientingHeight = terrainEdge;
float orientingHeight = terrainEdge;
if (toolIsOver != null) {
if (toolIsOver.getBottomEdge() < tool.getTopEdge())
orientingHeight = Math.max(toolIsOver.getTopEdge(), terrainEdge);
else {
orientingHeight = terrainEdge;
}
}
if (tool.getBottomEdge() > orientingHeight) {
tool.getMovement().y -= gravity * 2;
} else {
tool.getMovement().y = 0;
tool.setToTerrain(orientingHeight);
}
}
if (tool.getBottomEdge() > orientingHeight) {
tool.getMovement().y -= GRAVITY_FORCE * 2;
} else {
tool.getMovement().y = 0;
tool.setToTerrain(orientingHeight);
}
}
}}
}
@Nullable
private Obstacle getObstacleToolIsOver(Entity tool, List<Obstacle> obstacles) {
Map<Float, Obstacle> isOver = new HashMap<>();
synchronized (obstacles){
for (Obstacle obstacle : obstacles) {
boolean toolVertexInObstacleEdge = (tool.getLeftEdge() >= obstacle.getLeftEdge() && tool.getLeftEdge() <= obstacle.getRightEdge()) || (tool.getRightEdge() <= obstacle.getRightEdge() && tool.getRightEdge() >= obstacle.getLeftEdge());
boolean obstacleVertexInToolEdge = (obstacle.getLeftEdge() >= tool.getLeftEdge() && obstacle.getLeftEdge() <= tool.getRightEdge()) || (obstacle.getRightEdge() <= tool.getRightEdge() && obstacle.getRightEdge() >= tool.getLeftEdge());
if (toolVertexInObstacleEdge || obstacleVertexInToolEdge)
isOver.put(obstacle.getTopEdge(), obstacle);
}}
synchronized (obstacles) {
for (Obstacle obstacle : obstacles) {
boolean toolVertexInObstacleEdge = (tool.getLeftEdge() >= obstacle.getLeftEdge() && tool.getLeftEdge() <= obstacle.getRightEdge()) || (tool.getRightEdge() <= obstacle.getRightEdge() && tool.getRightEdge() >= obstacle.getLeftEdge());
boolean obstacleVertexInToolEdge = (obstacle.getLeftEdge() >= tool.getLeftEdge() && obstacle.getLeftEdge() <= tool.getRightEdge()) || (obstacle.getRightEdge() <= tool.getRightEdge() && obstacle.getRightEdge() >= tool.getLeftEdge());
if (toolVertexInObstacleEdge || obstacleVertexInToolEdge)
isOver.put(obstacle.getTopEdge(), obstacle);
}
}
float max = -100;
for (float height : isOver.keySet()) {
if(isOver.get(height).getBottomEdge() < tool.getTopEdge()) {
if (isOver.get(height).getBottomEdge() < tool.getTopEdge()) {
max = Math.max(max, height);
}
}
@ -112,7 +117,8 @@ public class Physics {
ObstacleCollisionData obstacleData = playerCollidesWithObstacle(scene);
ToolCollisionData toolData = playerCollidesWithTool(scene);
EntityCollisionData starData = playerCollidesWithStar(scene);
return new PlayerCollisionData(terrainData, ceilingData, obstacleData, toolData, starData);
EntityCollisionData energyData = playerCollidesWithEnergy(scene);
return new PlayerCollisionData(terrainData, ceilingData, obstacleData, toolData, starData, energyData);
}
private EntityCollisionData playerCollidesWithTerrain(GameScene scene) {
@ -137,33 +143,44 @@ public class Physics {
private ObstacleCollisionData playerCollidesWithObstacle(GameScene scene) {
List<EntityCollisionData> collisions = new ArrayList<>();
synchronized (scene.getObstacles()){
for (Obstacle obstacle : scene.getObstacles()) {
EntityCollisionData data = detector.playerEntityCollision(scene.getPlayer(), obstacle);
if (data.isCollision())
collisions.add(data);
}}
synchronized (scene.getObstacles()) {
for (Obstacle obstacle : scene.getObstacles()) {
EntityCollisionData data = detector.playerEntityCollision(scene.getPlayer(), obstacle);
if (data.isCollision())
collisions.add(data);
}
}
return new ObstacleCollisionData(collisions);
}
private ToolCollisionData playerCollidesWithTool(GameScene scene) {
List<Tool> tools = new ArrayList<>();
Circle circle = new Circle(scene.getPlayer());
synchronized (scene.getTools()){
for (Tool tool : scene.getTools()) {
if (detector.circleToolCollision(circle, tool.getCollisionBounds()))
tools.add(tool);
}}
synchronized (scene.getTools()) {
for (Tool tool : scene.getTools()) {
if (detector.circleToolCollision(circle, tool.getCollisionBounds()))
tools.add(tool);
}
}
return new ToolCollisionData(tools);
}
private EntityCollisionData playerCollidesWithStar(GameScene scene) {
synchronized (scene.getStars()){
for (Star star : scene.getStars()) {
EntityCollisionData data = detector.playerEntityCollision(scene.getPlayer(), star);
if (data.isCollision())
return data;
}}
synchronized (scene.getStars()) {
for (Star star : scene.getStars()) {
EntityCollisionData data = detector.playerEntityCollision(scene.getPlayer(), star);
if (data.isCollision())
return data;
}
}
return new EntityCollisionData(null, null);
}
private EntityCollisionData playerCollidesWithEnergy(GameScene scene) {
if (scene.hasEnergy()) {
EntityCollisionData data = detector.playerEntityCollision(scene.getPlayer(), scene.getEnergy());
return data;
} else
return new EntityCollisionData(null, null);
}
}

View File

@ -10,7 +10,7 @@ import com.example.julian.endlessroll.entities.particles.ParticleSystem;
import com.example.julian.endlessroll.entities.textures.TexturePack;
import com.example.julian.endlessroll.entities.tileLists.Ceiling;
import com.example.julian.endlessroll.entities.tileLists.Terrain;
import com.example.julian.endlessroll.levels.worlds.World;
import com.example.julian.endlessroll.levels.worlds.Theme;
import java.util.Iterator;
@ -35,9 +35,9 @@ public abstract class Scene extends SynchronizedArrayList<Entity> {
this.particleSystem = particleSystem;
setTexturePack(texturePack);
playerArrow = new Entity(textures.playerArrow, new Vector(0, 0.9f), .2f, .2f);
background = new Background(World.GRASSLANDS.getBackgroundTexture());
terrain = new Terrain(World.GRASSLANDS.getTerrainTexture());
ceiling = new Ceiling(World.GRASSLANDS.getTerrainTexture());
background = new Background(Theme.GRASSLANDS.getBackgroundTexture());
terrain = new Terrain(Theme.GRASSLANDS.getTerrainTexture());
ceiling = new Ceiling(Theme.GRASSLANDS.getTerrainTexture());
player = new Player(textures.player);
}
@ -53,9 +53,9 @@ public abstract class Scene extends SynchronizedArrayList<Entity> {
Vector movement = entity.getMovement();
Vector finalMovement = new Vector(movement).mul(timer.getFrameTime());
entity.move(finalMovement);
if(entity instanceof Obstacle){
if (entity instanceof Obstacle) {
Obstacle obstacle = (Obstacle) entity;
if(obstacle.isMoving())
if (obstacle.isMoving())
obstacle.moveWithMoveComponent(timer.getFrameTime());
}
if (entity.isDestroyed() && entity.getDestroyEffect() != null)

View File

@ -3,13 +3,13 @@ package com.example.julian.endlessroll.main.game;
import com.example.julian.endlessroll.entities.Entity;
import com.example.julian.endlessroll.entities.particles.ParticleSystem;
import com.example.julian.endlessroll.entities.textures.TexturePack;
import com.example.julian.endlessroll.levels.worlds.World;
import com.example.julian.endlessroll.levels.worlds.Theme;
public class StartScene extends Scene {
public StartScene(TexturePack texturePack, ParticleSystem particleSystem) {
super(texturePack, particleSystem);
terrain.createEndless(World.ICY_MOUNTAINS, -.8f);
terrain.createEndless(Theme.ICY_MOUNTAINS, -.8f);
player.init(terrain.getEdge(), 0.5f, 0.5f);
super.add(player);
}

View File

@ -1,89 +1,119 @@
package com.example.julian.endlessroll.main.game;
import com.example.julian.endlessroll.entities.tools.ToolSlotSettings;
import com.example.julian.endlessroll.levels.levelup.LevelBounty;
import com.example.julian.endlessroll.levels.levelup.LevelUpBounties;
/**
* Created by Julian on 10.07.2016.
*/
public class User {
private final int LV_UP_EXP = 25;
private final int STAR_EXP = 2;
private int starCount;
public interface LvUpListener {
public void onLvUp(int level);
}
private final int LV_DONE_EP = 25;
private final int STAR_EP = 4;
private final int ENERGY_EP = 13;
//MAX EP IN ONE LEVEL: 50 (25 + 3*4 + 13)
private LvUpListener lvUpListener;
private int ep;
private int level;
private int levelProgress;
private boolean showLevelUp = false;
private int starCount;
private int energyCount;
private ToolSlotSettings toolSlotSettings;
public User(int starCount, int level, int levelProgress, ToolSlotSettings toolSlotSettings) {
this.starCount = starCount;
private LevelUpBounties levelUpBounties;
public User(LvUpListener lvUpListener, int ep, int level, int starCount, int energyCount, ToolSlotSettings toolSlotSettings) {
this.lvUpListener = lvUpListener;
this.ep = ep;
this.level = level;
this.levelProgress = levelProgress;
this.starCount = starCount;
this.energyCount = energyCount;
this.toolSlotSettings = toolSlotSettings;
levelUpBounties = new LevelUpBounties(level);
}
public void clearData() {
starCount = 0;
ep = 0;
level = 1;
levelProgress = 0;
showLevelUp = false;
starCount = 0;
energyCount = 0;
toolSlotSettings.reset();
}
public void increaseStarCount() {
increaseStarCount(1);
gainExp(STAR_EXP);
}
public void increaseStarCount(int starCount) {
this.starCount += starCount;
gainEp(STAR_EP * starCount);
}
public void decreaseStarCount(int count){
this.starCount-=count;
public void increaseEnergyCount() {
increaseEnergyCount(1);
}
public void gainLvUpExp() {
gainExp(LV_UP_EXP);
public void increaseEnergyCount(int energyCount) {
this.energyCount += energyCount;
gainEp(ENERGY_EP * energyCount);
}
private void gainExp(int amount) {
levelProgress += amount;
if (levelProgress >= 100) {
levelProgress -= 100;
public void gainLvFinishedEp() {
gainEp(LV_DONE_EP);
}
public void gainEp(int amount) {
ep += amount;
if (ep >= 100) {
ep -= 100;
levelUp();
}
}
private void levelUp() {
level++;
showLevelUp = true;
levelUpBounties.loadAllForLevel(level);
toolSlotSettings.unlockSlotsIfLevelReached(levelUpBounties);
LevelBounty bounty = levelUpBounties.get(level);
if (bounty != null) {
increaseStarCount(bounty.getStarCount());
increaseEnergyCount(bounty.getEnergyCount());
}
lvUpListener.onLvUp(level);
}
public int getStarCount() {
return starCount;
public int getEp() {
return ep;
}
public int getLevel() {
return level;
}
public int getLevelProgress() {
return levelProgress;
public int getStarCount() {
return starCount;
}
public boolean isShowLevelUp() {
return showLevelUp;
}
public void levelUpShown() {
showLevelUp = false;
public int getEnergyCount() {
return energyCount;
}
public ToolSlotSettings getToolSlotSettings() {
return toolSlotSettings;
}
public LevelUpBounties getLevelUpBounties() {
return levelUpBounties;
}
//CHEAT
public void setLevel(int level) {
this.level = level;
}

View File

@ -20,7 +20,7 @@ public class GameScreen extends GLScreen<RelativeLayout> {
private GameActivity activity;
private Game game;
public GameScreen(TopBarData topBarData, MyGlSurfaceView glSurfaceView) throws Exception{
public GameScreen(TopBarData topBarData, MyGlSurfaceView glSurfaceView) throws Exception {
super(ScreenType.GAME, topBarData.getGameActivity(), R.layout.game, glSurfaceView);
this.activity = topBarData.getGameActivity();
game = new Game(gameViewHandler, topBarData);
@ -33,8 +33,8 @@ public class GameScreen extends GLScreen<RelativeLayout> {
game.resetViews();
}
public void onPause(){
game.pause();
public void onPause() {
game.pause();
}
@Override
@ -47,6 +47,10 @@ public class GameScreen extends GLScreen<RelativeLayout> {
game.startGame(levelPack, level);
}
public GameHandler getGameViewHandler() {
return gameViewHandler;
}
private GameHandler gameViewHandler = new GameHandler() {
@Override
@ -55,9 +59,9 @@ public class GameScreen extends GLScreen<RelativeLayout> {
}
@Override
public void toLevelsScreen() {
public void toScreen(ScreenType screen) {
glView.setCurrentRendering(null);
activity.flipToScreen(ScreenType.LEVELS);
activity.flipToScreen(screen);
}
@Override

View File

@ -52,12 +52,12 @@ public class LevelsScreen extends Screen<LinearLayout> implements View.OnClickLi
}
private void createButton(Context context, Level level, int levelCount) {
int levelNumber = level.getNumber();
LevelButton button = new LevelButton(context, typeface, this, levelNumber, !level.isUnlocked());
button.showCollectedStars(level.isFirstStarCollected(), level.isSecondStarCollected(), level.isThirdStarCollected());
int levelNumber = level.getId();
LevelButton button = new LevelButton(context, typeface, this, levelNumber, level.isLocked());
button.showCollectedStars(level.getCollectedStars());
levelButtons.put(levelNumber, button);
int halfLevelCount = levelCount / 2;
if(levelCount % 2 == 1)
if (levelCount % 2 == 1)
halfLevelCount++;
if (levelNumber <= halfLevelCount)

View File

@ -11,7 +11,7 @@ import android.view.ViewGroup;
public abstract class Screen<V extends ViewGroup> {
public enum ScreenType {
START(0), WORLDS(1), LEVELS(2), GAME(3), TOOL_SHOP(4);
NONE(-1), START(0), WORLDS(1), LEVELS(2), GAME(3), TOOL_SHOP(4);
private int inFlipperPosition;

View File

@ -1,6 +1,7 @@
package com.example.julian.endlessroll.main.screens;
import android.graphics.Typeface;
import android.support.annotation.IdRes;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.Button;
@ -27,23 +28,21 @@ public class StartScreen extends GLScreen<RelativeLayout> implements View.OnClic
private Rendering rendering;
private Button play;
private Button comingSoon;
private Button lvUp;
private Button lv100;
private ToggleButton soundToggle;
public StartScreen(GameActivity activity, MyGlSurfaceView glSurfaceView, SoundManager soundManager, LevelManager levelManager, User user, Typeface typeface) throws Exception{
public StartScreen(GameActivity activity, MyGlSurfaceView glSurfaceView, SoundManager soundManager, LevelManager levelManager, User user, Typeface typeface) throws Exception {
super(ScreenType.START, activity, R.layout.start_screen, glSurfaceView);
this.activity = activity;
this.soundManager = soundManager;
this.levelManager = levelManager;
this.user = user;
play = (Button) layout.findViewById(R.id.startscreen_play);
play.setTypeface(typeface);
play.setOnClickListener(this);
play = createButton(R.id.startscreen_play, typeface);
play.startAnimation(AnimationUtils.loadAnimation(activity, R.anim.rotate));
comingSoon = (Button) layout.findViewById(R.id.startscreen_comingsoon);
comingSoon.setTypeface(typeface);
comingSoon.setOnClickListener(this);
lvUp = createButton(R.id.startscreen_comingsoon, typeface);
lv100 = createButton(R.id.startscreen_maxcheat, typeface);
soundToggle = (ToggleButton) layout.findViewById(R.id.startscreen_sound);
soundToggle.setTypeface(typeface);
soundToggle.setOnClickListener(this);
@ -53,6 +52,13 @@ public class StartScreen extends GLScreen<RelativeLayout> implements View.OnClic
glView.addRendering(rendering);
}
private Button createButton(@IdRes int id, Typeface typeface) {
Button button = (Button) layout.findViewById(id);
button.setTypeface(typeface);
button.setOnClickListener(this);
return button;
}
@Override
public void prepareToBeShown() {
glView.setCurrentRendering(rendering);
@ -72,12 +78,14 @@ public class StartScreen extends GLScreen<RelativeLayout> implements View.OnClic
glView.setCurrentRendering(null);
} else if (v.equals(soundToggle)) {
soundManager.setSoundOn(soundToggle.isChecked());
} else if (v.equals(comingSoon)) {
user.setLevel(100);
user.setStarCount(100);
} else if (v.equals(lv100)) {
//user.setLevel(100);
// user.setStarCount(100);
levelManager.unlockAllLevels();
levelManager.unlockAllPacks();
user.gainEp(75);
} else if (v.equals(lvUp)) {
user.gainEp(100);
}
}

View File

@ -18,7 +18,7 @@ public class StartScreenRendering extends Rendering<StartScene> {
private Timer timer;
private ParticleSystem particleSystem;
public StartScreenRendering(GameActivity gameActivity) throws Exception{
public StartScreenRendering(GameActivity gameActivity) throws Exception {
super(gameActivity);
this.particleSystem = new ParticleSystem(gameActivity);
}
@ -32,7 +32,8 @@ public class StartScreenRendering extends Rendering<StartScene> {
scene.setTexturePack(texturePack);
try {
particleSystem.loadTextures();
}catch (Exception e){}
} catch (Exception e) {
}
return scene;
}

View File

@ -1,6 +1,5 @@
package com.example.julian.endlessroll.main.screens;
import android.view.DragEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@ -12,7 +11,6 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.entities.tools.ToolSlot;
import com.example.julian.endlessroll.entities.tools.ToolSlotSettings;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.levels.levelup.LevelUpBounties;
@ -51,7 +49,7 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnCli
public ToolShopScreen(TopBarData topBarData) {
super(ScreenType.TOOL_SHOP, topBarData.getGameActivity(), R.layout.toolshop);
this.levelUpBounties = new LevelUpBounties();
this.levelUpBounties = new LevelUpBounties(0);
this.activity = topBarData.getGameActivity();
this.user = topBarData.getUser();
this.slotSettings = user.getToolSlotSettings();
@ -93,8 +91,8 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnCli
public void setSelectedToolOfferSlot(ToolOfferSlot slot) {
selectedToolOfferSlot = slot;
for(ToolOfferSlot offerSlot : toolOfferSlots){
if(!offerSlot.equals(slot))
for (ToolOfferSlot offerSlot : toolOfferSlots) {
if (!offerSlot.equals(slot))
offerSlot.setSelected(false);
}
}
@ -113,14 +111,15 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnCli
@Override
public void prepareToBeShown() {
topBar.update();
slotSettings.unlockSlotsIfLevelReached(user.getLevel(), levelUpBounties);
levelUpBounties.loadAllForLevel(user.getLevel());
slotSettings.unlockSlotsIfLevelReached(levelUpBounties);
toolSlot1.setImageResource(slotSettings.get(0).getDrawable());
toolSlot2.setImageResource(slotSettings.get(1).getDrawable());
toolSlot3.setImageResource(slotSettings.get(2).getDrawable());
toolSlot4.setImageResource(slotSettings.get(3).getDrawable());
for (ToolOfferSlot slot : toolOfferSlots) {
slot.updateIsBought();
boolean locked = !levelUpBounties.isToolAlreadyUnlockedAtLevel(user.getLevel(), slot.getToolType());
boolean locked = levelUpBounties.isToolLocked(slot.getToolType());
slot.setLocked(locked);
if (slot.getToolType() == ToolType.RAMP)
slot.buy();
@ -140,7 +139,7 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnCli
} else if (v.equals(priceButton)) {
int costs = selectedToolOfferSlot.getToolType().getCosts();
topBar.showStarcountDecrease(-costs);
user.decreaseStarCount(costs);
user.increaseStarCount(-costs);
selectedToolOfferSlot.buy();
priceButton.setVisibility(View.INVISIBLE);
topBar.update();

View File

@ -16,7 +16,7 @@ public class Fbo {
int[] frameBuffers = new int[1];
GLES20.glGenFramebuffers(1, frameBuffers, 0);
this.frameBuffer = frameBuffers[0];
bind();
bind();
int[] textures = new int[1];
GLES20.glGenTextures(1, textures, 0);

View File

@ -2,21 +2,21 @@ package com.example.julian.endlessroll.rendering;
public class Lock {
private boolean isLocked = false;
private boolean isLocked = false;
public synchronized void lock() {
while (isLocked) {
try {
wait();
} catch (Exception e) {
e.printStackTrace();
}
}
isLocked = true;
}
public synchronized void lock() {
while (isLocked) {
try {
wait();
} catch (Exception e) {
e.printStackTrace();
}
}
isLocked = true;
}
public synchronized void unlock() {
isLocked = false;
notify();
}
public synchronized void unlock() {
isLocked = false;
notify();
}
}

View File

@ -44,7 +44,7 @@ public abstract class Rendering<S extends Scene> implements View.OnTouchListener
return scene;
}
public Context getContext(){
public Context getContext() {
return gameActivity;
}

View File

@ -130,7 +130,7 @@ public class GameRenderer implements GLSurfaceView.Renderer {
gl.glBindTexture(GL10.GL_TEXTURE_2D, entity.getTexture().getId());
entityShader.loadTransformationMatrix(matrixCreator, entity);
entityShader.loadAlpha(entity.getAlpha());
entityShader.loadTextureAtlasInfos(entity.getTexture());
entityShader.loadTextureAtlasInfos(entity.getTexture(), entity.getTextureAtlasIndex());
quad.draw();
}

View File

@ -54,13 +54,14 @@ public class ParticleRenderer {
gl.glBindTexture(GL10.GL_TEXTURE_2D, effect.getTexture().getId());
switchAdditiveBlending(gl, effect.getOptions().isAdditive());
synchronized (effect.getSources()){
for (ParticleSource source : effect.getSources()) {
source.getActiveParticleLock().lock();
for (Particle particle : source.getActiveParticles())
renderParticle(particle);
source.getActiveParticleLock().unlock();
}}
synchronized (effect.getSources()) {
for (ParticleSource source : effect.getSources()) {
source.getActiveParticleLock().lock();
for (Particle particle : source.getActiveParticles())
renderParticle(particle);
source.getActiveParticleLock().unlock();
}
}
}
}
disableAdditiveBlending(gl);

View File

@ -3,7 +3,6 @@ package com.example.julian.endlessroll.rendering.shader;
import android.content.Context;
import android.opengl.GLES20;
import com.example.julian.endlessroll.data.Color;
import com.example.julian.endlessroll.entities.Entity;
import com.example.julian.endlessroll.entities.textures.Texture;
import com.example.julian.endlessroll.rendering.MatrixCreator;
@ -11,7 +10,7 @@ import com.example.julian.endlessroll.rendering.MatrixCreator;
/**
* Created by Julian on 10.08.2016.
*/
public class EntityShader extends ShaderProgram{
public class EntityShader extends ShaderProgram {
private int location_mvpMatrix;
private int location_transformationMatrix;
@ -46,8 +45,8 @@ public class EntityShader extends ShaderProgram{
GLES20.glUniform1f(location_alpha, alpha);
}
public void loadTextureAtlasInfos(Texture texture) {
public void loadTextureAtlasInfos(Texture texture, int atlasIndex) {
GLES20.glUniform2f(location_texAtlasSize, texture.getAtlasWidth(), texture.getAtlasHeight());
GLES20.glUniform1f(location_texAtlasIndex, texture.getAtlasIndex());
GLES20.glUniform1f(location_texAtlasIndex, atlasIndex);
}
}

View File

@ -10,7 +10,7 @@ import com.example.julian.endlessroll.rendering.MatrixCreator;
/**
* Created by Julian on 10.08.2016.
*/
public class ParticleShader extends ShaderProgram{
public class ParticleShader extends ShaderProgram {
private int location_mvpMatrix;
private int location_transformationMatrix;

View File

@ -45,7 +45,7 @@ public abstract class ShaderProgram {
protected abstract void loadUniformLocations();
protected int getUniformLocation(String name){
protected int getUniformLocation(String name) {
return GLES20.glGetUniformLocation(program, name);
}

View File

@ -4,26 +4,20 @@ import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import com.example.julian.endlessroll.entities.tools.ToolSlot;
import com.example.julian.endlessroll.entities.tools.ToolSlotSettings;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.levels.Level;
import com.example.julian.endlessroll.levels.LevelPack;
import com.example.julian.endlessroll.main.GameLog;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Julian on 10.05.2016.
*/
public class MyDatabase extends DatabaseAdapter {
private final static int VERSION = 6;
private final static int VERSION = 7;
private final static String DATABASE_NAME = "DATABASE";
private SQLTableColumn levelpackColumn, levelColumn, unlockedColumn, completedColumn, starsColumn;
private SQLTableColumn idColumn, toolTypeColumn, lockedColumn, boughtColumn;
private SQLTable levelTable, levelPackTable, toolSlotTable, boughtToolTable;
private SQLTableColumn levelpackColumn, levelColumn, lockedColumn, finishedColumn, starsColumn, energyColumn;
private SQLTableColumn toolIdColumn, boughtColumn;
private SQLTable levelTable, levelPackTable, toolTable;
public MyDatabase(Context context) {
super(context, DATABASE_NAME, VERSION);
@ -33,47 +27,46 @@ public class MyDatabase extends DatabaseAdapter {
protected void createColumns() {
levelpackColumn = new SQLTableColumn("LEVELPACK", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
levelColumn = new SQLTableColumn("LEVEL", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
unlockedColumn = new SQLTableColumn("UNLOCKED", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
completedColumn = new SQLTableColumn("COMPLETED", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
starsColumn = new SQLTableColumn("STARS", SQLTableColumn.ColumnType.TEXT, SQLTableColumn.ColumnExtra.NONE);
idColumn = new SQLTablePrimaryKeyColumn(false);
toolTypeColumn = new SQLTableColumn("TOOLTYPE", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
lockedColumn = new SQLTableColumn("LOCKED", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
finishedColumn = new SQLTableColumn("FINISHED", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
starsColumn = new SQLTableColumn("STARS", SQLTableColumn.ColumnType.TEXT, SQLTableColumn.ColumnExtra.NOT_NULL);
energyColumn = new SQLTableColumn("ENERGY", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
toolIdColumn = new SQLTableColumn("TOOL_ID", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
boughtColumn = new SQLTableColumn("BOUGHT", SQLTableColumn.ColumnType.INTEGER, SQLTableColumn.ColumnExtra.NOT_NULL);
}
@Override
protected SQLTable[] createTables() {
levelTable = new SQLTable("LEVELTABLE", levelpackColumn, levelColumn, unlockedColumn, completedColumn, starsColumn);
levelPackTable = new SQLTable("LEVELPACKS", levelpackColumn, unlockedColumn);
toolSlotTable = new SQLTable("TOOL_SLOT_TABLE", idColumn, toolTypeColumn, lockedColumn);
boughtToolTable = new SQLTable("BOUGHT_TOOL_TABLE", idColumn, boughtColumn);
return new SQLTable[]{levelTable, levelPackTable, toolSlotTable, boughtToolTable};
levelPackTable = new SQLTable("LEVELPACK_TABLE", levelpackColumn, lockedColumn);
levelTable = new SQLTable("LEVEL_TABLE", levelpackColumn, levelColumn, lockedColumn, finishedColumn, starsColumn, energyColumn);
toolTable = new SQLTable("TOOL_TABLE", toolIdColumn, boughtColumn);
return new SQLTable[]{levelPackTable, levelTable, toolTable};
}
public void writeLevelProgress(int levelpackNumber, Level level) {
public void writeLevelProgress(Level level) {
ContentValues values = new ContentValues();
values.put(levelpackColumn.getKey(), levelpackNumber);
values.put(levelColumn.getKey(), level.getNumber());
values.put(unlockedColumn.getKey(), level.isUnlocked() ? 1 : 0);
values.put(completedColumn.getKey(), level.isCompleted() ? 1 : 0);
values.put(starsColumn.getKey(), level.getCollectedStars());
long update = super.update(levelTable, values, levelpackColumn, levelpackNumber, levelColumn, level.getNumber());
readLevelProgress(levelpackNumber, level);
values.put(levelpackColumn.getKey(), level.getPackId());
values.put(levelColumn.getKey(), level.getId());
values.put(lockedColumn.getKey(), level.isLocked() ? 1 : 0);
values.put(finishedColumn.getKey(), level.isFinished() ? 1 : 0);
values.put(starsColumn.getKey(), level.getCollectedStarCodeForSQL());
values.put(energyColumn.getKey(), level.isEnergyCollected());
long update = super.update(levelTable, values, levelpackColumn, level.getPackId(), levelColumn, level.getId());
}
public void readLevelProgress(int levelpackNumber, Level level) {
Cursor cursor = super.getCursor(levelTable, levelpackColumn, levelpackNumber, levelColumn, level.getNumber());
public void readLevelProgress(Level level) {
Cursor cursor = super.getCursor(levelTable, levelpackColumn, level.getPackId(), levelColumn, level.getId());
if (cursor.moveToFirst()) {
boolean unlocked = cursor.getInt(2) == 1;
boolean completed = cursor.getInt(3) == 1;
boolean locked = cursor.getInt(2) == 1;
boolean finished = cursor.getInt(3) == 1;
String stars = cursor.getString(4);
level.setUnlocked(unlocked);
level.setCompleted(completed);
level.setCollectedStars(stars);
boolean energy = cursor.getInt(5) == 1;
level.setLocked(locked);
level.setFinished(finished);
level.setCollectedStarsFromSQL(stars);
level.setEnergyCollected(energy);
}
cursor.close();
}
@ -84,62 +77,35 @@ public class MyDatabase extends DatabaseAdapter {
public void writeLevelPackLocked(LevelPack levelPack) {
ContentValues values = new ContentValues();
values.put(levelpackColumn.getKey(), levelPack.getWorld().getIndex());
values.put(unlockedColumn.getKey(), levelPack.isLocked() ? 0 : 1);
super.update(levelPackTable, values, levelpackColumn, levelPack.getWorld().getIndex());
values.put(levelpackColumn.getKey(), levelPack.getId());
values.put(lockedColumn.getKey(), levelPack.isLocked() ? 1 : 0);
super.update(levelPackTable, values, levelpackColumn, levelPack.getId());
}
public void readLevelPackLocked(LevelPack levelPack) {
Cursor cursor = super.getCursor(levelPackTable, levelpackColumn, levelPack.getWorld().getIndex());
Cursor cursor = super.getCursor(levelPackTable, levelpackColumn, levelPack.getId());
if (cursor.moveToFirst()) {
boolean unlocked = cursor.getInt(1) == 1;
levelPack.setLocked(!unlocked);
}else{
boolean locked = cursor.getInt(1) == 1;
levelPack.setLocked(locked);
} else {
levelPack.setLocked(true);
}
cursor.close();
}
public void writeToolSlot(int id, ToolSlot toolSlot) {
ContentValues values = new ContentValues();
values.put(idColumn.getKey(), id);
values.put(toolTypeColumn.getKey(), toolSlot.getToolType().ordinal());
values.put(lockedColumn.getKey(), toolSlot.isLocked() ? 1 : 0);
super.update(toolSlotTable, values, idColumn, id);
}
public ToolSlotSettings readToolSlotSettings() {
List<ToolSlot> list = new ArrayList<>();
Cursor cursor = super.getCursor(toolSlotTable);
if (cursor.moveToFirst()) {
do {
ToolType toolType = ToolType.values()[cursor.getInt(1)];
boolean locked = cursor.getInt(2) == 1;
list.add(new ToolSlot(toolType, locked));
}
while (cursor.moveToNext());
}
cursor.close();
GameLog.i("read toolSlotList: " + list.size());
if (list.isEmpty())
return new ToolSlotSettings();
else
return new ToolSlotSettings(list);
}
public void writeBoughtTools() {
for (ToolType tool : ToolType.values()) {
if (tool != ToolType.NONE) {
ContentValues values = new ContentValues();
values.put(idColumn.getKey(), tool.ordinal());
values.put(toolIdColumn.getKey(), tool.ordinal());
values.put(boughtColumn.getKey(), tool.isBought() ? 1 : 0);
super.update(boughtToolTable, values, idColumn, tool.ordinal());
super.update(toolTable, values, toolIdColumn, tool.ordinal());
}
}
}
public void readBoughtTools() {
Cursor cursor = super.getCursor(boughtToolTable);
Cursor cursor = super.getCursor(toolTable);
if (cursor.moveToFirst()) {
do {
int id = cursor.getInt(0);

View File

@ -3,47 +3,52 @@ package com.example.julian.endlessroll.views;
import android.content.Context;
import android.support.annotation.DrawableRes;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.main.screens.Screen;
/**
* Created by Julian on 15.07.2016.
*/
public class BountyMessage {
public class BountyMessage implements View.OnClickListener {
public interface ScreenSwitchCaller {
public void switchScreen(Screen.ScreenType screenType);
}
private LinearLayout layout;
private ImageView image;
private TextView text;
public BountyMessage(Context context, int starCount) {
this(context, R.drawable.star, starCount + "");
}
private ScreenSwitchCaller screenSwitchCaller;
private Screen.ScreenType goalScreen;
public BountyMessage(Context context, ToolType type) {
this(context, type.getButtonDrawable(), type.getName() + " unlocked");
}
public BountyMessage(Context context) {
this(context, R.drawable.tools_unlockedbutton, "Tool-Slot unlocked");
}
private BountyMessage(Context context, @DrawableRes int imageId, String text) {
public BountyMessage(Context context, @DrawableRes int drawableId, String text, ScreenSwitchCaller screenSwitchCaller, Screen.ScreenType goalScreenType) {
findViews(context);
this.image.setImageResource(imageId);
this.image.setImageResource(drawableId);
this.text.setText(text);
this.screenSwitchCaller = screenSwitchCaller;
this.goalScreen = goalScreenType;
}
private void findViews(Context context) {
LayoutInflater inflater = LayoutInflater.from(context);
layout = (LinearLayout) inflater.inflate(R.layout.unlock_message, null);
layout.setOnClickListener(this);
image = (ImageView) layout.findViewById(R.id.unlockmessage_toolimage);
text = (TextView) layout.findViewById(R.id.unlockmessage_message);
}
@Override
public void onClick(View v) {
if (goalScreen != Screen.ScreenType.NONE)
screenSwitchCaller.switchScreen(goalScreen);
}
public LinearLayout getLayout() {
return layout;
}

View File

@ -42,12 +42,12 @@ public class LevelButton extends RelativeLayout {
lockImage.setVisibility(visibility);
}
public void showCollectedStars(boolean star1, boolean star2, boolean star3) {
if(star1)
this.star1.setImageResource(R.drawable.star);
if(star2)
public void showCollectedStars(boolean[] stars) {
if (stars[0])
this.star1.setImageResource(R.drawable.star);
if (stars[1])
this.star2.setImageResource(R.drawable.star);
if(star3)
if (stars[2])
this.star3.setImageResource(R.drawable.star);
}

View File

@ -1,7 +1,7 @@
package com.example.julian.endlessroll.views;
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
@ -9,26 +9,33 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.levels.levelup.LevelUpBounties;
import com.example.julian.endlessroll.levels.levelup.LevelBounty;
import com.example.julian.endlessroll.main.GameActivity;
import com.example.julian.endlessroll.main.game.User;
import com.example.julian.endlessroll.main.screens.Screen;
/**
* Created by Julian on 15.07.2016.
*/
public class LevelupMessage implements View.OnClickListener {
public class LevelupMessage implements View.OnClickListener, BountyMessage.ScreenSwitchCaller {
private Context context;
private LevelUpBounties levelUpBounties;
private GameActivity gameActivity;
private User user;
private FrameLayout layout;
private TextView levelView;
private TextView text;
private LinearLayout unlockMessages;
public LevelupMessage(Context context, Typeface typeface, FrameLayout layout) {
this.context = context;
levelUpBounties = new LevelUpBounties();
this.layout = layout;
public LevelupMessage(GameActivity gameActivity, Typeface typeface, User user) {
this.gameActivity = gameActivity;
this.user = user;
LayoutInflater inflater = LayoutInflater.from(gameActivity);
layout = (FrameLayout) inflater.inflate(R.layout.levelup_message, null);
layout.setOnClickListener(this);
layout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
layout.setVisibility(View.GONE);
levelView = (TextView) layout.findViewById(R.id.levelup_level);
levelView.setTypeface(typeface);
text = (TextView) layout.findViewById(R.id.levelup_text);
@ -42,22 +49,34 @@ public class LevelupMessage implements View.OnClickListener {
levelView.setText(level + "");
layout.setVisibility(View.VISIBLE);
for (LevelUpBounties.Bounty bounty : levelUpBounties.get(level)) {
BountyMessage message = bounty.createMessage(context);
unlockMessages.addView(message.getLayout(), params);
}
LevelBounty bounty = user.getLevelUpBounties().get(level);
if (bounty != null)
for (BountyMessage message : bounty.createBountyMessages(gameActivity, this))
unlockMessages.addView(message.getLayout(), params);
}
private void hide() {
layout.clearAnimation();
layout.setVisibility(View.INVISIBLE);
layout.setVisibility(View.GONE);
unlockMessages.removeAllViews();
}
public FrameLayout getLayout() {
return layout;
}
@Override
public void onClick(View v) {
hide();
}
@Override
public void switchScreen(Screen.ScreenType screenType) {
if (screenType == Screen.ScreenType.TOOL_SHOP)
gameActivity.setToolshopCaller(gameActivity.getCurrentScreenType());
gameActivity.flipToScreen(screenType);
hide();
}
}

View File

@ -70,7 +70,7 @@ public class Message implements View.OnClickListener {
} else {
game.startNextLevel();
}
}else if(v.equals(tryAgainButton)){
} else if (v.equals(tryAgainButton)) {
setInvisible();
game.restartLevel();
} else if (v.equals(exitButton)) {

View File

@ -68,7 +68,7 @@ public class ToolButton {
public void update(float frameTime) {
if (progress != 100) {
progress += (frameTime)/(10*toolType.getRegenerationTime());
progress += (frameTime) / (10 * toolType.getRegenerationTime());
progress = Math.min(progress, 100);
if (progress == 100)
animationView.startAnimation(scaleAnimation);

View File

@ -10,7 +10,6 @@ import android.widget.RelativeLayout;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.entities.tools.ToolSlotSettings;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.main.GameLog;
import com.example.julian.endlessroll.main.game.Game;
import com.example.julian.endlessroll.main.game.GameState;
@ -67,19 +66,19 @@ public class ToolButtonBar implements View.OnClickListener, Animation.AnimationL
buttons.add(new ToolButton(toolSlotSettings.get(3), context, button4));
}
public void setTopPrimary(){
public void setTopPrimary() {
button1.startAnimation(fadeIn);
button2.startAnimation(fadeIn);
button3.startAnimation(fadeIn);
button4.startAnimation(fadeIn);
}
public void setBottomPrimary(){
public void setBottomPrimary() {
button1.startAnimation(fadeOut);
button2.startAnimation(fadeOut);
button3.startAnimation(fadeOut);
button4.startAnimation(fadeOut);
}
}
public void changeToolButtonTypes() {
for (int i = 0; i < 4; i++) {
@ -132,7 +131,7 @@ public class ToolButtonBar implements View.OnClickListener, Animation.AnimationL
public void onClick(View v) {
if (game.getGameState() == GameState.RUNNING) {
ToolType clickedType = ToolType.NONE;
if (v.equals(button1)&& !buttons.get(0).isLocked() && buttons.get(0).getToolType() != ToolType.NONE) {
if (v.equals(button1) && !buttons.get(0).isLocked() && buttons.get(0).getToolType() != ToolType.NONE) {
clickedType = buttons.get(0).getToolType();
} else if (v.equals(button2) && !buttons.get(1).isLocked() && buttons.get(0).getToolType() != ToolType.NONE) {
clickedType = buttons.get(1).getToolType();

View File

@ -19,7 +19,7 @@ import com.example.julian.endlessroll.main.screens.Screen;
public class TopBar extends TopBarData implements View.OnClickListener {
private Animation decreaseAnimation;
//TEST
//TEST
private Screen.ScreenType parent;
private RelativeLayout layout;
private TextView levelDisplay;
@ -62,18 +62,18 @@ public class TopBar extends TopBarData implements View.OnClickListener {
public void update() {
levelDisplay.setText("Level: " + user.getLevel());
levelProgress.setProgress(user.getLevelProgress());
levelProgress.setProgress(user.getEp());
starCount.setText(user.getStarCount() + "");
soundToggle.setChecked(soundManager.isSoundOn());
}
private void flipToToolshop(){
private void flipToToolshop() {
gameActivity.setToolshopCaller(parent);
gameActivity.flipToScreen(Screen.ScreenType.TOOL_SHOP);
}
public void showStarcountDecrease(int decrease){
starCountDecrease.setText(decrease+"");
public void showStarcountDecrease(int decrease) {
starCountDecrease.setText(decrease + "");
starCountDecrease.startAnimation(decreaseAnimation);
}
@ -88,9 +88,13 @@ public class TopBar extends TopBarData implements View.OnClickListener {
dataStorageHandler.writeUserData(user);
levelManager.reset();
dataStorageHandler.clearLevelProgess();
for(ToolType type : ToolType.values())
for (ToolType type : ToolType.values())
type.setBought(false);
dataStorageHandler.writeBoughtTools();
user.gainLvFinishedEp();
user.gainLvFinishedEp();
user.gainLvFinishedEp();
user.gainLvFinishedEp();
}
}
}

View File

@ -10,7 +10,6 @@ import android.widget.TextView;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.data.Vector;
import com.example.julian.endlessroll.main.GameHandler;
import com.example.julian.endlessroll.main.GameLog;
import com.example.julian.endlessroll.main.game.Game;
import com.example.julian.endlessroll.main.game.GameState;
import com.example.julian.endlessroll.main.game.Timer;
@ -31,10 +30,9 @@ public class ViewManager implements View.OnClickListener {
private Message message;
public ToolButtonBar toolButtonBar;
public ShortMenu shortMenu;
private LevelupMessage levelupMessage;
private Countdown countdown;
public ViewManager(final Game game, GameHandler gameViewHandler, final TopBarData topBarData) {
public ViewManager(final Game game, final GameHandler gameViewHandler, final TopBarData topBarData) {
this.game = game;
this.gameViewHandler = gameViewHandler;
@ -45,7 +43,6 @@ public class ViewManager implements View.OnClickListener {
toolButtonBar = new ToolButtonBar(game, topBarData.getUser().getToolSlotSettings(), (LinearLayout) layout.findViewById(R.id.game_toolbuttonbar));
shortMenu = new ShortMenu(game, topBarData, (FrameLayout) layout.findViewById(R.id.game_shortmenu));
message = new Message(game, topBarData.getTypeface(), (RelativeLayout) layout.findViewById(R.id.game_message));
levelupMessage = new LevelupMessage(game.getContext(), topBarData.getTypeface(), (FrameLayout) layout.findViewById(R.id.game_levelup));
countdown = new Countdown(game, topBarData.getTypeface(), (TextView) layout.findViewById(R.id.game_countdown));
}
});
@ -66,8 +63,8 @@ public class ViewManager implements View.OnClickListener {
@Override
public void onClick(View v) {
if(game.getGameState() == GameState.RUNNING)
game.pause();
if (game.getGameState() == GameState.RUNNING)
game.pause();
}
public void resetViews() {
@ -82,15 +79,6 @@ public class ViewManager implements View.OnClickListener {
});
}
public void showLevelUp(final int level) {
gameViewHandler.startInUiThread(new Runnable() {
@Override
public void run() {
levelupMessage.show(level);
}
});
}
public void showMessage(final boolean wasLastLevel, final MessageType messageType) {
gameViewHandler.startInUiThread(new Runnable() {
@Override
@ -110,11 +98,11 @@ public class ViewManager implements View.OnClickListener {
shortMenu.setVisible(false);
}
public void startCountdown(){
public void startCountdown() {
countdown.start();
}
public void stopCountdown(){
public void stopCountdown() {
countdown.stop();
}
@ -132,7 +120,7 @@ public class ViewManager implements View.OnClickListener {
});
}
private float toMeters(float value){
private float toMeters(float value) {
return ((int) (value * 20)) / 10f;
}

View File

@ -10,7 +10,7 @@ import android.widget.TextView;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.levels.LevelPack;
import com.example.julian.endlessroll.levels.worlds.World;
import com.example.julian.endlessroll.levels.worlds.Theme;
/**
* Created by Julian on 01.08.2016.
@ -18,7 +18,7 @@ import com.example.julian.endlessroll.levels.worlds.World;
public class WorldButton extends RelativeLayout {
private LevelPack levelPack;
private World world;
private Theme theme;
private TextView title;
private ImageView previewImage;
@ -29,7 +29,7 @@ public class WorldButton extends RelativeLayout {
public WorldButton(Context context, Typeface typeface, View.OnClickListener clickListener, LevelPack levelPack) {
super(context);
this.levelPack = levelPack;
this.world = levelPack.getWorld();
this.theme = levelPack.getTheme();
LayoutInflater inflater = LayoutInflater.from(context);
inflater.inflate(R.layout.world_button, this);
@ -48,10 +48,10 @@ public class WorldButton extends RelativeLayout {
}
public void updateInformation() {
title.setText(world.getName());
previewImage.setImageDrawable(getContext().getResources().getDrawable(world.getPreviewId()));
levelCount.setText(levelPack.getUnlockedLevels() + "/" + levelPack.getLevels().size());
starCount.setText(levelPack.getCollectedStars() + "/" + levelPack.getAvailableStars());
title.setText(levelPack.getName());
previewImage.setImageDrawable(getContext().getResources().getDrawable(theme.getPreviewId()));
levelCount.setText(levelPack.getFinishedLevelCount() + "/" + levelPack.getLevels().size());
starCount.setText(levelPack.getCollectedStarCount() + "/" + levelPack.getAvailableStars());
setLockVisible(levelPack.isLocked());
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -73,15 +73,6 @@
android:layout_centerVertical="true"
android:visibility="invisible"/>
<include
android:id="@+id/game_levelup"
android:layout_width="match_parent"
android:layout_height="match_parent"
layout="@layout/levelup_message"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:visibility="invisible"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -1,41 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/startscreen_play"
android:layout_width="110dp"
android:layout_height="110dp"
android:text="Play"
android:background="@drawable/playershapes_ball"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="44dp"
android:textSize="25sp" />
<Button
android:id="@+id/startscreen_comingsoon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Coming Soon"
style="@style/customButton"
android:layout_alignBottom="@+id/startscreen_sound"
android:layout_toLeftOf="@+id/startscreen_play"
android:layout_toStartOf="@+id/startscreen_play" />
android:layout_height="match_parent">
<ToggleButton
android:id="@+id/startscreen_sound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/xml_sound_toggle"
android:textOff=""
android:textOn=""
android:layout_below="@+id/startscreen_play"
android:layout_toRightOf="@+id/startscreen_play"
android:layout_marginTop="26dp"
android:layout_toEndOf="@+id/startscreen_play"
android:layout_marginTop="26dp" />
android:layout_toRightOf="@+id/startscreen_play"
android:background="@drawable/xml_sound_toggle"
android:textOff=""
android:textOn="" />
<Button
android:id="@+id/startscreen_play"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_marginTop="40dp"
android:background="@drawable/playershapes_ball"
android:text="Play"
android:textSize="25sp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<Button
android:id="@+id/startscreen_comingsoon"
style="@style/customButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Level Up"
android:layout_alignTop="@+id/startscreen_play"
android:layout_toRightOf="@+id/startscreen_sound"
android:layout_toEndOf="@+id/startscreen_sound" />
<Button
android:id="@+id/startscreen_maxcheat"
style="@style/customButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lv to 100"
android:layout_below="@+id/startscreen_play"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="48dp"
android:layout_marginStart="48dp" />
</RelativeLayout>

View File

@ -66,14 +66,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
@ -82,6 +74,14 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />