Tabnine Logo
ActionComponent.getECSActions
Code IndexAdd Tabnine to your IDE (free)

How to use
getECSActions
method
in
com.cardshifter.modapi.actions.ActionComponent

Best Java code snippets using com.cardshifter.modapi.actions.ActionComponent.getECSActions (Showing top 4 results out of 315)

origin: Cardshifter/Cardshifter

public static List<ECSAction> getAllActions(ECSGame game) {
  return game.getEntitiesWithComponent(ActionComponent.class)
    .stream()
    .flatMap(entity -> entity.getComponent(ActionComponent.class)
        .getECSActions().stream())
    .collect(Collectors.toList());
}
origin: Cardshifter/Cardshifter

private static Stream<ECSAction> getAllActions(ECSGame game) {
  return game.getEntitiesWithComponent(ActionComponent.class)
    .stream()
    .flatMap(entity -> entity.getComponent(ActionComponent.class)
      .getECSActions().stream());
}

origin: Cardshifter/Cardshifter

/**
 * 
 * @param game The game to search for actions
 * @return A stream of action components for all entities in the game
 */
private static Stream<ECSAction> getAllActions(ECSGame game) {
  return game.getEntitiesWithComponent(ActionComponent.class)
    .stream()
    .flatMap(entity -> entity.getComponent(ActionComponent.class)
        .getECSActions().stream());
}

origin: Cardshifter/Cardshifter

public static List<ECSAction> getPossibleActionsOn(Entity entity, Entity performer) {
  return actions.required(entity).getECSActions().stream().filter(action -> action.isAllowed(performer)).collect(Collectors.toList());
}

com.cardshifter.modapi.actionsActionComponentgetECSActions

Popular methods of ActionComponent

  • <init>
  • addAction
  • getAction
  • getActions
  • removeAction

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now