Message appears when playershape is unlocked

Superpower-countdown now calculated with timer.frametime -> superpower-countdown is now paused when the game is paused
This commit is contained in:
= 2017-10-31 11:19:33 +01:00
parent 44d7665442
commit 9da909bda5
8 changed files with 352 additions and 193 deletions

View File

@ -541,17 +541,17 @@ public final class R {
public static final int status_bar_latest_event_content = 0x7f08008a;
public static final int submit_area = 0x7f08008b;
public static final int tabMode = 0x7f08008c;
public static final int text = 0x7f08008d;
public static final int text2 = 0x7f08008e;
public static final int textSpacerNoButtons = 0x7f08008f;
public static final int time = 0x7f080090;
public static final int title = 0x7f080091;
public static final int title_template = 0x7f080092;
public static final int topPanel = 0x7f0800af;
public static final int up = 0x7f0800c1;
public static final int useLogo = 0x7f0800c2;
public static final int withText = 0x7f0800c3;
public static final int wrap_content = 0x7f0800cd;
public static final int text = 0x7f08008f;
public static final int text2 = 0x7f080090;
public static final int textSpacerNoButtons = 0x7f080091;
public static final int time = 0x7f080092;
public static final int title = 0x7f080093;
public static final int title_template = 0x7f080094;
public static final int topPanel = 0x7f0800b1;
public static final int up = 0x7f0800c3;
public static final int useLogo = 0x7f0800c4;
public static final int withText = 0x7f0800c5;
public static final int wrap_content = 0x7f0800cf;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f090000;
@ -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_application = 0x7f0d0011;
public static final int abc_toolbar_collapse_description = 0x7f0d0012;
public static final int status_bar_notification_info_overflow = 0x7f0d0046;
public static final int status_bar_notification_info_overflow = 0x7f0d0047;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0e0000;

File diff suppressed because one or more lines are too long

View File

@ -693,71 +693,73 @@ int id startscreen_unlock_levels 0x7f080089
int id status_bar_latest_event_content 0x7f08008a
int id submit_area 0x7f08008b
int id tabMode 0x7f08008c
int id text 0x7f08008d
int id text2 0x7f08008e
int id textSpacerNoButtons 0x7f08008f
int id time 0x7f080090
int id title 0x7f080091
int id title_template 0x7f080092
int id tool_button_animation_layer 0x7f080093
int id tool_button_background_layer 0x7f080094
int id tool_button_progress_bar 0x7f080095
int id tool_inspector_description 0x7f080096
int id tool_inspector_imageview 0x7f080097
int id tool_inspector_level_view 0x7f080098
int id tool_inspector_pricebutton 0x7f080099
int id tool_inspector_title 0x7f08009a
int id tool_upgrade_imageview 0x7f08009b
int id tool_upgrade_pricebutton 0x7f08009c
int id tool_upgrade_title 0x7f08009d
int id tool_upgrade_value_new 0x7f08009e
int id tool_upgrade_value_old 0x7f08009f
int id toolbutton_1 0x7f0800a0
int id toolbutton_2 0x7f0800a1
int id toolbutton_3 0x7f0800a2
int id toolbutton_4 0x7f0800a3
int id toolofferslot_slot 0x7f0800a4
int id toolofferslot_title 0x7f0800a5
int id toolshop_slot1 0x7f0800a6
int id toolshop_slot2 0x7f0800a7
int id toolshop_slot3 0x7f0800a8
int id toolshop_slot4 0x7f0800a9
int id toolshop_tool_offer_bottom_row 0x7f0800aa
int id toolshop_tool_offer_top_row 0x7f0800ab
int id toolshop_toolinspector 0x7f0800ac
int id toolshop_topbar 0x7f0800ad
int id toolslot_image 0x7f0800ae
int id topPanel 0x7f0800af
int id topbar_energycount 0x7f0800b0
int id topbar_energycount_decrease 0x7f0800b1
int id topbar_energyview 0x7f0800b2
int id topbar_layout 0x7f0800b3
int id topbar_leveldisplay 0x7f0800b4
int id topbar_levellayout 0x7f0800b5
int id topbar_levelprogress 0x7f0800b6
int id topbar_settings 0x7f0800b7
int id topbar_shapeshop 0x7f0800b8
int id topbar_starcount 0x7f0800b9
int id topbar_starcount_decrease 0x7f0800ba
int id topbar_starview 0x7f0800bb
int id topbar_toolshop 0x7f0800bc
int id tutorial_image_view 0x7f0800bd
int id tutorial_text_view 0x7f0800be
int id unlockmessage_message 0x7f0800bf
int id unlockmessage_toolimage 0x7f0800c0
int id up 0x7f0800c1
int id useLogo 0x7f0800c2
int id withText 0x7f0800c3
int id worldbutton_energycount 0x7f0800c4
int id worldbutton_levelcount 0x7f0800c5
int id worldbutton_lock 0x7f0800c6
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 id task_completed_text 0x7f08008d
int id task_completed_unlock_list 0x7f08008e
int id text 0x7f08008f
int id text2 0x7f080090
int id textSpacerNoButtons 0x7f080091
int id time 0x7f080092
int id title 0x7f080093
int id title_template 0x7f080094
int id tool_button_animation_layer 0x7f080095
int id tool_button_background_layer 0x7f080096
int id tool_button_progress_bar 0x7f080097
int id tool_inspector_description 0x7f080098
int id tool_inspector_imageview 0x7f080099
int id tool_inspector_level_view 0x7f08009a
int id tool_inspector_pricebutton 0x7f08009b
int id tool_inspector_title 0x7f08009c
int id tool_upgrade_imageview 0x7f08009d
int id tool_upgrade_pricebutton 0x7f08009e
int id tool_upgrade_title 0x7f08009f
int id tool_upgrade_value_new 0x7f0800a0
int id tool_upgrade_value_old 0x7f0800a1
int id toolbutton_1 0x7f0800a2
int id toolbutton_2 0x7f0800a3
int id toolbutton_3 0x7f0800a4
int id toolbutton_4 0x7f0800a5
int id toolofferslot_slot 0x7f0800a6
int id toolofferslot_title 0x7f0800a7
int id toolshop_slot1 0x7f0800a8
int id toolshop_slot2 0x7f0800a9
int id toolshop_slot3 0x7f0800aa
int id toolshop_slot4 0x7f0800ab
int id toolshop_tool_offer_bottom_row 0x7f0800ac
int id toolshop_tool_offer_top_row 0x7f0800ad
int id toolshop_toolinspector 0x7f0800ae
int id toolshop_topbar 0x7f0800af
int id toolslot_image 0x7f0800b0
int id topPanel 0x7f0800b1
int id topbar_energycount 0x7f0800b2
int id topbar_energycount_decrease 0x7f0800b3
int id topbar_energyview 0x7f0800b4
int id topbar_layout 0x7f0800b5
int id topbar_leveldisplay 0x7f0800b6
int id topbar_levellayout 0x7f0800b7
int id topbar_levelprogress 0x7f0800b8
int id topbar_settings 0x7f0800b9
int id topbar_shapeshop 0x7f0800ba
int id topbar_starcount 0x7f0800bb
int id topbar_starcount_decrease 0x7f0800bc
int id topbar_starview 0x7f0800bd
int id topbar_toolshop 0x7f0800be
int id tutorial_image_view 0x7f0800bf
int id tutorial_text_view 0x7f0800c0
int id unlockmessage_message 0x7f0800c1
int id unlockmessage_toolimage 0x7f0800c2
int id up 0x7f0800c3
int id useLogo 0x7f0800c4
int id withText 0x7f0800c5
int id worldbutton_energycount 0x7f0800c6
int id worldbutton_levelcount 0x7f0800c7
int id worldbutton_lock 0x7f0800c8
int id worldbutton_preview 0x7f0800c9
int id worldbutton_starcount 0x7f0800ca
int id worldbutton_tickView 0x7f0800cb
int id worldbutton_title 0x7f0800cc
int id worlds_layout 0x7f0800cd
int id worlds_topbar 0x7f0800ce
int id wrap_content 0x7f0800cf
int integer abc_config_activityDefaultDur 0x7f090000
int integer abc_config_activityShortDur 0x7f090001
int integer abc_max_action_buttons 0x7f090002
@ -815,18 +817,19 @@ int layout shape_shop 0x7f0a0030
int layout short_menu 0x7f0a0031
int layout start_screen 0x7f0a0032
int layout support_simple_spinner_dropdown_item 0x7f0a0033
int layout tool_inspector 0x7f0a0034
int layout tool_offer_slot 0x7f0a0035
int layout tool_slot 0x7f0a0036
int layout tool_upgrade 0x7f0a0037
int layout toolbutton 0x7f0a0038
int layout toolbuttonbar 0x7f0a0039
int layout toolshop 0x7f0a003a
int layout topbar 0x7f0a003b
int layout tutorial 0x7f0a003c
int layout unlock_message 0x7f0a003d
int layout world_button 0x7f0a003e
int layout worlds 0x7f0a003f
int layout task_completed_message 0x7f0a0034
int layout tool_inspector 0x7f0a0035
int layout tool_offer_slot 0x7f0a0036
int layout tool_slot 0x7f0a0037
int layout tool_upgrade 0x7f0a0038
int layout toolbutton 0x7f0a0039
int layout toolbuttonbar 0x7f0a003a
int layout toolshop 0x7f0a003b
int layout topbar 0x7f0a003c
int layout tutorial 0x7f0a003d
int layout unlock_message 0x7f0a003e
int layout world_button 0x7f0a003f
int layout worlds 0x7f0a0040
int mipmap ic_launcher 0x7f0b0000
int raw background 0x7f0c0000
int raw ramp 0x7f0c0001
@ -851,104 +854,106 @@ int string abc_shareactionprovider_share_with_application 0x7f0d0011
int string abc_toolbar_collapse_description 0x7f0d0012
int string app_name 0x7f0d0013
int string bounty_message_resource_format_s 0x7f0d0014
int string bounty_message_tool_format_s 0x7f0d0015
int string bounty_message_tool_slot 0x7f0d0016
int string game_countdown_placeholder 0x7f0d0017
int string game_fps_format_d 0x7f0d0018
int string game_fps_placeholder 0x7f0d0019
int string game_playerprogress_format_f 0x7f0d001a
int string game_playerprogress_placeholder 0x7f0d001b
int string game_playerspeed_format_f 0x7f0d001c
int string game_playerspeed_placeholder 0x7f0d001d
int string level_button_format_d 0x7f0d001e
int string levelup 0x7f0d001f
int string message_game_over 0x7f0d0020
int string message_next_level 0x7f0d0021
int string message_restart 0x7f0d0022
int string message_to_menu 0x7f0d0023
int string message_tools 0x7f0d0024
int string message_try_again 0x7f0d0025
int string message_win 0x7f0d0026
int string placeholder_button 0x7f0d0027
int string placeholder_number 0x7f0d0028
int string placeholder_percent 0x7f0d0029
int string placeholder_textview 0x7f0d002a
int string playershape_description_ball 0x7f0d002b
int string playershape_description_clock 0x7f0d002c
int string playershape_description_hypno_spiral 0x7f0d002d
int string playershape_description_locked 0x7f0d002e
int string playershape_description_pacman 0x7f0d002f
int string playershape_description_smiley 0x7f0d0030
int string playershape_description_sun 0x7f0d0031
int string playershape_description_wheel 0x7f0d0032
int string playershape_name_ball 0x7f0d0033
int string playershape_name_clock 0x7f0d0034
int string playershape_name_hypno_spiral 0x7f0d0035
int string playershape_name_locked 0x7f0d0036
int string playershape_name_pacman 0x7f0d0037
int string playershape_name_smiley 0x7f0d0038
int string playershape_name_sun 0x7f0d0039
int string playershape_name_wheel 0x7f0d003a
int string pre_start_screen_loading 0x7f0d003b
int string price_button_buy 0x7f0d003c
int string price_button_upgrade 0x7f0d003d
int string settings_reset 0x7f0d003e
int string short_menu_continue 0x7f0d003f
int string short_menu_exit 0x7f0d0040
int string short_menu_restart 0x7f0d0041
int string start_screen_gain_90_ep 0x7f0d0042
int string start_screen_play 0x7f0d0043
int string start_screen_to_gl_test_screen 0x7f0d0044
int string start_screen_unlock_all_levels 0x7f0d0045
int string status_bar_notification_info_overflow 0x7f0d0046
int string task_collect_energy_format_d 0x7f0d0047
int string task_collect_energy_progress_format_ddd 0x7f0d0048
int string task_collect_stars_format_d 0x7f0d0049
int string task_collect_stars_progress_format_ddd 0x7f0d004a
int string task_complete_world_format_d 0x7f0d004b
int string task_empty 0x7f0d004c
int string tool_description_bomb 0x7f0d004d
int string tool_description_locked_format_d 0x7f0d004e
int string tool_description_magnet 0x7f0d004f
int string tool_description_power_mushroom 0x7f0d0050
int string tool_description_ramp 0x7f0d0051
int string tool_description_spring 0x7f0d0052
int string tool_level_format_d 0x7f0d0053
int string tool_name_bomb 0x7f0d0054
int string tool_name_locked 0x7f0d0055
int string tool_name_magnet 0x7f0d0056
int string tool_name_power_mushroom 0x7f0d0057
int string tool_name_ramp 0x7f0d0058
int string tool_name_spring 0x7f0d0059
int string tool_upgrade_force 0x7f0d005a
int string tool_upgrade_none 0x7f0d005b
int string tool_upgrade_radius 0x7f0d005c
int string tool_upgrade_time 0x7f0d005d
int string tool_upgrade_title_format_sd 0x7f0d005e
int string tool_upgrade_title_placeholder 0x7f0d005f
int string tool_upgrade_value_max 0x7f0d0060
int string topbar_level_format_d 0x7f0d0061
int string topbar_level_placeholder 0x7f0d0062
int string topbar_toolshop 0x7f0d0063
int string tutorial_leveled_up 0x7f0d0064
int string tutorial_place_ramp_air 0x7f0d0065
int string tutorial_place_ramp_air_2 0x7f0d0066
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 string bounty_message_shape_unlocked 0x7f0d0015
int string bounty_message_tool_format_s 0x7f0d0016
int string bounty_message_tool_slot 0x7f0d0017
int string game_countdown_placeholder 0x7f0d0018
int string game_fps_format_d 0x7f0d0019
int string game_fps_placeholder 0x7f0d001a
int string game_playerprogress_format_f 0x7f0d001b
int string game_playerprogress_placeholder 0x7f0d001c
int string game_playerspeed_format_f 0x7f0d001d
int string game_playerspeed_placeholder 0x7f0d001e
int string level_button_format_d 0x7f0d001f
int string levelup 0x7f0d0020
int string message_game_over 0x7f0d0021
int string message_next_level 0x7f0d0022
int string message_restart 0x7f0d0023
int string message_to_menu 0x7f0d0024
int string message_tools 0x7f0d0025
int string message_try_again 0x7f0d0026
int string message_win 0x7f0d0027
int string placeholder_button 0x7f0d0028
int string placeholder_number 0x7f0d0029
int string placeholder_percent 0x7f0d002a
int string placeholder_textview 0x7f0d002b
int string playershape_description_ball 0x7f0d002c
int string playershape_description_clock 0x7f0d002d
int string playershape_description_hypno_spiral 0x7f0d002e
int string playershape_description_locked 0x7f0d002f
int string playershape_description_pacman 0x7f0d0030
int string playershape_description_smiley 0x7f0d0031
int string playershape_description_sun 0x7f0d0032
int string playershape_description_wheel 0x7f0d0033
int string playershape_name_ball 0x7f0d0034
int string playershape_name_clock 0x7f0d0035
int string playershape_name_hypno_spiral 0x7f0d0036
int string playershape_name_locked 0x7f0d0037
int string playershape_name_pacman 0x7f0d0038
int string playershape_name_smiley 0x7f0d0039
int string playershape_name_sun 0x7f0d003a
int string playershape_name_wheel 0x7f0d003b
int string pre_start_screen_loading 0x7f0d003c
int string price_button_buy 0x7f0d003d
int string price_button_upgrade 0x7f0d003e
int string settings_reset 0x7f0d003f
int string short_menu_continue 0x7f0d0040
int string short_menu_exit 0x7f0d0041
int string short_menu_restart 0x7f0d0042
int string start_screen_gain_90_ep 0x7f0d0043
int string start_screen_play 0x7f0d0044
int string start_screen_to_gl_test_screen 0x7f0d0045
int string start_screen_unlock_all_levels 0x7f0d0046
int string status_bar_notification_info_overflow 0x7f0d0047
int string task_collect_energy_format_d 0x7f0d0048
int string task_collect_energy_progress_format_ddd 0x7f0d0049
int string task_collect_stars_format_d 0x7f0d004a
int string task_collect_stars_progress_format_ddd 0x7f0d004b
int string task_complete_world_format_d 0x7f0d004c
int string task_completed 0x7f0d004d
int string task_empty 0x7f0d004e
int string tool_description_bomb 0x7f0d004f
int string tool_description_locked_format_d 0x7f0d0050
int string tool_description_magnet 0x7f0d0051
int string tool_description_power_mushroom 0x7f0d0052
int string tool_description_ramp 0x7f0d0053
int string tool_description_spring 0x7f0d0054
int string tool_level_format_d 0x7f0d0055
int string tool_name_bomb 0x7f0d0056
int string tool_name_locked 0x7f0d0057
int string tool_name_magnet 0x7f0d0058
int string tool_name_power_mushroom 0x7f0d0059
int string tool_name_ramp 0x7f0d005a
int string tool_name_spring 0x7f0d005b
int string tool_upgrade_force 0x7f0d005c
int string tool_upgrade_none 0x7f0d005d
int string tool_upgrade_radius 0x7f0d005e
int string tool_upgrade_time 0x7f0d005f
int string tool_upgrade_title_format_sd 0x7f0d0060
int string tool_upgrade_title_placeholder 0x7f0d0061
int string tool_upgrade_value_max 0x7f0d0062
int string topbar_level_format_d 0x7f0d0063
int string topbar_level_placeholder 0x7f0d0064
int string topbar_toolshop 0x7f0d0065
int string tutorial_leveled_up 0x7f0d0066
int string tutorial_place_ramp_air 0x7f0d0067
int string tutorial_place_ramp_air_2 0x7f0d0068
int string tutorial_place_ramp_gap 0x7f0d0069
int string tutorial_place_ramp_obstacle 0x7f0d006a
int string tutorial_place_tools 0x7f0d006b
int string tutorial_placeholder 0x7f0d006c
int string tutorial_to_toolshop 0x7f0d006d
int string tutorial_toolbar 0x7f0d006e
int string tutorial_toolshop_all_tools 0x7f0d006f
int string tutorial_toolshop_equip_spring 0x7f0d0070
int string tutorial_toolshop_inspector 0x7f0d0071
int string tutorial_toolshop_select_buy_spring 0x7f0d0072
int string tutorial_toolshop_toolbar 0x7f0d0073
int string tutorial_toolshop_welcome 0x7f0d0074
int string tutorial_welcome 0x7f0d0075
int string unlock_message_placeholder 0x7f0d0076
int string world_button_progress_placeholder 0x7f0d0077
int string world_button_title_placeholder 0x7f0d0078
int style AlertDialog_AppCompat 0x7f0e0000
int style AlertDialog_AppCompat_Light 0x7f0e0001
int style Animation_AppCompat_Dialog 0x7f0e0002

View File

@ -15,10 +15,10 @@ public enum PlayerShape {
BALL(R.string.playershape_name_ball, R.string.playershape_description_ball,
R.drawable.playershapes_ball, new EmptyTask()),
CLOCK(R.string.playershape_name_clock, R.string.playershape_description_clock,
R.drawable.playershapes_clock, new CollectStarTask(15)),
R.drawable.playershapes_clock, new CollectStarTask(1)),//15
HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral,
R.string.playershape_description_hypno_spiral, R.drawable.playershapes_hypno_spiral,
new CollectEnergyTask(3)),
new CollectEnergyTask(1)),//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,

View File

@ -19,8 +19,7 @@ public class PowerMushroom extends Tool {
@Override
public void onPlayerCollision(Player player, Timer timer) {
player.startSuperPower(timer.getCurrentTime(),
(long) ToolType.POWER_MUSHROOM.getCurrentUpgradeValue(ToolUpgradeType.DURATION));
player.startSuperPower((long) ToolType.POWER_MUSHROOM.getCurrentUpgradeValue(ToolUpgradeType.DURATION));
super.destroy(DestroyEffect.ENERGY_COLLECT);
}

View File

@ -0,0 +1,98 @@
package de.frajul.endlessroll.views;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.entities.Player;
import de.frajul.endlessroll.entities.shapes.PlayerShape;
import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.main.GameLog;
import de.frajul.endlessroll.main.game.Game;
import de.frajul.endlessroll.main.screens.Screen;
/**
* Created by Julian on 15.07.2016.
*/
public class TaskCompletedMessage implements View.OnClickListener, BountyMessage.ScreenSwitchCaller {
private GameActivity gameActivity;
private FrameLayout layout;
private TextView textView;
private LinearLayout messagesLayout;
private List<PlayerShape> unlockedShapes = new ArrayList<>();
public TaskCompletedMessage(GameActivity gameActivity) {
this.gameActivity = gameActivity;
Typeface typeface = gameActivity.getTypeface();
LayoutInflater inflater = LayoutInflater.from(gameActivity);
layout = (FrameLayout) inflater.inflate(R.layout.task_completed_message, null);
layout.setOnClickListener(this);
layout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
layout.setVisibility(View.GONE);
textView = (TextView) layout.findViewById(R.id.task_completed_text);
textView.setTypeface(typeface);
messagesLayout = (LinearLayout) layout.findViewById(R.id.task_completed_unlock_list);
}
public void show(List<PlayerShape> shapes) {
unlockedShapes.clear();
unlockedShapes.addAll(shapes);
showNextShape();
}
private void showNextShape() {
messagesLayout.removeAllViews();
PlayerShape shape = unlockedShapes.remove(0);
textView.setText(
shape.getUnlockTask().toString(gameActivity, gameActivity.getLevelManager()));
BountyMessage message = createBountyMessage(shape);
messagesLayout.addView(message.getLayout());
layout.setVisibility(View.VISIBLE);
}
private BountyMessage createBountyMessage(PlayerShape shape) {
return new BountyMessage(gameActivity, BountyMessage.MessageType.SHAPE_UNLOCKED, null, this,
shape.getDrawableId());
}
private void hide() {
layout.setVisibility(View.GONE);
messagesLayout.removeAllViews();
}
public FrameLayout getLayout() {
return layout;
}
@Override
public void onClick(View v) {
if (unlockedShapes.isEmpty())
hide();
else
showNextShape();
}
@Override
public void switchScreen(Screen.ScreenType screenType) {
gameActivity.flipToScreen(screenType);
hide();
}
}

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/backgrounds_menu_levelup">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/task_completed"
android:textColor="#ffae00"
android:textSize="60sp"
android:textStyle="bold"
android:layout_marginBottom="-10dp"/>
<TextView
android:id="@+id/task_completed_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/placeholder_textview"
android:textColor="#ffe100"
android:textSize="50sp"
android:textStyle="bold"/>
<ImageView
android:layout_width="400dp"
android:layout_height="10dp"
android:id="@+id/imageView"
android:layout_gravity="center_horizontal"
android:src="@drawable/guis_splitter"
android:layout_marginTop="10dp"/>
<LinearLayout
android:id="@+id/task_completed_unlock_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:layout_marginRight="0dp">
</LinearLayout>
</LinearLayout>
</FrameLayout>

View File

@ -12,6 +12,7 @@
<string name="game_fps_placeholder">Fps: 00</string>
<string name="game_fps_format_d">Fps: %d</string>
<string name="game_countdown_placeholder">3</string>
<string name="task_completed">Task completed</string>
<string name="levelup">Level Up</string>
<string name="message_game_over">GAME OVER</string>
<string name="message_win">YOU DID IT</string>
@ -39,6 +40,7 @@
<string name="bounty_message_resource_format_s">%s</string>
<string name="bounty_message_tool_format_s">%s unlocked!</string>
<string name="bounty_message_tool_slot">You unlocked a Toolslot</string>
<string name="bounty_message_shape_unlocked">New shape unlocked</string>
<string name="level_button_format_d">Level: %d</string>
<string name="price_button_buy">Buy</string>
<string name="price_button_upgrade">Upgrade</string>