Added soccer-player-shape
fixed bug with tools not being set on top of obstacles Tools are no longer moved to left if set hard on edge of obstacle
This commit is contained in:
parent
607e9fef05
commit
b49fa71d1f
@ -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_default_mtrl_alpha = 0x7f070043;
|
||||
public static final int abc_textfield_search_material = 0x7f070044;
|
||||
public static final int notification_template_icon_bg = 0x7f070072;
|
||||
public static final int notification_template_icon_bg = 0x7f070070;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int action0 = 0x7f080000;
|
||||
@ -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 = 0x7f0d0064;
|
||||
public static final int status_bar_notification_info_overflow = 0x7f0d0066;
|
||||
}
|
||||
public static final class style {
|
||||
public static final int AlertDialog_AppCompat = 0x7f0e0000;
|
||||
|
File diff suppressed because one or more lines are too long
@ -505,62 +505,62 @@ int drawable abc_textfield_search_activated_mtrl_alpha 0x7f070042
|
||||
int drawable abc_textfield_search_default_mtrl_alpha 0x7f070043
|
||||
int drawable abc_textfield_search_material 0x7f070044
|
||||
int drawable backgrounds_game_grass 0x7f070045
|
||||
int drawable backgrounds_game_snow 0x7f070046
|
||||
int drawable backgrounds_menu_grasslands 0x7f070047
|
||||
int drawable currency_energy 0x7f070048
|
||||
int drawable currency_energy_atlas 0x7f070049
|
||||
int drawable currency_energy_empty 0x7f07004a
|
||||
int drawable currency_star 0x7f07004b
|
||||
int drawable currency_star_empty 0x7f07004c
|
||||
int drawable guis_arrow_back_disabled 0x7f07004d
|
||||
int drawable guis_arrow_back_enabled 0x7f07004e
|
||||
int drawable guis_checkbox_checked 0x7f07004f
|
||||
int drawable guis_checkbox_unchecked 0x7f070050
|
||||
int drawable guis_countdown_1 0x7f070051
|
||||
int drawable guis_countdown_2 0x7f070052
|
||||
int drawable guis_countdown_3 0x7f070053
|
||||
int drawable guis_goal 0x7f070054
|
||||
int drawable guis_lock_locked 0x7f070055
|
||||
int drawable guis_music_off 0x7f070056
|
||||
int drawable guis_music_on 0x7f070057
|
||||
int drawable guis_pausebutton 0x7f070058
|
||||
int drawable guis_playerarrow 0x7f070059
|
||||
int drawable guis_settings_disabled 0x7f07005a
|
||||
int drawable guis_settings_enabled 0x7f07005b
|
||||
int drawable guis_shape_shop_disabled 0x7f07005c
|
||||
int drawable guis_shape_shop_enabled 0x7f07005d
|
||||
int drawable guis_sound_off 0x7f07005e
|
||||
int drawable guis_sound_on 0x7f07005f
|
||||
int drawable guis_splitter 0x7f070060
|
||||
int drawable guis_tick 0x7f070061
|
||||
int drawable guis_tool_shop_disabled 0x7f070062
|
||||
int drawable guis_tool_shop_enabled 0x7f070063
|
||||
int drawable juri_background_game_grass_2 0x7f070064
|
||||
int drawable juri_background_game_grass_3 0x7f070065
|
||||
int drawable juri_background_game_snow_2 0x7f070066
|
||||
int drawable juri_background_game_snow_3 0x7f070067
|
||||
int drawable juri_obstacles_grass 0x7f070068
|
||||
int drawable jury_playershapes_ball_omg_im_blue 0x7f070069
|
||||
int drawable notification_action_background 0x7f07006a
|
||||
int drawable notification_bg 0x7f07006b
|
||||
int drawable notification_bg_low 0x7f07006c
|
||||
int drawable notification_bg_low_normal 0x7f07006d
|
||||
int drawable notification_bg_low_pressed 0x7f07006e
|
||||
int drawable notification_bg_normal 0x7f07006f
|
||||
int drawable notification_bg_normal_pressed 0x7f070070
|
||||
int drawable notification_icon_background 0x7f070071
|
||||
int drawable notification_template_icon_bg 0x7f070072
|
||||
int drawable notification_template_icon_low_bg 0x7f070073
|
||||
int drawable notification_tile_bg 0x7f070074
|
||||
int drawable notify_panel_notification_icon_bg 0x7f070075
|
||||
int drawable obstacles_grass 0x7f070076
|
||||
int drawable obstacles_snow 0x7f070077
|
||||
int drawable playershapes_ball 0x7f070078
|
||||
int drawable playershapes_clock 0x7f070079
|
||||
int drawable playershapes_hypno_spiral 0x7f07007a
|
||||
int drawable playershapes_locked 0x7f07007b
|
||||
int drawable playershapes_pacman 0x7f07007c
|
||||
int drawable playershapes_smiley 0x7f07007d
|
||||
int drawable backgrounds_game_grass_layer_2 0x7f070046
|
||||
int drawable backgrounds_game_grass_layer_3 0x7f070047
|
||||
int drawable backgrounds_game_snow 0x7f070048
|
||||
int drawable backgrounds_game_snow_layer_2 0x7f070049
|
||||
int drawable backgrounds_game_snow_layer_3 0x7f07004a
|
||||
int drawable backgrounds_menu_grasslands 0x7f07004b
|
||||
int drawable currency_energy 0x7f07004c
|
||||
int drawable currency_energy_atlas 0x7f07004d
|
||||
int drawable currency_energy_empty 0x7f07004e
|
||||
int drawable currency_star 0x7f07004f
|
||||
int drawable currency_star_empty 0x7f070050
|
||||
int drawable guis_arrow_back_disabled 0x7f070051
|
||||
int drawable guis_arrow_back_enabled 0x7f070052
|
||||
int drawable guis_checkbox_checked 0x7f070053
|
||||
int drawable guis_checkbox_unchecked 0x7f070054
|
||||
int drawable guis_countdown_1 0x7f070055
|
||||
int drawable guis_countdown_2 0x7f070056
|
||||
int drawable guis_countdown_3 0x7f070057
|
||||
int drawable guis_goal 0x7f070058
|
||||
int drawable guis_lock_locked 0x7f070059
|
||||
int drawable guis_music_off 0x7f07005a
|
||||
int drawable guis_music_on 0x7f07005b
|
||||
int drawable guis_pausebutton 0x7f07005c
|
||||
int drawable guis_playerarrow 0x7f07005d
|
||||
int drawable guis_settings_disabled 0x7f07005e
|
||||
int drawable guis_settings_enabled 0x7f07005f
|
||||
int drawable guis_shape_shop_disabled 0x7f070060
|
||||
int drawable guis_shape_shop_enabled 0x7f070061
|
||||
int drawable guis_sound_off 0x7f070062
|
||||
int drawable guis_sound_on 0x7f070063
|
||||
int drawable guis_splitter 0x7f070064
|
||||
int drawable guis_tick 0x7f070065
|
||||
int drawable guis_tool_shop_disabled 0x7f070066
|
||||
int drawable guis_tool_shop_enabled 0x7f070067
|
||||
int drawable notification_action_background 0x7f070068
|
||||
int drawable notification_bg 0x7f070069
|
||||
int drawable notification_bg_low 0x7f07006a
|
||||
int drawable notification_bg_low_normal 0x7f07006b
|
||||
int drawable notification_bg_low_pressed 0x7f07006c
|
||||
int drawable notification_bg_normal 0x7f07006d
|
||||
int drawable notification_bg_normal_pressed 0x7f07006e
|
||||
int drawable notification_icon_background 0x7f07006f
|
||||
int drawable notification_template_icon_bg 0x7f070070
|
||||
int drawable notification_template_icon_low_bg 0x7f070071
|
||||
int drawable notification_tile_bg 0x7f070072
|
||||
int drawable notify_panel_notification_icon_bg 0x7f070073
|
||||
int drawable obstacles_grass 0x7f070074
|
||||
int drawable obstacles_snow 0x7f070075
|
||||
int drawable playershapes_ball 0x7f070076
|
||||
int drawable playershapes_blue 0x7f070077
|
||||
int drawable playershapes_clock 0x7f070078
|
||||
int drawable playershapes_hypno_spiral 0x7f070079
|
||||
int drawable playershapes_locked 0x7f07007a
|
||||
int drawable playershapes_pacman 0x7f07007b
|
||||
int drawable playershapes_smiley 0x7f07007c
|
||||
int drawable playershapes_soccer 0x7f07007d
|
||||
int drawable playershapes_sun 0x7f07007e
|
||||
int drawable playershapes_wheel 0x7f07007f
|
||||
int drawable terrain_c_grass 0x7f070080
|
||||
@ -579,39 +579,40 @@ int drawable tools_power_mushroom_button 0x7f07008c
|
||||
int drawable tools_ramp 0x7f07008d
|
||||
int drawable tools_ramp_button 0x7f07008e
|
||||
int drawable tools_spring 0x7f07008f
|
||||
int drawable tools_spring_button 0x7f070090
|
||||
int drawable tools_stasis 0x7f070091
|
||||
int drawable tools_stasis_button 0x7f070092
|
||||
int drawable tutorial_place_ramp_air_1 0x7f070093
|
||||
int drawable tutorial_place_ramp_air_2 0x7f070094
|
||||
int drawable tutorial_place_ramp_gap 0x7f070095
|
||||
int drawable tutorial_place_ramp_obstacle 0x7f070096
|
||||
int drawable tutorial_place_tools 0x7f070097
|
||||
int drawable tutorial_switch_tools 0x7f070098
|
||||
int drawable tutorial_to_toolshop 0x7f070099
|
||||
int drawable white 0x7f07009a
|
||||
int drawable world_previews_grasslands 0x7f07009b
|
||||
int drawable world_previews_icymountains 0x7f07009c
|
||||
int drawable xml_background_bountymessage 0x7f07009d
|
||||
int drawable xml_background_dialog_button 0x7f07009e
|
||||
int drawable xml_background_exit_confirm_dialog 0x7f07009f
|
||||
int drawable xml_background_game_over_message_button 0x7f0700a0
|
||||
int drawable xml_background_levelbutton 0x7f0700a1
|
||||
int drawable xml_background_toolslot 0x7f0700a2
|
||||
int drawable xml_background_topbar 0x7f0700a3
|
||||
int drawable xml_background_tutorialimageview 0x7f0700a4
|
||||
int drawable xml_background_tutorialtextview 0x7f0700a5
|
||||
int drawable xml_background_worldbutton 0x7f0700a6
|
||||
int drawable xml_layers_levelprogressbar 0x7f0700a7
|
||||
int drawable xml_selector_backbutton 0x7f0700a8
|
||||
int drawable xml_selector_gamebutton 0x7f0700a9
|
||||
int drawable xml_selector_music 0x7f0700aa
|
||||
int drawable xml_selector_pricebutton 0x7f0700ab
|
||||
int drawable xml_selector_settings_button 0x7f0700ac
|
||||
int drawable xml_selector_settingsbutton 0x7f0700ad
|
||||
int drawable xml_selector_shapeshopbutton 0x7f0700ae
|
||||
int drawable xml_selector_sound 0x7f0700af
|
||||
int drawable xml_selector_toolshopbutton 0x7f0700b0
|
||||
int drawable tools_spring_2 0x7f070090
|
||||
int drawable tools_spring_button 0x7f070091
|
||||
int drawable tools_stasis 0x7f070092
|
||||
int drawable tools_stasis_button 0x7f070093
|
||||
int drawable tutorial_place_ramp_air_1 0x7f070094
|
||||
int drawable tutorial_place_ramp_air_2 0x7f070095
|
||||
int drawable tutorial_place_ramp_gap 0x7f070096
|
||||
int drawable tutorial_place_ramp_obstacle 0x7f070097
|
||||
int drawable tutorial_place_tools 0x7f070098
|
||||
int drawable tutorial_switch_tools 0x7f070099
|
||||
int drawable tutorial_to_toolshop 0x7f07009a
|
||||
int drawable white 0x7f07009b
|
||||
int drawable world_previews_grasslands 0x7f07009c
|
||||
int drawable world_previews_icymountains 0x7f07009d
|
||||
int drawable xml_background_bountymessage 0x7f07009e
|
||||
int drawable xml_background_dialog_button 0x7f07009f
|
||||
int drawable xml_background_exit_confirm_dialog 0x7f0700a0
|
||||
int drawable xml_background_game_over_message_button 0x7f0700a1
|
||||
int drawable xml_background_levelbutton 0x7f0700a2
|
||||
int drawable xml_background_toolslot 0x7f0700a3
|
||||
int drawable xml_background_topbar 0x7f0700a4
|
||||
int drawable xml_background_tutorialimageview 0x7f0700a5
|
||||
int drawable xml_background_tutorialtextview 0x7f0700a6
|
||||
int drawable xml_background_worldbutton 0x7f0700a7
|
||||
int drawable xml_layers_levelprogressbar 0x7f0700a8
|
||||
int drawable xml_selector_backbutton 0x7f0700a9
|
||||
int drawable xml_selector_gamebutton 0x7f0700aa
|
||||
int drawable xml_selector_music 0x7f0700ab
|
||||
int drawable xml_selector_pricebutton 0x7f0700ac
|
||||
int drawable xml_selector_settings_button 0x7f0700ad
|
||||
int drawable xml_selector_settingsbutton 0x7f0700ae
|
||||
int drawable xml_selector_shapeshopbutton 0x7f0700af
|
||||
int drawable xml_selector_sound 0x7f0700b0
|
||||
int drawable xml_selector_toolshopbutton 0x7f0700b1
|
||||
int id action0 0x7f080000
|
||||
int id action_bar 0x7f080001
|
||||
int id action_bar_activity_content 0x7f080002
|
||||
@ -1009,78 +1010,80 @@ int string playershape_description_hypno_spiral 0x7f0d003f
|
||||
int string playershape_description_locked 0x7f0d0040
|
||||
int string playershape_description_pacman 0x7f0d0041
|
||||
int string playershape_description_smiley 0x7f0d0042
|
||||
int string playershape_description_sun 0x7f0d0043
|
||||
int string playershape_description_wheel 0x7f0d0044
|
||||
int string playershape_name_ball 0x7f0d0045
|
||||
int string playershape_name_blue 0x7f0d0046
|
||||
int string playershape_name_clock 0x7f0d0047
|
||||
int string playershape_name_hypno_spiral 0x7f0d0048
|
||||
int string playershape_name_locked 0x7f0d0049
|
||||
int string playershape_name_pacman 0x7f0d004a
|
||||
int string playershape_name_smiley 0x7f0d004b
|
||||
int string playershape_name_sun 0x7f0d004c
|
||||
int string playershape_name_wheel 0x7f0d004d
|
||||
int string pre_start_screen_loading 0x7f0d004e
|
||||
int string price_button_buy 0x7f0d004f
|
||||
int string price_button_upgrade 0x7f0d0050
|
||||
int string s1 0x7f0d0051
|
||||
int string s2 0x7f0d0052
|
||||
int string s3 0x7f0d0053
|
||||
int string s4 0x7f0d0054
|
||||
int string s5 0x7f0d0055
|
||||
int string s6 0x7f0d0056
|
||||
int string s7 0x7f0d0057
|
||||
int string settings_credits 0x7f0d0058
|
||||
int string settings_music 0x7f0d0059
|
||||
int string settings_reset 0x7f0d005a
|
||||
int string settings_show_fps 0x7f0d005b
|
||||
int string settings_sounds 0x7f0d005c
|
||||
int string short_menu_continue 0x7f0d005d
|
||||
int string short_menu_exit 0x7f0d005e
|
||||
int string start_screen_finish_world_1 0x7f0d005f
|
||||
int string start_screen_gain_90_ep 0x7f0d0060
|
||||
int string start_screen_play 0x7f0d0061
|
||||
int string start_screen_to_gl_test_screen 0x7f0d0062
|
||||
int string start_screen_unlock_all_levels 0x7f0d0063
|
||||
int string status_bar_notification_info_overflow 0x7f0d0064
|
||||
int string task_collect_energy_format_d 0x7f0d0065
|
||||
int string task_collect_energy_progress_format_ddd 0x7f0d0066
|
||||
int string task_collect_stars_format_d 0x7f0d0067
|
||||
int string task_collect_stars_progress_format_ddd 0x7f0d0068
|
||||
int string task_complete_world_format_d 0x7f0d0069
|
||||
int string task_empty 0x7f0d006a
|
||||
int string tool_description_bomb 0x7f0d006b
|
||||
int string tool_description_locked_format_d 0x7f0d006c
|
||||
int string tool_description_magnet 0x7f0d006d
|
||||
int string tool_description_power_mushroom 0x7f0d006e
|
||||
int string tool_description_ramp 0x7f0d006f
|
||||
int string tool_description_spring 0x7f0d0070
|
||||
int string tool_description_stasis 0x7f0d0071
|
||||
int string tool_level_format_d 0x7f0d0072
|
||||
int string tool_name_bomb 0x7f0d0073
|
||||
int string tool_name_locked 0x7f0d0074
|
||||
int string tool_name_magnet 0x7f0d0075
|
||||
int string tool_name_power_mushroom 0x7f0d0076
|
||||
int string tool_name_ramp 0x7f0d0077
|
||||
int string tool_name_spring 0x7f0d0078
|
||||
int string tool_name_stasis 0x7f0d0079
|
||||
int string topbar_level_format_d 0x7f0d007a
|
||||
int string topbar_level_placeholder 0x7f0d007b
|
||||
int string tutorial_leveled_up_to_toolshop 0x7f0d007c
|
||||
int string tutorial_place_ramp_air 0x7f0d007d
|
||||
int string tutorial_place_ramp_air_2 0x7f0d007e
|
||||
int string tutorial_place_ramp_gap 0x7f0d007f
|
||||
int string tutorial_place_ramp_obstacle 0x7f0d0080
|
||||
int string tutorial_place_tools 0x7f0d0081
|
||||
int string tutorial_placeholder 0x7f0d0082
|
||||
int string tutorial_spring_equipped 0x7f0d0083
|
||||
int string tutorial_switch_tools_switch 0x7f0d0084
|
||||
int string tutorial_switch_tools_two_neccessary 0x7f0d0085
|
||||
int string tutorial_welcome 0x7f0d0086
|
||||
int string unlock_message_placeholder 0x7f0d0087
|
||||
int string world_button_count_format_dd 0x7f0d0088
|
||||
int string world_button_progress_placeholder 0x7f0d0089
|
||||
int string world_button_title_placeholder 0x7f0d008a
|
||||
int string playershape_description_soccer 0x7f0d0043
|
||||
int string playershape_description_sun 0x7f0d0044
|
||||
int string playershape_description_wheel 0x7f0d0045
|
||||
int string playershape_name_ball 0x7f0d0046
|
||||
int string playershape_name_blue 0x7f0d0047
|
||||
int string playershape_name_clock 0x7f0d0048
|
||||
int string playershape_name_hypno_spiral 0x7f0d0049
|
||||
int string playershape_name_locked 0x7f0d004a
|
||||
int string playershape_name_pacman 0x7f0d004b
|
||||
int string playershape_name_smiley 0x7f0d004c
|
||||
int string playershape_name_soccer 0x7f0d004d
|
||||
int string playershape_name_sun 0x7f0d004e
|
||||
int string playershape_name_wheel 0x7f0d004f
|
||||
int string pre_start_screen_loading 0x7f0d0050
|
||||
int string price_button_buy 0x7f0d0051
|
||||
int string price_button_upgrade 0x7f0d0052
|
||||
int string s1 0x7f0d0053
|
||||
int string s2 0x7f0d0054
|
||||
int string s3 0x7f0d0055
|
||||
int string s4 0x7f0d0056
|
||||
int string s5 0x7f0d0057
|
||||
int string s6 0x7f0d0058
|
||||
int string s7 0x7f0d0059
|
||||
int string settings_credits 0x7f0d005a
|
||||
int string settings_music 0x7f0d005b
|
||||
int string settings_reset 0x7f0d005c
|
||||
int string settings_show_fps 0x7f0d005d
|
||||
int string settings_sounds 0x7f0d005e
|
||||
int string short_menu_continue 0x7f0d005f
|
||||
int string short_menu_exit 0x7f0d0060
|
||||
int string start_screen_finish_world_1 0x7f0d0061
|
||||
int string start_screen_gain_90_ep 0x7f0d0062
|
||||
int string start_screen_play 0x7f0d0063
|
||||
int string start_screen_to_gl_test_screen 0x7f0d0064
|
||||
int string start_screen_unlock_all_levels 0x7f0d0065
|
||||
int string status_bar_notification_info_overflow 0x7f0d0066
|
||||
int string task_collect_energy_format_d 0x7f0d0067
|
||||
int string task_collect_energy_progress_format_ddd 0x7f0d0068
|
||||
int string task_collect_stars_format_d 0x7f0d0069
|
||||
int string task_collect_stars_progress_format_ddd 0x7f0d006a
|
||||
int string task_complete_world_format_d 0x7f0d006b
|
||||
int string task_empty 0x7f0d006c
|
||||
int string tool_description_bomb 0x7f0d006d
|
||||
int string tool_description_locked_format_d 0x7f0d006e
|
||||
int string tool_description_magnet 0x7f0d006f
|
||||
int string tool_description_power_mushroom 0x7f0d0070
|
||||
int string tool_description_ramp 0x7f0d0071
|
||||
int string tool_description_spring 0x7f0d0072
|
||||
int string tool_description_stasis 0x7f0d0073
|
||||
int string tool_level_format_d 0x7f0d0074
|
||||
int string tool_name_bomb 0x7f0d0075
|
||||
int string tool_name_locked 0x7f0d0076
|
||||
int string tool_name_magnet 0x7f0d0077
|
||||
int string tool_name_power_mushroom 0x7f0d0078
|
||||
int string tool_name_ramp 0x7f0d0079
|
||||
int string tool_name_spring 0x7f0d007a
|
||||
int string tool_name_stasis 0x7f0d007b
|
||||
int string topbar_level_format_d 0x7f0d007c
|
||||
int string topbar_level_placeholder 0x7f0d007d
|
||||
int string tutorial_leveled_up_to_toolshop 0x7f0d007e
|
||||
int string tutorial_place_ramp_air 0x7f0d007f
|
||||
int string tutorial_place_ramp_air_2 0x7f0d0080
|
||||
int string tutorial_place_ramp_gap 0x7f0d0081
|
||||
int string tutorial_place_ramp_obstacle 0x7f0d0082
|
||||
int string tutorial_place_tools 0x7f0d0083
|
||||
int string tutorial_placeholder 0x7f0d0084
|
||||
int string tutorial_spring_equipped 0x7f0d0085
|
||||
int string tutorial_switch_tools_switch 0x7f0d0086
|
||||
int string tutorial_switch_tools_two_neccessary 0x7f0d0087
|
||||
int string tutorial_welcome 0x7f0d0088
|
||||
int string unlock_message_placeholder 0x7f0d0089
|
||||
int string world_button_count_format_dd 0x7f0d008a
|
||||
int string world_button_progress_placeholder 0x7f0d008b
|
||||
int string world_button_title_placeholder 0x7f0d008c
|
||||
int style AlertDialog_AppCompat 0x7f0e0000
|
||||
int style AlertDialog_AppCompat_Light 0x7f0e0001
|
||||
int style Animation_AppCompat_Dialog 0x7f0e0002
|
||||
|
@ -135,7 +135,9 @@ public class Player extends Entity {
|
||||
@Override
|
||||
public void move(Vector movement) {
|
||||
super.move(movement);
|
||||
rotate(movement.x * ROTATION_SPEED);
|
||||
float circumference = 2 * 3.14f * RADIUS;
|
||||
float rotation = -360 * (movement.x / circumference);
|
||||
rotate(rotation);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,22 +13,24 @@ import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
|
||||
public enum PlayerShape {
|
||||
BALL(R.string.playershape_name_ball, R.string.playershape_description_ball,
|
||||
R.drawable.playershapes_ball, new EmptyTask()),
|
||||
HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral,
|
||||
R.string.playershape_description_hypno_spiral, R.drawable.playershapes_hypno_spiral,
|
||||
new CollectEnergyTask(5)),
|
||||
R.drawable.playershapes_ball, true, new EmptyTask()),
|
||||
CLOCK(R.string.playershape_name_clock, R.string.playershape_description_clock,
|
||||
R.drawable.playershapes_clock, new CollectStarTask(15)),
|
||||
SUN(R.string.playershape_name_sun, R.string.playershape_description_sun,
|
||||
R.drawable.playershapes_sun, new CollectEnergyTask(25)),
|
||||
R.drawable.playershapes_clock, true, new CollectStarTask(15)),
|
||||
SMILEY(R.string.playershape_name_smiley, R.string.playershape_description_smiley,
|
||||
R.drawable.playershapes_smiley, new CollectStarTask(50)),
|
||||
PACMAN(R.string.playershape_name_pacman, R.string.playershape_description_pacman,
|
||||
R.drawable.playershapes_pacman, new CompleteWorldTask(1)),
|
||||
R.drawable.playershapes_smiley, true, new CollectStarTask(50)),
|
||||
WHEEL(R.string.playershape_name_wheel, R.string.playershape_description_wheel,
|
||||
R.drawable.playershapes_wheel, new CollectStarTask(80)),
|
||||
R.drawable.playershapes_wheel, true, new CollectStarTask(80)),
|
||||
|
||||
PACMAN(R.string.playershape_name_pacman, R.string.playershape_description_pacman,
|
||||
R.drawable.playershapes_pacman, false, new CompleteWorldTask(1)),
|
||||
SOCCER(R.string.playershape_name_soccer, R.string.playershape_description_soccer, R.drawable.playershapes_soccer, false, new CompleteWorldTask(2)),
|
||||
HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral,
|
||||
R.string.playershape_description_hypno_spiral, R.drawable.playershapes_hypno_spiral, false,
|
||||
new CollectEnergyTask(5)),
|
||||
BLUE(R.string.playershape_name_blue, R.string.playershape_description_blue,
|
||||
R.drawable.jury_playershapes_ball_omg_im_blue, new CompleteWorldTask(2));
|
||||
R.drawable.playershapes_blue, false, new CollectEnergyTask(20)),
|
||||
SUN(R.string.playershape_name_sun, R.string.playershape_description_sun,
|
||||
R.drawable.playershapes_sun, false, new CollectEnergyTask(30));
|
||||
|
||||
@StringRes
|
||||
private int nameId;
|
||||
@ -36,14 +38,16 @@ public enum PlayerShape {
|
||||
private int descriptionId;
|
||||
@DrawableRes
|
||||
private int drawableId;
|
||||
private boolean inTopRow;
|
||||
private Task unlockTask;
|
||||
|
||||
private Texture texture;
|
||||
|
||||
PlayerShape(@StringRes int nameId, @StringRes int descriptionId, @DrawableRes int drawableId, Task unlockTask) {
|
||||
PlayerShape(@StringRes int nameId, @StringRes int descriptionId, @DrawableRes int drawableId, boolean inTopRow, Task unlockTask) {
|
||||
this.nameId = nameId;
|
||||
this.descriptionId = descriptionId;
|
||||
this.drawableId = drawableId;
|
||||
this.inTopRow = inTopRow;
|
||||
this.unlockTask = unlockTask;
|
||||
}
|
||||
|
||||
@ -80,4 +84,8 @@ public enum PlayerShape {
|
||||
public Texture getTexture() {
|
||||
return texture;
|
||||
}
|
||||
|
||||
public boolean isInTopRow() {
|
||||
return inTopRow;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ public class Bomb extends Tool {
|
||||
animation.setLooping(false);
|
||||
animation.setRequiredDelta(
|
||||
(int) (ToolType.BOMB.getCurrentUpgradeValue(ToolUpgradeType.DURATION) / 3f));
|
||||
super.setFloating(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,7 +28,6 @@ public class MyGlSurfaceView extends GLSurfaceView {
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
GameLog.i("TouchEvent!!!");
|
||||
renderer.onTouch(event.getX(), event.getY());
|
||||
}
|
||||
return true;
|
||||
|
@ -19,7 +19,6 @@ import de.frajul.endlessroll.entities.collision.geometry.Circle;
|
||||
import de.frajul.endlessroll.entities.tileLists.Ceiling;
|
||||
import de.frajul.endlessroll.entities.tileLists.Terrain;
|
||||
import de.frajul.endlessroll.entities.tileLists.Tile;
|
||||
import de.frajul.endlessroll.entities.tools.Bomb;
|
||||
import de.frajul.endlessroll.entities.tools.Tool;
|
||||
import de.frajul.endlessroll.main.game.GameScene;
|
||||
import de.frajul.endlessroll.main.game.Scene;
|
||||
@ -31,7 +30,6 @@ import de.frajul.endlessroll.main.game.Timer;
|
||||
public class Physics {
|
||||
|
||||
public final float GRAVITY_FORCE = .0000025f;
|
||||
private final float TOOL_ON_OBSTACLE_LEFT_EDGE_TOLERANCE = 0.05f;
|
||||
private CollisionDetector detector;
|
||||
|
||||
public Physics() {
|
||||
@ -63,28 +61,17 @@ public class Physics {
|
||||
public synchronized void checkSingleToolCollision(Tool tool, Scene scene) {
|
||||
if (tool.isFloating())
|
||||
return;
|
||||
float terrainEdge = getTerrainEdge(tool, scene.getTerrain());
|
||||
Obstacle toolIsCollidingWith = getHighestObstacleToolIsCollidingWith(tool, scene);
|
||||
|
||||
if (toolIsCollidingWith != null) {
|
||||
float distObstTool = tool.getRightEdge() - toolIsCollidingWith.getLeftEdge();
|
||||
if (distObstTool < TOOL_ON_OBSTACLE_LEFT_EDGE_TOLERANCE) {
|
||||
tool.getPosition().x -= TOOL_ON_OBSTACLE_LEFT_EDGE_TOLERANCE;
|
||||
terrainEdge = getTerrainEdge(tool, scene.getTerrain());
|
||||
toolIsCollidingWith = getHighestObstacleToolIsCollidingWith(tool, scene);
|
||||
}
|
||||
boolean collidingWithTerrain = isToolCollidingWithTerrain(tool, scene.getTerrain());
|
||||
if (collidingWithTerrain) {
|
||||
tool.getMovement().y = 0;
|
||||
tool.setToTerrain(scene.getTerrain().getEdge());
|
||||
}
|
||||
|
||||
float orientingHeight = terrainEdge;
|
||||
if (toolIsCollidingWith != null)
|
||||
orientingHeight = Math.max(toolIsCollidingWith.getTopEdge(), terrainEdge);
|
||||
|
||||
if (tool.getBottomEdge() <= orientingHeight) {
|
||||
Obstacle collidingObstacle = getHighestObstacleToolIsCollidingWith(tool, scene);
|
||||
if (collidingObstacle != null && tool.getBottomEdge() <= collidingObstacle.getTopEdge()) {
|
||||
tool.getMovement().y = 0;
|
||||
if (tool instanceof Bomb)
|
||||
tool.setFloating(true);
|
||||
else
|
||||
tool.setToTerrain(orientingHeight);
|
||||
tool.setToTerrain(collidingObstacle.getTopEdge());
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,17 +92,12 @@ public class Physics {
|
||||
return highest;
|
||||
}
|
||||
|
||||
private float getTerrainEdge(Entity tool, Terrain terrain) {
|
||||
for (Tile instance : terrain) {
|
||||
if ((tool.getLeftEdge() >= instance.getLeftEdge() && tool.getLeftEdge() <= instance
|
||||
.getRightEdge()) || (tool.getRightEdge() <= instance.getRightEdge() && tool
|
||||
.getRightEdge() >= instance.getLeftEdge()) || (instance.getLeftEdge() >= tool
|
||||
.getLeftEdge() && instance.getLeftEdge() <= tool.getRightEdge()) || (instance
|
||||
.getRightEdge() <= tool.getRightEdge() && instance.getRightEdge() >= tool
|
||||
.getLeftEdge()))
|
||||
return terrain.getEdge();
|
||||
private boolean isToolCollidingWithTerrain(Entity tool, Terrain terrain) {
|
||||
for (Tile tile : terrain) {
|
||||
if (detector.isCollision(tool, tile))
|
||||
return true;
|
||||
}
|
||||
return -10;
|
||||
return false;
|
||||
}
|
||||
|
||||
public PlayerCollisionData getPlayerCollisionData(GameScene scene) {
|
||||
|
@ -41,14 +41,13 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
params.setMargins(30, 0, 30, 0);
|
||||
|
||||
int i = 0;
|
||||
for (PlayerShape playerShape : PlayerShape.values()) {
|
||||
playerShape.getUnlockTask().update(gameActivity.getLevelManager());
|
||||
boolean locked = !playerShape.getUnlockTask()
|
||||
.isConditionFulfilled();
|
||||
PlayerShapeButton button = new PlayerShapeButton(gameActivity, playerShape, this,
|
||||
locked);
|
||||
if (i % 2 == 0)
|
||||
if (playerShape.isInTopRow())
|
||||
topRow.addView(button.getView(), params);
|
||||
else
|
||||
bottomRow.addView(button.getView(), params);
|
||||
@ -57,8 +56,6 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
|
||||
this.activeButton = button;
|
||||
button.startRotating();
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
shapeInspector.update(activeButton.getPlayerShape(), activeButton.isLocked());
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
Binary file not shown.
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@ -11,6 +11,7 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="10dp"
|
||||
android:visibility="invisible"
|
||||
android:src="@drawable/guis_pausebutton"/>
|
||||
|
||||
<TextView
|
||||
@ -21,6 +22,7 @@
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/game_playerprogress_placeholder"
|
||||
android:visibility="invisible"
|
||||
android:textColor="@color/secondary"
|
||||
android:textSize="22sp"/>
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="@string/start_screen_gain_90_ep"
|
||||
android:visibility="invisible"/>
|
||||
android:visibility="invisible"/>l
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_finish_world_1"
|
||||
|
@ -17,7 +17,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:scrollbars="none"
|
||||
|
@ -25,6 +25,7 @@
|
||||
<string name="playershape_name_clock">Uhr</string>
|
||||
<string name="playershape_name_hypno_spiral">Hypnose</string>
|
||||
<string name="playershape_name_pacman">Pacman</string>
|
||||
<string name="playershape_name_soccer">Fußball</string>
|
||||
<string name="playershape_name_smiley">Smiley</string>
|
||||
<string name="playershape_name_wheel">Reifen</string>
|
||||
<string name="playershape_name_sun">Sonne</string>
|
||||
@ -78,4 +79,5 @@
|
||||
<string name="settings_show_fps">Fps anzeigen</string>
|
||||
<string name="playershape_name_blue">Blau</string>
|
||||
<string name="playershape_description_blue">Warum bin ich blau?</string>
|
||||
<string name="playershape_description_soccer">Fuß. Ball. Fußball!</string>
|
||||
</resources>
|
@ -50,6 +50,7 @@
|
||||
<string name="playershape_name_clock">Clock</string>
|
||||
<string name="playershape_name_hypno_spiral">Hypno</string>
|
||||
<string name="playershape_name_pacman">Pacman</string>
|
||||
<string name="playershape_name_soccer">Soccer</string>
|
||||
<string name="playershape_name_smiley">Smiley</string>
|
||||
<string name="playershape_name_wheel">Wheel</string>
|
||||
<string name="playershape_name_sun">Sun</string>
|
||||
@ -58,6 +59,7 @@
|
||||
<string name="playershape_description_ball" translatable="false">Keep calm and roll on</string>
|
||||
<string name="playershape_description_clock" translatable="false">Tick tack!</string>
|
||||
<string name="playershape_description_hypno_spiral">Hypnotizes you for more fun</string>
|
||||
<string name="playershape_description_soccer">Let\'s roll to the goal!</string>
|
||||
<string name="playershape_description_pacman" translatable="false">PACMAN!</string>
|
||||
<string name="playershape_description_smiley" translatable="false">Don\'t worry, roll happy!</string>
|
||||
<string name="playershape_description_wheel">A nice car without the... car</string>
|
||||
|
@ -1,6 +1,10 @@
|
||||
<resources>
|
||||
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||
<item name="colorAccent">@color/secondary</item>
|
||||
|
||||
<item name="android:buttonStyle">@style/GameButton</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user