Shapes can now be recieved through fulfilling tasks

This commit is contained in:
= 2017-10-30 16:54:05 +01:00
parent c9e718f6ad
commit 44d7665442
24 changed files with 694 additions and 312 deletions

View File

@ -456,7 +456,7 @@ public final class R {
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f070042; public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f070042;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f070043; public static final int abc_textfield_search_default_mtrl_alpha = 0x7f070043;
public static final int abc_textfield_search_material = 0x7f070044; public static final int abc_textfield_search_material = 0x7f070044;
public static final int notification_template_icon_bg = 0x7f070062; public static final int notification_template_icon_bg = 0x7f070064;
} }
public static final class id { public static final class id {
public static final int action0 = 0x7f080000; public static final int action0 = 0x7f080000;
@ -529,29 +529,29 @@ public final class R {
public static final int search_src_text = 0x7f080066; public static final int search_src_text = 0x7f080066;
public static final int search_voice_btn = 0x7f080067; public static final int search_voice_btn = 0x7f080067;
public static final int select_dialog_listview = 0x7f080068; public static final int select_dialog_listview = 0x7f080068;
public static final int shortcut = 0x7f080072; public static final int shortcut = 0x7f080078;
public static final int showCustom = 0x7f080077; public static final int showCustom = 0x7f08007d;
public static final int showHome = 0x7f080078; public static final int showHome = 0x7f08007e;
public static final int showTitle = 0x7f080079; public static final int showTitle = 0x7f08007f;
public static final int spacer = 0x7f08007a; public static final int spacer = 0x7f080080;
public static final int split_action_bar = 0x7f08007b; public static final int split_action_bar = 0x7f080081;
public static final int src_atop = 0x7f08007c; public static final int src_atop = 0x7f080082;
public static final int src_in = 0x7f08007d; public static final int src_in = 0x7f080083;
public static final int src_over = 0x7f08007e; public static final int src_over = 0x7f080084;
public static final int status_bar_latest_event_content = 0x7f080084; public static final int status_bar_latest_event_content = 0x7f08008a;
public static final int submit_area = 0x7f080085; public static final int submit_area = 0x7f08008b;
public static final int tabMode = 0x7f080086; public static final int tabMode = 0x7f08008c;
public static final int text = 0x7f080087; public static final int text = 0x7f08008d;
public static final int text2 = 0x7f080088; public static final int text2 = 0x7f08008e;
public static final int textSpacerNoButtons = 0x7f080089; public static final int textSpacerNoButtons = 0x7f08008f;
public static final int time = 0x7f08008a; public static final int time = 0x7f080090;
public static final int title = 0x7f08008b; public static final int title = 0x7f080091;
public static final int title_template = 0x7f08008c; public static final int title_template = 0x7f080092;
public static final int topPanel = 0x7f0800a9; public static final int topPanel = 0x7f0800af;
public static final int up = 0x7f0800bb; public static final int up = 0x7f0800c1;
public static final int useLogo = 0x7f0800bc; public static final int useLogo = 0x7f0800c2;
public static final int withText = 0x7f0800bd; public static final int withText = 0x7f0800c3;
public static final int wrap_content = 0x7f0800c7; public static final int wrap_content = 0x7f0800cd;
} }
public static final class integer { public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f090000; public static final int abc_config_activityDefaultDur = 0x7f090000;
@ -597,7 +597,7 @@ public final class R {
public static final int select_dialog_item_material = 0x7f0a0029; public static final int select_dialog_item_material = 0x7f0a0029;
public static final int select_dialog_multichoice_material = 0x7f0a002a; public static final int select_dialog_multichoice_material = 0x7f0a002a;
public static final int select_dialog_singlechoice_material = 0x7f0a002b; public static final int select_dialog_singlechoice_material = 0x7f0a002b;
public static final int support_simple_spinner_dropdown_item = 0x7f0a0032; public static final int support_simple_spinner_dropdown_item = 0x7f0a0033;
} }
public static final class string { public static final class string {
public static final int abc_action_bar_home_description = 0x7f0d0000; public static final int abc_action_bar_home_description = 0x7f0d0000;
@ -619,7 +619,7 @@ public final class R {
public static final int abc_shareactionprovider_share_with = 0x7f0d0010; public static final int abc_shareactionprovider_share_with = 0x7f0d0010;
public static final int abc_shareactionprovider_share_with_application = 0x7f0d0011; public static final int abc_shareactionprovider_share_with_application = 0x7f0d0011;
public static final int abc_toolbar_collapse_description = 0x7f0d0012; public static final int abc_toolbar_collapse_description = 0x7f0d0012;
public static final int status_bar_notification_info_overflow = 0x7f0d003d; public static final int status_bar_notification_info_overflow = 0x7f0d0046;
} }
public static final class style { public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0e0000; public static final int AlertDialog_AppCompat = 0x7f0e0000;

View File

@ -370,13 +370,13 @@
<tileData x="13.151686" width="32.30337"/> <tileData x="13.151686" width="32.30337"/>
</ceilingTiles> </ceilingTiles>
<obstacles class="java.util.ArrayList"> <obstacles class="java.util.ArrayList">
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.7331653" rightEdge="3.1601653" height="0.357" y="-0.006666664"> <obstacleData floating="true" moving="false" deadly="false" leftEdge="1.7464986" rightEdge="3.1734986" height="0.357" y="0.013333336">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/> <moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData> </obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.2206645" rightEdge="4.672664" height="0.395" y="-0.06666667"> <obstacleData floating="true" moving="false" deadly="false" leftEdge="3.2206645" rightEdge="4.672664" height="0.395" y="-0.02">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/> <moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData> </obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.7519975" rightEdge="5.847997" height="0.408" y="-0.13333336"> <obstacleData floating="true" moving="false" deadly="false" leftEdge="4.718664" rightEdge="5.814664" height="0.408" y="-0.04666668">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/> <moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData> </obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="7.4900084" rightEdge="7.9900084" height="0.777" y="-0.21150002"> <obstacleData floating="false" moving="false" deadly="false" leftEdge="7.4900084" rightEdge="7.9900084" height="0.777" y="-0.21150002">

File diff suppressed because one or more lines are too long

View File

@ -482,72 +482,76 @@ int drawable currency_energy_empty 0x7f07004d
int drawable currency_star 0x7f07004e int drawable currency_star 0x7f07004e
int drawable currency_star_empty 0x7f07004f int drawable currency_star_empty 0x7f07004f
int drawable guis_arrow_green 0x7f070050 int drawable guis_arrow_green 0x7f070050
int drawable guis_clock 0x7f070051 int drawable guis_checkbox_checked 0x7f070051
int drawable guis_goal 0x7f070052 int drawable guis_checkbox_unchecked 0x7f070052
int drawable guis_lock_locked 0x7f070053 int drawable guis_clock 0x7f070053
int drawable guis_magnet_field 0x7f070054 int drawable guis_goal 0x7f070054
int drawable guis_pausebutton 0x7f070055 int drawable guis_lock_locked 0x7f070055
int drawable guis_playerarrow 0x7f070056 int drawable guis_magnet_field 0x7f070056
int drawable guis_radius 0x7f070057 int drawable guis_pausebutton 0x7f070057
int drawable guis_settings_disabled 0x7f070058 int drawable guis_playerarrow 0x7f070058
int drawable guis_settings_enabled 0x7f070059 int drawable guis_radius 0x7f070059
int drawable guis_shape_shop_disabled 0x7f07005a int drawable guis_settings_disabled 0x7f07005a
int drawable guis_shape_shop_enabled 0x7f07005b int drawable guis_settings_enabled 0x7f07005b
int drawable guis_sound_off 0x7f07005c int drawable guis_shape_shop_disabled 0x7f07005c
int drawable guis_sound_on 0x7f07005d int drawable guis_shape_shop_enabled 0x7f07005d
int drawable guis_splitter 0x7f07005e int drawable guis_sound_off 0x7f07005e
int drawable guis_tick 0x7f07005f int drawable guis_sound_on 0x7f07005f
int drawable guis_tool_shop_disabled 0x7f070060 int drawable guis_splitter 0x7f070060
int drawable guis_tool_shop_enabled 0x7f070061 int drawable guis_tick 0x7f070061
int drawable notification_template_icon_bg 0x7f070062 int drawable guis_tool_shop_disabled 0x7f070062
int drawable obstacles_grass 0x7f070063 int drawable guis_tool_shop_enabled 0x7f070063
int drawable playershapes_ball 0x7f070064 int drawable notification_template_icon_bg 0x7f070064
int drawable playershapes_clock 0x7f070065 int drawable obstacles_grass 0x7f070065
int drawable playershapes_hypno_spiral 0x7f070066 int drawable playershapes_ball 0x7f070066
int drawable playershapes_pacman 0x7f070067 int drawable playershapes_clock 0x7f070067
int drawable playershapes_smiley 0x7f070068 int drawable playershapes_hypno_spiral 0x7f070068
int drawable playershapes_sun 0x7f070069 int drawable playershapes_locked 0x7f070069
int drawable playershapes_wheel 0x7f07006a int drawable playershapes_pacman 0x7f07006a
int drawable terrain_c_grass 0x7f07006b int drawable playershapes_smiley 0x7f07006b
int drawable terrain_t_grass 0x7f07006c int drawable playershapes_sun 0x7f07006c
int drawable tools_bomb 0x7f07006d int drawable playershapes_wheel 0x7f07006d
int drawable tools_bomb_button 0x7f07006e int drawable terrain_c_grass 0x7f07006e
int drawable tools_button_empty 0x7f07006f int drawable terrain_t_grass 0x7f07006f
int drawable tools_button_locked 0x7f070070 int drawable tools_bomb 0x7f070070
int drawable tools_button_unlocked 0x7f070071 int drawable tools_bomb_button 0x7f070071
int drawable tools_magnet 0x7f070072 int drawable tools_button_empty 0x7f070072
int drawable tools_magnet_button 0x7f070073 int drawable tools_button_locked 0x7f070073
int drawable tools_power_mushroom 0x7f070074 int drawable tools_button_unlocked 0x7f070074
int drawable tools_power_mushroom_button 0x7f070075 int drawable tools_magnet 0x7f070075
int drawable tools_ramp 0x7f070076 int drawable tools_magnet_button 0x7f070076
int drawable tools_ramp_button 0x7f070077 int drawable tools_power_mushroom 0x7f070077
int drawable tools_spring 0x7f070078 int drawable tools_power_mushroom_button 0x7f070078
int drawable tools_spring_button 0x7f070079 int drawable tools_ramp 0x7f070079
int drawable tutorial_place_ramp_air_1 0x7f07007a int drawable tools_ramp_button 0x7f07007a
int drawable tutorial_place_ramp_gap 0x7f07007b int drawable tools_spring 0x7f07007b
int drawable tutorial_place_ramp_obstacle 0x7f07007c int drawable tools_spring_button 0x7f07007c
int drawable tutorial_place_tools 0x7f07007d int drawable tutorial_place_ramp_air_1 0x7f07007d
int drawable tutorial_to_toolshop 0x7f07007e int drawable tutorial_place_ramp_gap 0x7f07007e
int drawable tutorial_toolbar 0x7f07007f int drawable tutorial_place_ramp_obstacle 0x7f07007f
int drawable tutorial_toolshop_all_tools 0x7f070080 int drawable tutorial_place_tools 0x7f070080
int drawable tutorial_toolshop_equip_spring 0x7f070081 int drawable tutorial_to_toolshop 0x7f070081
int drawable tutorial_toolshop_inspector 0x7f070082 int drawable tutorial_toolbar 0x7f070082
int drawable tutorial_toolshop_select_buy_spring 0x7f070083 int drawable tutorial_toolshop_all_tools 0x7f070083
int drawable tutorial_toolshop_toolbar 0x7f070084 int drawable tutorial_toolshop_equip_spring 0x7f070084
int drawable world_previews_grass 0x7f070085 int drawable tutorial_toolshop_inspector 0x7f070085
int drawable xml_background_bountymessage 0x7f070086 int drawable tutorial_toolshop_select_buy_spring 0x7f070086
int drawable xml_background_levelbutton 0x7f070087 int drawable tutorial_toolshop_toolbar 0x7f070087
int drawable xml_background_toolslot 0x7f070088 int drawable world_previews_grass 0x7f070088
int drawable xml_background_toolupgrade 0x7f070089 int drawable xml_background_bountymessage 0x7f070089
int drawable xml_background_tutorialtextview 0x7f07008a int drawable xml_background_levelbutton 0x7f07008a
int drawable xml_background_worldbutton 0x7f07008b int drawable xml_background_toolslot 0x7f07008b
int drawable xml_layers_toolprogressbar 0x7f07008c int drawable xml_background_toolupgrade 0x7f07008c
int drawable xml_selector_gamebutton 0x7f07008d int drawable xml_background_tutorialtextview 0x7f07008d
int drawable xml_selector_pricebutton 0x7f07008e int drawable xml_background_worldbutton 0x7f07008e
int drawable xml_selector_settingsbutton 0x7f07008f int drawable xml_layers_toolprogressbar 0x7f07008f
int drawable xml_selector_shapeshopbutton 0x7f070090 int drawable xml_selector_gamebutton 0x7f070090
int drawable xml_selector_sound 0x7f070091 int drawable xml_selector_pricebutton 0x7f070091
int drawable xml_selector_toolshopbutton 0x7f070092 int drawable xml_selector_settingsbutton 0x7f070092
int drawable xml_selector_shapeshopbutton 0x7f070093
int drawable xml_selector_sound 0x7f070094
int drawable xml_selector_toolshopbutton 0x7f070095
int drawable xml_shape_inspector_checkbox 0x7f070096
int id action0 0x7f080000 int id action0 0x7f080000
int id action_bar 0x7f080001 int id action_bar 0x7f080001
int id action_bar_activity_content 0x7f080002 int id action_bar_activity_content 0x7f080002
@ -658,96 +662,102 @@ int id settings_soundtoggle 0x7f08006a
int id settings_topbar 0x7f08006b int id settings_topbar 0x7f08006b
int id shape_button_button 0x7f08006c int id shape_button_button 0x7f08006c
int id shape_button_textview 0x7f08006d int id shape_button_textview 0x7f08006d
int id shape_shop_bottomRow 0x7f08006e int id shape_inspector_check_box 0x7f08006e
int id shape_shop_shape_inspector 0x7f08006f int id shape_inspector_check_box_image 0x7f08006f
int id shape_shop_topRow 0x7f080070 int id shape_inspector_check_box_text 0x7f080070
int id shape_shop_topbar 0x7f080071 int id shape_inspector_description 0x7f080071
int id shortcut 0x7f080072 int id shape_inspector_imageview 0x7f080072
int id shortmenu_continue 0x7f080073 int id shape_inspector_title 0x7f080073
int id shortmenu_exit 0x7f080074 int id shape_shop_bottomRow 0x7f080074
int id shortmenu_restart 0x7f080075 int id shape_shop_shape_inspector 0x7f080075
int id shortmenu_topbar 0x7f080076 int id shape_shop_topRow 0x7f080076
int id showCustom 0x7f080077 int id shape_shop_topbar 0x7f080077
int id showHome 0x7f080078 int id shortcut 0x7f080078
int id showTitle 0x7f080079 int id shortmenu_continue 0x7f080079
int id spacer 0x7f08007a int id shortmenu_exit 0x7f08007a
int id split_action_bar 0x7f08007b int id shortmenu_restart 0x7f08007b
int id src_atop 0x7f08007c int id shortmenu_topbar 0x7f08007c
int id src_in 0x7f08007d int id showCustom 0x7f08007d
int id src_over 0x7f08007e int id showHome 0x7f08007e
int id startscreen_gain_90_ep 0x7f08007f int id showTitle 0x7f08007f
int id startscreen_play 0x7f080080 int id spacer 0x7f080080
int id startscreen_settings 0x7f080081 int id split_action_bar 0x7f080081
int id startscreen_to_gl_test_screen 0x7f080082 int id src_atop 0x7f080082
int id startscreen_unlock_levels 0x7f080083 int id src_in 0x7f080083
int id status_bar_latest_event_content 0x7f080084 int id src_over 0x7f080084
int id submit_area 0x7f080085 int id startscreen_gain_90_ep 0x7f080085
int id tabMode 0x7f080086 int id startscreen_play 0x7f080086
int id text 0x7f080087 int id startscreen_settings 0x7f080087
int id text2 0x7f080088 int id startscreen_to_gl_test_screen 0x7f080088
int id textSpacerNoButtons 0x7f080089 int id startscreen_unlock_levels 0x7f080089
int id time 0x7f08008a int id status_bar_latest_event_content 0x7f08008a
int id title 0x7f08008b int id submit_area 0x7f08008b
int id title_template 0x7f08008c int id tabMode 0x7f08008c
int id tool_button_animation_layer 0x7f08008d int id text 0x7f08008d
int id tool_button_background_layer 0x7f08008e int id text2 0x7f08008e
int id tool_button_progress_bar 0x7f08008f int id textSpacerNoButtons 0x7f08008f
int id tool_inspector_description 0x7f080090 int id time 0x7f080090
int id tool_inspector_imageview 0x7f080091 int id title 0x7f080091
int id tool_inspector_level_view 0x7f080092 int id title_template 0x7f080092
int id tool_inspector_pricebutton 0x7f080093 int id tool_button_animation_layer 0x7f080093
int id tool_inspector_title 0x7f080094 int id tool_button_background_layer 0x7f080094
int id tool_upgrade_imageview 0x7f080095 int id tool_button_progress_bar 0x7f080095
int id tool_upgrade_pricebutton 0x7f080096 int id tool_inspector_description 0x7f080096
int id tool_upgrade_title 0x7f080097 int id tool_inspector_imageview 0x7f080097
int id tool_upgrade_value_new 0x7f080098 int id tool_inspector_level_view 0x7f080098
int id tool_upgrade_value_old 0x7f080099 int id tool_inspector_pricebutton 0x7f080099
int id toolbutton_1 0x7f08009a int id tool_inspector_title 0x7f08009a
int id toolbutton_2 0x7f08009b int id tool_upgrade_imageview 0x7f08009b
int id toolbutton_3 0x7f08009c int id tool_upgrade_pricebutton 0x7f08009c
int id toolbutton_4 0x7f08009d int id tool_upgrade_title 0x7f08009d
int id toolofferslot_slot 0x7f08009e int id tool_upgrade_value_new 0x7f08009e
int id toolofferslot_title 0x7f08009f int id tool_upgrade_value_old 0x7f08009f
int id toolshop_slot1 0x7f0800a0 int id toolbutton_1 0x7f0800a0
int id toolshop_slot2 0x7f0800a1 int id toolbutton_2 0x7f0800a1
int id toolshop_slot3 0x7f0800a2 int id toolbutton_3 0x7f0800a2
int id toolshop_slot4 0x7f0800a3 int id toolbutton_4 0x7f0800a3
int id toolshop_tool_offer_bottom_row 0x7f0800a4 int id toolofferslot_slot 0x7f0800a4
int id toolshop_tool_offer_top_row 0x7f0800a5 int id toolofferslot_title 0x7f0800a5
int id toolshop_toolinspector 0x7f0800a6 int id toolshop_slot1 0x7f0800a6
int id toolshop_topbar 0x7f0800a7 int id toolshop_slot2 0x7f0800a7
int id toolslot_image 0x7f0800a8 int id toolshop_slot3 0x7f0800a8
int id topPanel 0x7f0800a9 int id toolshop_slot4 0x7f0800a9
int id topbar_energycount 0x7f0800aa int id toolshop_tool_offer_bottom_row 0x7f0800aa
int id topbar_energycount_decrease 0x7f0800ab int id toolshop_tool_offer_top_row 0x7f0800ab
int id topbar_energyview 0x7f0800ac int id toolshop_toolinspector 0x7f0800ac
int id topbar_layout 0x7f0800ad int id toolshop_topbar 0x7f0800ad
int id topbar_leveldisplay 0x7f0800ae int id toolslot_image 0x7f0800ae
int id topbar_levellayout 0x7f0800af int id topPanel 0x7f0800af
int id topbar_levelprogress 0x7f0800b0 int id topbar_energycount 0x7f0800b0
int id topbar_settings 0x7f0800b1 int id topbar_energycount_decrease 0x7f0800b1
int id topbar_shapeshop 0x7f0800b2 int id topbar_energyview 0x7f0800b2
int id topbar_starcount 0x7f0800b3 int id topbar_layout 0x7f0800b3
int id topbar_starcount_decrease 0x7f0800b4 int id topbar_leveldisplay 0x7f0800b4
int id topbar_starview 0x7f0800b5 int id topbar_levellayout 0x7f0800b5
int id topbar_toolshop 0x7f0800b6 int id topbar_levelprogress 0x7f0800b6
int id tutorial_image_view 0x7f0800b7 int id topbar_settings 0x7f0800b7
int id tutorial_text_view 0x7f0800b8 int id topbar_shapeshop 0x7f0800b8
int id unlockmessage_message 0x7f0800b9 int id topbar_starcount 0x7f0800b9
int id unlockmessage_toolimage 0x7f0800ba int id topbar_starcount_decrease 0x7f0800ba
int id up 0x7f0800bb int id topbar_starview 0x7f0800bb
int id useLogo 0x7f0800bc int id topbar_toolshop 0x7f0800bc
int id withText 0x7f0800bd int id tutorial_image_view 0x7f0800bd
int id worldbutton_energycount 0x7f0800be int id tutorial_text_view 0x7f0800be
int id worldbutton_levelcount 0x7f0800bf int id unlockmessage_message 0x7f0800bf
int id worldbutton_lock 0x7f0800c0 int id unlockmessage_toolimage 0x7f0800c0
int id worldbutton_preview 0x7f0800c1 int id up 0x7f0800c1
int id worldbutton_starcount 0x7f0800c2 int id useLogo 0x7f0800c2
int id worldbutton_tickView 0x7f0800c3 int id withText 0x7f0800c3
int id worldbutton_title 0x7f0800c4 int id worldbutton_energycount 0x7f0800c4
int id worlds_layout 0x7f0800c5 int id worldbutton_levelcount 0x7f0800c5
int id worlds_topbar 0x7f0800c6 int id worldbutton_lock 0x7f0800c6
int id wrap_content 0x7f0800c7 int id worldbutton_preview 0x7f0800c7
int id worldbutton_starcount 0x7f0800c8
int id worldbutton_tickView 0x7f0800c9
int id worldbutton_title 0x7f0800ca
int id worlds_layout 0x7f0800cb
int id worlds_topbar 0x7f0800cc
int id wrap_content 0x7f0800cd
int integer abc_config_activityDefaultDur 0x7f090000 int integer abc_config_activityDefaultDur 0x7f090000
int integer abc_config_activityShortDur 0x7f090001 int integer abc_config_activityShortDur 0x7f090001
int integer abc_max_action_buttons 0x7f090002 int integer abc_max_action_buttons 0x7f090002
@ -800,22 +810,23 @@ int layout select_dialog_singlechoice_material 0x7f0a002b
int layout settings 0x7f0a002c int layout settings 0x7f0a002c
int layout shape_button 0x7f0a002d int layout shape_button 0x7f0a002d
int layout shape_inspector 0x7f0a002e int layout shape_inspector 0x7f0a002e
int layout shape_shop 0x7f0a002f int layout shape_inspector_check_box 0x7f0a002f
int layout short_menu 0x7f0a0030 int layout shape_shop 0x7f0a0030
int layout start_screen 0x7f0a0031 int layout short_menu 0x7f0a0031
int layout support_simple_spinner_dropdown_item 0x7f0a0032 int layout start_screen 0x7f0a0032
int layout tool_inspector 0x7f0a0033 int layout support_simple_spinner_dropdown_item 0x7f0a0033
int layout tool_offer_slot 0x7f0a0034 int layout tool_inspector 0x7f0a0034
int layout tool_slot 0x7f0a0035 int layout tool_offer_slot 0x7f0a0035
int layout tool_upgrade 0x7f0a0036 int layout tool_slot 0x7f0a0036
int layout toolbutton 0x7f0a0037 int layout tool_upgrade 0x7f0a0037
int layout toolbuttonbar 0x7f0a0038 int layout toolbutton 0x7f0a0038
int layout toolshop 0x7f0a0039 int layout toolbuttonbar 0x7f0a0039
int layout topbar 0x7f0a003a int layout toolshop 0x7f0a003a
int layout tutorial 0x7f0a003b int layout topbar 0x7f0a003b
int layout unlock_message 0x7f0a003c int layout tutorial 0x7f0a003c
int layout world_button 0x7f0a003d int layout unlock_message 0x7f0a003d
int layout worlds 0x7f0a003e int layout world_button 0x7f0a003e
int layout worlds 0x7f0a003f
int mipmap ic_launcher 0x7f0b0000 int mipmap ic_launcher 0x7f0b0000
int raw background 0x7f0c0000 int raw background 0x7f0c0000
int raw ramp 0x7f0c0001 int raw ramp 0x7f0c0001
@ -862,67 +873,82 @@ int string placeholder_button 0x7f0d0027
int string placeholder_number 0x7f0d0028 int string placeholder_number 0x7f0d0028
int string placeholder_percent 0x7f0d0029 int string placeholder_percent 0x7f0d0029
int string placeholder_textview 0x7f0d002a int string placeholder_textview 0x7f0d002a
int string playershape_name_ball 0x7f0d002b int string playershape_description_ball 0x7f0d002b
int string playershape_name_clock 0x7f0d002c int string playershape_description_clock 0x7f0d002c
int string playershape_name_hypno_spiral 0x7f0d002d int string playershape_description_hypno_spiral 0x7f0d002d
int string playershape_name_pacman 0x7f0d002e int string playershape_description_locked 0x7f0d002e
int string playershape_name_smiley 0x7f0d002f int string playershape_description_pacman 0x7f0d002f
int string playershape_name_sun 0x7f0d0030 int string playershape_description_smiley 0x7f0d0030
int string playershape_name_wheel 0x7f0d0031 int string playershape_description_sun 0x7f0d0031
int string pre_start_screen_loading 0x7f0d0032 int string playershape_description_wheel 0x7f0d0032
int string price_button_buy 0x7f0d0033 int string playershape_name_ball 0x7f0d0033
int string price_button_upgrade 0x7f0d0034 int string playershape_name_clock 0x7f0d0034
int string settings_reset 0x7f0d0035 int string playershape_name_hypno_spiral 0x7f0d0035
int string short_menu_continue 0x7f0d0036 int string playershape_name_locked 0x7f0d0036
int string short_menu_exit 0x7f0d0037 int string playershape_name_pacman 0x7f0d0037
int string short_menu_restart 0x7f0d0038 int string playershape_name_smiley 0x7f0d0038
int string start_screen_gain_90_ep 0x7f0d0039 int string playershape_name_sun 0x7f0d0039
int string start_screen_play 0x7f0d003a int string playershape_name_wheel 0x7f0d003a
int string start_screen_to_gl_test_screen 0x7f0d003b int string pre_start_screen_loading 0x7f0d003b
int string start_screen_unlock_all_levels 0x7f0d003c int string price_button_buy 0x7f0d003c
int string status_bar_notification_info_overflow 0x7f0d003d int string price_button_upgrade 0x7f0d003d
int string tool_description_bomb 0x7f0d003e int string settings_reset 0x7f0d003e
int string tool_description_locked_format_d 0x7f0d003f int string short_menu_continue 0x7f0d003f
int string tool_description_magnet 0x7f0d0040 int string short_menu_exit 0x7f0d0040
int string tool_description_power_mushroom 0x7f0d0041 int string short_menu_restart 0x7f0d0041
int string tool_description_ramp 0x7f0d0042 int string start_screen_gain_90_ep 0x7f0d0042
int string tool_description_spring 0x7f0d0043 int string start_screen_play 0x7f0d0043
int string tool_level_format_d 0x7f0d0044 int string start_screen_to_gl_test_screen 0x7f0d0044
int string tool_name_bomb 0x7f0d0045 int string start_screen_unlock_all_levels 0x7f0d0045
int string tool_name_locked 0x7f0d0046 int string status_bar_notification_info_overflow 0x7f0d0046
int string tool_name_magnet 0x7f0d0047 int string task_collect_energy_format_d 0x7f0d0047
int string tool_name_power_mushroom 0x7f0d0048 int string task_collect_energy_progress_format_ddd 0x7f0d0048
int string tool_name_ramp 0x7f0d0049 int string task_collect_stars_format_d 0x7f0d0049
int string tool_name_spring 0x7f0d004a int string task_collect_stars_progress_format_ddd 0x7f0d004a
int string tool_upgrade_force 0x7f0d004b int string task_complete_world_format_d 0x7f0d004b
int string tool_upgrade_none 0x7f0d004c int string task_empty 0x7f0d004c
int string tool_upgrade_radius 0x7f0d004d int string tool_description_bomb 0x7f0d004d
int string tool_upgrade_time 0x7f0d004e int string tool_description_locked_format_d 0x7f0d004e
int string tool_upgrade_title_format_sd 0x7f0d004f int string tool_description_magnet 0x7f0d004f
int string tool_upgrade_title_placeholder 0x7f0d0050 int string tool_description_power_mushroom 0x7f0d0050
int string tool_upgrade_value_max 0x7f0d0051 int string tool_description_ramp 0x7f0d0051
int string topbar_level_format_d 0x7f0d0052 int string tool_description_spring 0x7f0d0052
int string topbar_level_placeholder 0x7f0d0053 int string tool_level_format_d 0x7f0d0053
int string topbar_toolshop 0x7f0d0054 int string tool_name_bomb 0x7f0d0054
int string tutorial_leveled_up 0x7f0d0055 int string tool_name_locked 0x7f0d0055
int string tutorial_place_ramp_air 0x7f0d0056 int string tool_name_magnet 0x7f0d0056
int string tutorial_place_ramp_air_2 0x7f0d0057 int string tool_name_power_mushroom 0x7f0d0057
int string tutorial_place_ramp_gap 0x7f0d0058 int string tool_name_ramp 0x7f0d0058
int string tutorial_place_ramp_obstacle 0x7f0d0059 int string tool_name_spring 0x7f0d0059
int string tutorial_place_tools 0x7f0d005a int string tool_upgrade_force 0x7f0d005a
int string tutorial_placeholder 0x7f0d005b int string tool_upgrade_none 0x7f0d005b
int string tutorial_to_toolshop 0x7f0d005c int string tool_upgrade_radius 0x7f0d005c
int string tutorial_toolbar 0x7f0d005d int string tool_upgrade_time 0x7f0d005d
int string tutorial_toolshop_all_tools 0x7f0d005e int string tool_upgrade_title_format_sd 0x7f0d005e
int string tutorial_toolshop_equip_spring 0x7f0d005f int string tool_upgrade_title_placeholder 0x7f0d005f
int string tutorial_toolshop_inspector 0x7f0d0060 int string tool_upgrade_value_max 0x7f0d0060
int string tutorial_toolshop_select_buy_spring 0x7f0d0061 int string topbar_level_format_d 0x7f0d0061
int string tutorial_toolshop_toolbar 0x7f0d0062 int string topbar_level_placeholder 0x7f0d0062
int string tutorial_toolshop_welcome 0x7f0d0063 int string topbar_toolshop 0x7f0d0063
int string tutorial_welcome 0x7f0d0064 int string tutorial_leveled_up 0x7f0d0064
int string unlock_message_placeholder 0x7f0d0065 int string tutorial_place_ramp_air 0x7f0d0065
int string world_button_progress_placeholder 0x7f0d0066 int string tutorial_place_ramp_air_2 0x7f0d0066
int string world_button_title_placeholder 0x7f0d0067 int string tutorial_place_ramp_gap 0x7f0d0067
int string tutorial_place_ramp_obstacle 0x7f0d0068
int string tutorial_place_tools 0x7f0d0069
int string tutorial_placeholder 0x7f0d006a
int string tutorial_to_toolshop 0x7f0d006b
int string tutorial_toolbar 0x7f0d006c
int string tutorial_toolshop_all_tools 0x7f0d006d
int string tutorial_toolshop_equip_spring 0x7f0d006e
int string tutorial_toolshop_inspector 0x7f0d006f
int string tutorial_toolshop_select_buy_spring 0x7f0d0070
int string tutorial_toolshop_toolbar 0x7f0d0071
int string tutorial_toolshop_welcome 0x7f0d0072
int string tutorial_welcome 0x7f0d0073
int string unlock_message_placeholder 0x7f0d0074
int string world_button_progress_placeholder 0x7f0d0075
int string world_button_title_placeholder 0x7f0d0076
int style AlertDialog_AppCompat 0x7f0e0000 int style AlertDialog_AppCompat 0x7f0e0000
int style AlertDialog_AppCompat_Light 0x7f0e0001 int style AlertDialog_AppCompat_Light 0x7f0e0001
int style Animation_AppCompat_Dialog 0x7f0e0002 int style Animation_AppCompat_Dialog 0x7f0e0002

View File

@ -370,13 +370,13 @@
<tileData x="13.151686" width="32.30337"/> <tileData x="13.151686" width="32.30337"/>
</ceilingTiles> </ceilingTiles>
<obstacles class="java.util.ArrayList"> <obstacles class="java.util.ArrayList">
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.7331653" rightEdge="3.1601653" height="0.357" y="-0.006666664"> <obstacleData floating="true" moving="false" deadly="false" leftEdge="1.7464986" rightEdge="3.1734986" height="0.357" y="0.013333336">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/> <moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData> </obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.2206645" rightEdge="4.672664" height="0.395" y="-0.06666667"> <obstacleData floating="true" moving="false" deadly="false" leftEdge="3.2206645" rightEdge="4.672664" height="0.395" y="-0.02">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/> <moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData> </obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.7519975" rightEdge="5.847997" height="0.408" y="-0.13333336"> <obstacleData floating="true" moving="false" deadly="false" leftEdge="4.718664" rightEdge="5.814664" height="0.408" y="-0.04666668">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/> <moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData> </obstacleData>
<obstacleData floating="false" moving="false" deadly="false" leftEdge="7.4900084" rightEdge="7.9900084" height="0.777" y="-0.21150002"> <obstacleData floating="false" moving="false" deadly="false" leftEdge="7.4900084" rightEdge="7.9900084" height="0.777" y="-0.21150002">

View File

@ -0,0 +1,31 @@
package de.frajul.endlessroll.entities.shapes;
import android.content.Context;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.levels.LevelManager;
/**
* Created by Julian on 30.10.2017.
*/
public class CollectEnergyTask extends Task {
public CollectEnergyTask(int condition) {
super(condition);
}
@Override
protected boolean checkConditionFulfilled(LevelManager levelManager) {
return levelManager.getTotalCollectedEnergyCount() >= condition;
}
@Override
public String toString(Context context, LevelManager levelManager) {
if (conditionFulfilled) {
return context.getString(R.string.task_collect_energy_format_d, condition);
}
return context.getString(R.string.task_collect_energy_progress_format_ddd, condition,
levelManager.getTotalCollectedEnergyCount(), condition);
}
}

View File

@ -0,0 +1,31 @@
package de.frajul.endlessroll.entities.shapes;
import android.content.Context;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.levels.LevelManager;
/**
* Created by Julian on 30.10.2017.
*/
public class CollectStarTask extends Task {
public CollectStarTask(int condition) {
super(condition);
}
@Override
protected boolean checkConditionFulfilled(LevelManager levelManager) {
return levelManager.getTotalCollectedStarCount() >= condition;
}
@Override
public String toString(Context context, LevelManager levelManager) {
if (conditionFulfilled) {
return context.getString(R.string.task_collect_stars_format_d, condition);
}
return context.getString(R.string.task_collect_stars_progress_format_ddd, condition,
levelManager.getTotalCollectedStarCount(), condition);
}
}

View File

@ -0,0 +1,27 @@
package de.frajul.endlessroll.entities.shapes;
import android.content.Context;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.levels.LevelManager;
/**
* Created by Julian on 30.10.2017.
*/
public class CompleteWorldTask extends Task {
public CompleteWorldTask(int condition) {
super(condition);
}
@Override
protected boolean checkConditionFulfilled(LevelManager levelManager) {
return levelManager.getPackWithId(condition).isAllLevelsFinished();
}
@Override
public String toString(Context context, LevelManager levelManager) {
return context.getString(R.string.task_complete_world_format_d, condition);
}
}

View File

@ -0,0 +1,27 @@
package de.frajul.endlessroll.entities.shapes;
import android.content.Context;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.levels.LevelManager;
/**
* Created by Julian on 30.10.2017.
*/
public class EmptyTask extends Task{
public EmptyTask() {
super(0);
}
@Override
protected boolean checkConditionFulfilled(LevelManager levelManager) {
return true;
}
@Override
public String toString(Context context, LevelManager levelManager) {
return context.getString(R.string.task_empty);
}
}

View File

@ -12,24 +12,37 @@ import de.frajul.endlessroll.entities.textures.TexturePack;
*/ */
public enum PlayerShape { public enum PlayerShape {
BALL(R.string.playershape_name_ball, R.drawable.playershapes_ball), BALL(R.string.playershape_name_ball, R.string.playershape_description_ball,
CLOCK(R.string.playershape_name_clock, R.drawable.playershapes_clock), R.drawable.playershapes_ball, new EmptyTask()),
HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral, R.drawable.playershapes_hypno_spiral), CLOCK(R.string.playershape_name_clock, R.string.playershape_description_clock,
PACMAN(R.string.playershape_name_pacman, R.drawable.playershapes_pacman), R.drawable.playershapes_clock, new CollectStarTask(15)),
SMILEY(R.string.playershape_name_smiley, R.drawable.playershapes_smiley), HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral,
WHEEL(R.string.playershape_name_wheel, R.drawable.playershapes_wheel), R.string.playershape_description_hypno_spiral, R.drawable.playershapes_hypno_spiral,
SUN(R.string.playershape_name_sun, R.drawable.playershapes_sun); new CollectEnergyTask(3)),
PACMAN(R.string.playershape_name_pacman, R.string.playershape_description_pacman,
R.drawable.playershapes_pacman, new CompleteWorldTask(1)),
SMILEY(R.string.playershape_name_smiley, R.string.playershape_description_smiley,
R.drawable.playershapes_smiley, new CollectStarTask(30)),
WHEEL(R.string.playershape_name_wheel, R.string.playershape_description_wheel,
R.drawable.playershapes_wheel, new CollectStarTask(48)),
SUN(R.string.playershape_name_sun, R.string.playershape_description_sun,
R.drawable.playershapes_sun, new CollectEnergyTask(16));
@StringRes @StringRes
private int nameId; private int nameId;
@StringRes
private int descriptionId;
@DrawableRes @DrawableRes
private int drawableId; private int drawableId;
private Task unlockTask;
private Texture texture; private Texture texture;
PlayerShape(@StringRes int nameId, @DrawableRes int drawableId) { PlayerShape(@StringRes int nameId, @StringRes int descriptionId, @DrawableRes int drawableId, Task unlockTask) {
this.nameId = nameId; this.nameId = nameId;
this.descriptionId = descriptionId;
this.drawableId = drawableId; this.drawableId = drawableId;
this.unlockTask = unlockTask;
} }
public static void loadAllTextures(TexturePack texturePack) { public static void loadAllTextures(TexturePack texturePack) {
@ -43,11 +56,20 @@ public enum PlayerShape {
texture = texturePack.loadTexture(drawableId); texture = texturePack.loadTexture(drawableId);
} }
public Task getUnlockTask() {
return unlockTask;
}
@StringRes @StringRes
public int getNameId() { public int getNameId() {
return nameId; return nameId;
} }
@StringRes
public int getDescriptionId() {
return descriptionId;
}
@DrawableRes @DrawableRes
public int getDrawableId() { public int getDrawableId() {
return drawableId; return drawableId;

View File

@ -0,0 +1,31 @@
package de.frajul.endlessroll.entities.shapes;
import android.content.Context;
import de.frajul.endlessroll.levels.LevelManager;
/**
* Created by Julian on 29.10.2017.
*/
public abstract class Task {
protected int condition;
protected boolean conditionFulfilled;
public Task(int condition) {
this.condition = condition;
}
public void update(LevelManager levelManager){
conditionFulfilled = checkConditionFulfilled(levelManager);
}
protected abstract boolean checkConditionFulfilled(LevelManager levelManager);
public abstract String toString(Context context, LevelManager levelManager);
public boolean isConditionFulfilled() {
return conditionFulfilled;
}
}

View File

@ -2,13 +2,13 @@ package de.frajul.endlessroll.main.screens;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TableRow;
import de.frajul.endlessroll.R; import de.frajul.endlessroll.R;
import de.frajul.endlessroll.entities.shapes.PlayerShape; import de.frajul.endlessroll.entities.shapes.PlayerShape;
import de.frajul.endlessroll.entities.shapes.PlayerShapeButtonOnClickListener; import de.frajul.endlessroll.entities.shapes.PlayerShapeButtonOnClickListener;
import de.frajul.endlessroll.main.GameActivity; import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.views.PlayerShapeButton; import de.frajul.endlessroll.views.PlayerShapeButton;
import de.frajul.endlessroll.views.ShapeInspector;
import de.frajul.endlessroll.views.TopBar; import de.frajul.endlessroll.views.TopBar;
/** /**
@ -18,6 +18,8 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
private PlayerShapeButton activeButton; private PlayerShapeButton activeButton;
private ShapeInspector shapeInspector;
private TopBar topBar; private TopBar topBar;
private LinearLayout topRow; private LinearLayout topRow;
private LinearLayout bottomRow; private LinearLayout bottomRow;
@ -27,6 +29,8 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
topBar = super.createTopBar(R.id.shape_shop_topbar); topBar = super.createTopBar(R.id.shape_shop_topbar);
topRow = (LinearLayout) layout.findViewById(R.id.shape_shop_topRow); topRow = (LinearLayout) layout.findViewById(R.id.shape_shop_topRow);
bottomRow = (LinearLayout) layout.findViewById(R.id.shape_shop_bottomRow); bottomRow = (LinearLayout) layout.findViewById(R.id.shape_shop_bottomRow);
shapeInspector = new ShapeInspector(gameActivity,
layout.findViewById(R.id.shape_shop_shape_inspector));
} }
private void createViews() { private void createViews() {
@ -35,9 +39,12 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
int i = 0; int i = 0;
int totalShapes = PlayerShape.values().length; int totalShapes = PlayerShape.values().length;
for (PlayerShape playerShape : PlayerShape.values()) { for (PlayerShape playerShape : PlayerShape.values()) {
playerShape.getUnlockTask().update(gameActivity.getLevelManager());
boolean lastInRow = i == totalShapes / 2 || i == totalShapes - 1; boolean lastInRow = i == totalShapes / 2 || i == totalShapes - 1;
boolean locked = !playerShape.getUnlockTask()
.isConditionFulfilled();
PlayerShapeButton button = new PlayerShapeButton(gameActivity, playerShape, this, PlayerShapeButton button = new PlayerShapeButton(gameActivity, playerShape, this,
!lastInRow); locked, !lastInRow);
if (i < totalShapes / 2 + 1) if (i < totalShapes / 2 + 1)
topRow.addView(button.getView()); topRow.addView(button.getView());
else else
@ -50,6 +57,8 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
i++; i++;
} }
shapeInspector.update(activeButton.getPlayerShape(), activeButton.isLocked());
} }
@Override @Override
@ -66,9 +75,12 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
@Override @Override
public void onClick(PlayerShapeButton button) { public void onClick(PlayerShapeButton button) {
shapeInspector.update(button.getPlayerShape(), button.isLocked());
if (!button.isLocked()) {
activeButton.stopRotating(); activeButton.stopRotating();
activeButton = button; activeButton = button;
activeButton.startRotating(); activeButton.startRotating();
gameActivity.getUser().setCurrentPlayerShape(button.getPlayerShape()); gameActivity.getUser().setCurrentPlayerShape(button.getPlayerShape());
} }
} }
}

View File

@ -1,6 +1,5 @@
package de.frajul.endlessroll.views; package de.frajul.endlessroll.views;
import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -29,23 +28,27 @@ public class PlayerShapeButton implements View.OnClickListener {
private Button button; private Button button;
private Animation rotation; private Animation rotation;
public PlayerShapeButton(GameActivity gameActivity, PlayerShape playerShape, PlayerShapeButtonOnClickListener clickListener, boolean marginToRight) { private boolean locked;
public PlayerShapeButton(GameActivity gameActivity, PlayerShape playerShape, PlayerShapeButtonOnClickListener clickListener, boolean locked, boolean marginToRight) {
this.clickListener = clickListener; this.clickListener = clickListener;
this.playerShape = playerShape; this.playerShape = playerShape;
this.locked = locked;
view = LayoutInflater.from(gameActivity).inflate(R.layout.shape_button, null); view = LayoutInflater.from(gameActivity).inflate(R.layout.shape_button, null);
view.setLayoutParams(createLayoutParams(marginToRight)); view.setLayoutParams(createLayoutParams(marginToRight));
textView = (TextView) view.findViewById(R.id.shape_button_textview); textView = (TextView) view.findViewById(R.id.shape_button_textview);
textView.setTypeface(gameActivity.getTypeface()); textView.setTypeface(gameActivity.getTypeface());
textView.setText(playerShape.getNameId()); textView.setText(locked ? R.string.playershape_name_locked : playerShape.getNameId());
button = (Button) view.findViewById(R.id.shape_button_button); button = (Button) view.findViewById(R.id.shape_button_button);
button.setBackgroundDrawable(gameActivity.getResources().getDrawable(playerShape.getDrawableId())); button.setBackgroundDrawable(
gameActivity.getResources().getDrawable(locked ? R.drawable.playershapes_locked : playerShape.getDrawableId()));
button.setOnClickListener(this); button.setOnClickListener(this);
rotation = AnimationUtils.loadAnimation(gameActivity, R.anim.shape_button_rotation); rotation = AnimationUtils.loadAnimation(gameActivity, R.anim.shape_button_rotation);
} }
private LinearLayout.LayoutParams createLayoutParams(boolean marginToRight) { private LinearLayout.LayoutParams createLayoutParams(boolean marginToRight) {
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT); ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
if (marginToRight) if (marginToRight)
params.setMargins(0, 0, 60, 0); params.setMargins(0, 0, 60, 0);
return params; return params;
@ -68,6 +71,10 @@ public class PlayerShapeButton implements View.OnClickListener {
return view; return view;
} }
public boolean isLocked() {
return locked;
}
public PlayerShape getPlayerShape() { public PlayerShape getPlayerShape() {
return playerShape; return playerShape;
} }

View File

@ -0,0 +1,54 @@
package de.frajul.endlessroll.views;
import android.graphics.Typeface;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.entities.shapes.EmptyTask;
import de.frajul.endlessroll.entities.shapes.PlayerShape;
import de.frajul.endlessroll.entities.shapes.Task;
import de.frajul.endlessroll.main.GameActivity;
/**
* Created by Julian on 03.06.2017.
*/
public class ShapeInspector {
private GameActivity gameActivity;
private TextView title;
private ImageView imageView;
private TextView description;
private ShapeInspectorCheckbox checkbox;
private PlayerShape shape;
private boolean locked;
public ShapeInspector(GameActivity gameActivity, View layout) {
this.gameActivity = gameActivity;
Typeface typeface = gameActivity.getTypeface();
title = (TextView) layout.findViewById(R.id.shape_inspector_title);
title.setTypeface(typeface);
imageView = (ImageView) layout.findViewById(R.id.shape_inspector_imageview);
description = (TextView) layout.findViewById(R.id.shape_inspector_description);
description.setTypeface(typeface);
checkbox = new ShapeInspectorCheckbox(gameActivity, typeface,
layout.findViewById(R.id.shape_inspector_check_box));
}
public void update(PlayerShape shape, boolean locked) {
this.shape = shape;
this.locked = locked;
title.setText(locked ? R.string.playershape_name_locked : shape.getNameId());
imageView.setImageDrawable(gameActivity.getResources()
.getDrawable(locked ? R.drawable.playershapes_locked : shape.getDrawableId()));
description.setText(
locked ? R.string.playershape_description_locked : shape.getDescriptionId());
checkbox.updateForTask(shape.getUnlockTask());
}
}

View File

@ -0,0 +1,50 @@
package de.frajul.endlessroll.views;
import android.graphics.Typeface;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.entities.shapes.EmptyTask;
import de.frajul.endlessroll.entities.shapes.Task;
import de.frajul.endlessroll.main.GameActivity;
/**
* Created by Julian on 30.10.2017.
*/
public class ShapeInspectorCheckbox {
private GameActivity gameActivity;
private View layout;
private ImageView image;
private TextView textView;
public ShapeInspectorCheckbox(GameActivity gameActivity, Typeface typeface, View layout) {
this.gameActivity = gameActivity;
this.layout = layout;
image = (ImageView) layout.findViewById(R.id.shape_inspector_check_box_image);
textView = (TextView) layout.findViewById(R.id.shape_inspector_check_box_text);
textView.setTypeface(typeface);
}
public void updateForTask(Task task) {
boolean taskNotEmpty = !(task instanceof EmptyTask);
setVisible(taskNotEmpty);
if (taskNotEmpty) {
textView.setText(task.toString(gameActivity, gameActivity.getLevelManager()));
setChecked(task.isConditionFulfilled());
}
}
private void setChecked(boolean checked) {
int drawableId = checked ? R.drawable.guis_checkbox_checked : R.drawable.guis_checkbox_unchecked;
image.setBackgroundDrawable(gameActivity.getResources().getDrawable(drawableId));
}
private void setVisible(boolean visible) {
layout.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/playershapes_wheel">
<shape android:shape="rectangle">
<size
android:width="24dp"
android:height="24dp" />
</shape>
</item>
<item android:state_checked="false"
android:drawable="@drawable/playershapes_smiley">
<shape android:shape="rectangle">
<size
android:width="24dp"
android:height="24dp" />
</shape>
</item>
</selector>

View File

@ -12,11 +12,18 @@
android:text="@string/placeholder_button" android:text="@string/placeholder_button"
android:textSize="28sp"/> android:textSize="28sp"/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<Button <Button
android:id="@+id/shape_button_button" android:id="@+id/shape_button_button"
android:layout_width="65dp" android:layout_width="65dp"
android:layout_height="65dp" android:layout_height="65dp"
android:layout_gravity="center_horizontal" android:layout_centerInParent="true"
android:background="@drawable/playershapes_ball"/> android:background="@drawable/playershapes_ball"/>
</RelativeLayout>
</LinearLayout> </LinearLayout>

View File

@ -7,7 +7,7 @@
android:padding="10dp"> android:padding="10dp">
<TextView <TextView
android:id="@+id/tool_inspector_title" android:id="@+id/shape_inspector_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
@ -15,32 +15,32 @@
android:textAlignment="center" android:textAlignment="center"
android:textSize="28sp"/> android:textSize="28sp"/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp">
<ImageView <ImageView
android:id="@+id/tool_inspector_imageview" android:id="@+id/shape_inspector_imageview"
android:layout_width="45dp" android:layout_width="45dp"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_gravity="center_horizontal" android:layout_centerInParent="true"
android:src="@drawable/playershapes_smiley" android:src="@drawable/playershapes_smiley"/>
android:layout_marginBottom="20dp"/> </RelativeLayout>
<CheckBox <include
android:id="@+id/shape_inspector_check_box"
layout="@layout/shape_inspector_check_box"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"/>
android:checked="true"
android:text="First task"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Second task"/>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView <TextView
android:id="@+id/tool_inspector_description" android:id="@+id/shape_inspector_description"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/shape_inspector_check_box_image"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="5dp"/>
<TextView
android:id="@+id/shape_inspector_check_box_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:layout_gravity="center_vertical"
android:text="@string/placeholder_textview"/>
</LinearLayout>

View File

@ -49,6 +49,22 @@
<string name="playershape_name_smiley">Smiley</string> <string name="playershape_name_smiley">Smiley</string>
<string name="playershape_name_wheel">Wheel</string> <string name="playershape_name_wheel">Wheel</string>
<string name="playershape_name_sun">Sun</string> <string name="playershape_name_sun">Sun</string>
<string name="playershape_name_locked">\?\?\?</string>
<string name="playershape_description_ball">Keep calm and roll on</string>
<string name="playershape_description_clock">Tick tack!</string>
<string name="playershape_description_hypno_spiral">Hypnotizes you for more fun</string>
<string name="playershape_description_pacman">PACMAN!</string>
<string name="playershape_description_smiley">Don\'t worry, roll happy!</string>
<string name="playershape_description_wheel">A nice car without the... car</string>
<string name="playershape_description_sun">Shine bright like the sun</string>
<string name="playershape_description_locked">A new shape for more fun</string>
<string name="task_empty">Empty task</string>
<string name="task_collect_stars_progress_format_ddd">Collect %d stars (%d/%d)</string>
<string name="task_collect_energy_progress_format_ddd">Collect %d energy (%d/%d)</string>
<string name="task_collect_stars_format_d">Collect %d stars</string>
<string name="task_collect_energy_format_d">Collect %d energy</string>
<string name="task_complete_world_format_d">Finish the %d. world</string>
<string name="tool_description_locked_format_d">You will unlock this mysterious tool at level %d</string> <string name="tool_description_locked_format_d">You will unlock this mysterious tool at level %d</string>
<string name="tool_description_ramp">Roll up the ramp to gain height</string> <string name="tool_description_ramp">Roll up the ramp to gain height</string>