Class StallingComponent

java.lang.Object
org.ngengine.components.StallingComponent
All Implemented Interfaces:
Component<Object>

public class StallingComponent extends Object implements Component<Object>
A component that is never enabled and does nothing.
  • Constructor Details

    • StallingComponent

      public StallingComponent()
  • Method Details

    • onEnable

      public void onEnable(ComponentManager mng, Runner runner, DataStoreProvider dataStore, boolean firstTime, Object arg)
      Description copied from interface: Component
      Called when the component is enabled. This is the most important method of the component lifecycle, where the component's main logic is implemented.

      This method is called when the component is enabled, all its dependencies are satisfied, the fragments are initialized, and the resources are loaded.

      Specified by:
      onEnable in interface Component<Object>
      Parameters:
      mng - - the ComponentManager to which this component is attached
      runner - - the Runner that executes the logic
      dataStore - - the DataStoreProvider for storing and retrieving data and caches
      firstTime - - whether this is the first time the component is being enabled
      arg - - an argument that can be passed when enabling this component, can be null
    • onDisable

      public void onDisable(ComponentManager mng, Runner runner, DataStoreProvider dataStore)
      Description copied from interface: Component
      Called when the component is disabled.

      This should undo anything that was done in Component.onEnable(org.ngengine.components.ComponentManager, org.ngengine.runner.Runner, org.ngengine.store.DataStoreProvider, boolean, T) and reset the component state to allow future re-enabling.

      This method is called when the component is explicitly disabled or when one of its dependencies is disabled.

      If $

      invalid reference
      #onDetach
      is not implemented, this method should take care of cleaning up all resources to prevent leaks.

      It is always called before an enabled component is detached from the ComponentManager.

      Specified by:
      onDisable in interface Component<Object>
      Parameters:
      mng -
      runner -
      dataStore -