First implementation of stasis field
This commit is contained in:
parent
f756e1d939
commit
623abdc271
File diff suppressed because one or more lines are too long
@ -526,34 +526,36 @@ int drawable tools_ramp 0x7f070077
|
||||
int drawable tools_ramp_button 0x7f070078
|
||||
int drawable tools_spring 0x7f070079
|
||||
int drawable tools_spring_button 0x7f07007a
|
||||
int drawable tutorial_place_ramp_air_1 0x7f07007b
|
||||
int drawable tutorial_place_ramp_gap 0x7f07007c
|
||||
int drawable tutorial_place_ramp_obstacle 0x7f07007d
|
||||
int drawable tutorial_place_tools 0x7f07007e
|
||||
int drawable tutorial_to_toolshop 0x7f07007f
|
||||
int drawable tutorial_toolbar 0x7f070080
|
||||
int drawable tutorial_toolshop_all_tools 0x7f070081
|
||||
int drawable tutorial_toolshop_equip_spring 0x7f070082
|
||||
int drawable tutorial_toolshop_inspector 0x7f070083
|
||||
int drawable tutorial_toolshop_select_buy_spring 0x7f070084
|
||||
int drawable tutorial_toolshop_toolbar 0x7f070085
|
||||
int drawable world_previews_grass 0x7f070086
|
||||
int drawable xml_background_bountymessage 0x7f070087
|
||||
int drawable xml_background_dialog_button 0x7f070088
|
||||
int drawable xml_background_exit_confirm_dialog 0x7f070089
|
||||
int drawable xml_background_levelbutton 0x7f07008a
|
||||
int drawable xml_background_toolslot 0x7f07008b
|
||||
int drawable xml_background_toolupgrade 0x7f07008c
|
||||
int drawable xml_background_tutorialtextview 0x7f07008d
|
||||
int drawable xml_background_worldbutton 0x7f07008e
|
||||
int drawable xml_layers_toolprogressbar 0x7f07008f
|
||||
int drawable xml_selector_gamebutton 0x7f070090
|
||||
int drawable xml_selector_pricebutton 0x7f070091
|
||||
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 drawable tools_stasis 0x7f07007b
|
||||
int drawable tools_stasis_button 0x7f07007c
|
||||
int drawable tutorial_place_ramp_air_1 0x7f07007d
|
||||
int drawable tutorial_place_ramp_gap 0x7f07007e
|
||||
int drawable tutorial_place_ramp_obstacle 0x7f07007f
|
||||
int drawable tutorial_place_tools 0x7f070080
|
||||
int drawable tutorial_to_toolshop 0x7f070081
|
||||
int drawable tutorial_toolbar 0x7f070082
|
||||
int drawable tutorial_toolshop_all_tools 0x7f070083
|
||||
int drawable tutorial_toolshop_equip_spring 0x7f070084
|
||||
int drawable tutorial_toolshop_inspector 0x7f070085
|
||||
int drawable tutorial_toolshop_select_buy_spring 0x7f070086
|
||||
int drawable tutorial_toolshop_toolbar 0x7f070087
|
||||
int drawable world_previews_grass 0x7f070088
|
||||
int drawable xml_background_bountymessage 0x7f070089
|
||||
int drawable xml_background_dialog_button 0x7f07008a
|
||||
int drawable xml_background_exit_confirm_dialog 0x7f07008b
|
||||
int drawable xml_background_levelbutton 0x7f07008c
|
||||
int drawable xml_background_toolslot 0x7f07008d
|
||||
int drawable xml_background_toolupgrade 0x7f07008e
|
||||
int drawable xml_background_tutorialtextview 0x7f07008f
|
||||
int drawable xml_background_worldbutton 0x7f070090
|
||||
int drawable xml_layers_toolprogressbar 0x7f070091
|
||||
int drawable xml_selector_gamebutton 0x7f070092
|
||||
int drawable xml_selector_pricebutton 0x7f070093
|
||||
int drawable xml_selector_settingsbutton 0x7f070094
|
||||
int drawable xml_selector_shapeshopbutton 0x7f070095
|
||||
int drawable xml_selector_sound 0x7f070096
|
||||
int drawable xml_selector_toolshopbutton 0x7f070097
|
||||
int drawable xml_shape_inspector_checkbox 0x7f070098
|
||||
int id action0 0x7f080000
|
||||
int id action_bar 0x7f080001
|
||||
int id action_bar_activity_content 0x7f080002
|
||||
@ -927,42 +929,44 @@ int string tool_description_magnet 0x7f0d0054
|
||||
int string tool_description_power_mushroom 0x7f0d0055
|
||||
int string tool_description_ramp 0x7f0d0056
|
||||
int string tool_description_spring 0x7f0d0057
|
||||
int string tool_level_format_d 0x7f0d0058
|
||||
int string tool_name_bomb 0x7f0d0059
|
||||
int string tool_name_locked 0x7f0d005a
|
||||
int string tool_name_magnet 0x7f0d005b
|
||||
int string tool_name_power_mushroom 0x7f0d005c
|
||||
int string tool_name_ramp 0x7f0d005d
|
||||
int string tool_name_spring 0x7f0d005e
|
||||
int string tool_upgrade_force 0x7f0d005f
|
||||
int string tool_upgrade_none 0x7f0d0060
|
||||
int string tool_upgrade_radius 0x7f0d0061
|
||||
int string tool_upgrade_time 0x7f0d0062
|
||||
int string tool_upgrade_title_format_sd 0x7f0d0063
|
||||
int string tool_upgrade_title_placeholder 0x7f0d0064
|
||||
int string tool_upgrade_value_max 0x7f0d0065
|
||||
int string topbar_level_format_d 0x7f0d0066
|
||||
int string topbar_level_placeholder 0x7f0d0067
|
||||
int string topbar_toolshop 0x7f0d0068
|
||||
int string tutorial_leveled_up 0x7f0d0069
|
||||
int string tutorial_place_ramp_air 0x7f0d006a
|
||||
int string tutorial_place_ramp_air_2 0x7f0d006b
|
||||
int string tutorial_place_ramp_gap 0x7f0d006c
|
||||
int string tutorial_place_ramp_obstacle 0x7f0d006d
|
||||
int string tutorial_place_tools 0x7f0d006e
|
||||
int string tutorial_placeholder 0x7f0d006f
|
||||
int string tutorial_to_toolshop 0x7f0d0070
|
||||
int string tutorial_toolbar 0x7f0d0071
|
||||
int string tutorial_toolshop_all_tools 0x7f0d0072
|
||||
int string tutorial_toolshop_equip_spring 0x7f0d0073
|
||||
int string tutorial_toolshop_inspector 0x7f0d0074
|
||||
int string tutorial_toolshop_select_buy_spring 0x7f0d0075
|
||||
int string tutorial_toolshop_toolbar 0x7f0d0076
|
||||
int string tutorial_toolshop_welcome 0x7f0d0077
|
||||
int string tutorial_welcome 0x7f0d0078
|
||||
int string unlock_message_placeholder 0x7f0d0079
|
||||
int string world_button_progress_placeholder 0x7f0d007a
|
||||
int string world_button_title_placeholder 0x7f0d007b
|
||||
int string tool_description_stasis 0x7f0d0058
|
||||
int string tool_level_format_d 0x7f0d0059
|
||||
int string tool_name_bomb 0x7f0d005a
|
||||
int string tool_name_locked 0x7f0d005b
|
||||
int string tool_name_magnet 0x7f0d005c
|
||||
int string tool_name_power_mushroom 0x7f0d005d
|
||||
int string tool_name_ramp 0x7f0d005e
|
||||
int string tool_name_spring 0x7f0d005f
|
||||
int string tool_name_stasis 0x7f0d0060
|
||||
int string tool_upgrade_force 0x7f0d0061
|
||||
int string tool_upgrade_none 0x7f0d0062
|
||||
int string tool_upgrade_radius 0x7f0d0063
|
||||
int string tool_upgrade_time 0x7f0d0064
|
||||
int string tool_upgrade_title_format_sd 0x7f0d0065
|
||||
int string tool_upgrade_title_placeholder 0x7f0d0066
|
||||
int string tool_upgrade_value_max 0x7f0d0067
|
||||
int string topbar_level_format_d 0x7f0d0068
|
||||
int string topbar_level_placeholder 0x7f0d0069
|
||||
int string topbar_toolshop 0x7f0d006a
|
||||
int string tutorial_leveled_up 0x7f0d006b
|
||||
int string tutorial_place_ramp_air 0x7f0d006c
|
||||
int string tutorial_place_ramp_air_2 0x7f0d006d
|
||||
int string tutorial_place_ramp_gap 0x7f0d006e
|
||||
int string tutorial_place_ramp_obstacle 0x7f0d006f
|
||||
int string tutorial_place_tools 0x7f0d0070
|
||||
int string tutorial_placeholder 0x7f0d0071
|
||||
int string tutorial_to_toolshop 0x7f0d0072
|
||||
int string tutorial_toolbar 0x7f0d0073
|
||||
int string tutorial_toolshop_all_tools 0x7f0d0074
|
||||
int string tutorial_toolshop_equip_spring 0x7f0d0075
|
||||
int string tutorial_toolshop_inspector 0x7f0d0076
|
||||
int string tutorial_toolshop_select_buy_spring 0x7f0d0077
|
||||
int string tutorial_toolshop_toolbar 0x7f0d0078
|
||||
int string tutorial_toolshop_welcome 0x7f0d0079
|
||||
int string tutorial_welcome 0x7f0d007a
|
||||
int string unlock_message_placeholder 0x7f0d007b
|
||||
int string world_button_progress_placeholder 0x7f0d007c
|
||||
int string world_button_title_placeholder 0x7f0d007d
|
||||
int style AlertDialog_AppCompat 0x7f0e0000
|
||||
int style AlertDialog_AppCompat_Light 0x7f0e0001
|
||||
int style Animation_AppCompat_Dialog 0x7f0e0002
|
||||
|
@ -0,0 +1,47 @@
|
||||
package de.frajul.endlessroll.entities.tools;
|
||||
|
||||
import de.frajul.endlessroll.data.Vector;
|
||||
import de.frajul.endlessroll.entities.DestroyEffect;
|
||||
import de.frajul.endlessroll.entities.Player;
|
||||
import de.frajul.endlessroll.entities.collision.geometry.Circle;
|
||||
import de.frajul.endlessroll.entities.collision.geometry.Geometry;
|
||||
import de.frajul.endlessroll.entities.particles.ParticleSource;
|
||||
import de.frajul.endlessroll.entities.particles.ParticleSystem;
|
||||
import de.frajul.endlessroll.main.game.Timer;
|
||||
|
||||
/**
|
||||
* Created by Julian on 11.02.2016.
|
||||
*/
|
||||
public class Stasis extends Tool {
|
||||
|
||||
private ParticleSource particleSource;
|
||||
|
||||
public Stasis(Vector position, ParticleSystem particleSystem) {
|
||||
super(ToolType.STASIS, position, .6f * ToolType.STASIS.getCurrentUpgradeValue(ToolUpgradeType.SIZE) / 100, .6f * ToolType.STASIS.getCurrentUpgradeValue(ToolUpgradeType.SIZE) / 100, false, false);
|
||||
animation.disable();
|
||||
super.setFloating(true);
|
||||
particleSource = new ParticleSource(new Vector(position), particleSystem.magnet);
|
||||
particleSource.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy(DestroyEffect destroyEffect) {
|
||||
super.destroy(destroyEffect);
|
||||
particleSource.kill();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerCollision(Player player, Timer timer) {
|
||||
player.getMovement().setY(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Geometry createWorldCollisionBounds() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Geometry createPlayerCollisionBounds() {
|
||||
return this;
|
||||
}
|
||||
}
|
@ -6,6 +6,6 @@ package de.frajul.endlessroll.entities.tools;
|
||||
|
||||
public enum ToolUpgradeType {
|
||||
|
||||
COOLDOWN, DURATION, FORCE, RANGE;
|
||||
COOLDOWN, DURATION, FORCE, RANGE, SIZE;
|
||||
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable/tools_stasis.png
Normal file
BIN
app/src/main/res/drawable/tools_stasis.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
BIN
app/src/main/res/drawable/tools_stasis_button.png
Normal file
BIN
app/src/main/res/drawable/tools_stasis_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
@ -74,12 +74,14 @@
|
||||
<string name="tool_description_magnet">Difficult to handle, but if you master it you can do anything</string>
|
||||
<string name="tool_description_bomb">Blow up all obstacles near the bomb</string>
|
||||
<string name="tool_description_power_mushroom">This will give you super-powers for a few seconds</string>
|
||||
<string name="tool_description_stasis">Freezes a certain area which leads to longer in-air time</string>
|
||||
<string name="tool_name_locked">\?\?\?</string>
|
||||
<string name="tool_name_ramp">Ramp</string>
|
||||
<string name="tool_name_spring">Spring</string>
|
||||
<string name="tool_name_magnet">Magnet</string>
|
||||
<string name="tool_name_bomb">Bomb</string>
|
||||
<string name="tool_name_power_mushroom">Mushroom</string>
|
||||
<string name="tool_name_stasis">Stasis</string>
|
||||
<string name="tool_level_format_d">Level: %d</string>
|
||||
<string name="tool_upgrade_title_format_sd">%1$s (Lv%2$d)</string>
|
||||
<string name="tool_upgrade_none">None</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user