Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public final class Abilities
- Object
- Abilities
Creates the stock abilities by name, as level files, power-ups and the editor
refer to them.
Methods
public static String[] heroOrder() | Every stock ability name, in a sensible processing order for a hero. |
public static Ability create(String name, int tileSize) | Creates an ability. |
public static Class<? extends Ability> typeOf(String name) | The class of the ability a name creates, for Actor#getAbility. |
Inherited methods
Method details
heroOrder
public static String[] heroOrder()Every stock ability name, in a sensible processing order for a hero.
Returns
a new array
create
public static Ability create(String name, int tileSize)Creates an ability.
Parameters
nameStringmove,jump,crouch,ladder,walljump,dash,jetpack,glide,swim,fly,look,weapon,swordorgriptileSizeint- the level’s tile size, fixed point, for size-relative tuning
Returns
the ability, or null for an unknown name
typeOf
public static Class<? extends Ability> typeOf(String name)The class of the ability a name creates, for
Actor#getAbility.Parameters
nameString- an ability name
Returns
the class, or null