component.enginecomponent - ICE 0.1 API documentation

ICE 0.1 API documentation

# component.enginecomponent

Component that provides movement capability to an entity.

struct EngineComponent;

  Component that provides movement capability to an entity.

  float maxSpeed;

    Maximum speed of the entity.

  float acceleration;

    Acceleration in units per second. Negative means instant acceleration,

  Vector2f accelerationDirection;

    Direction to apply acceleration in.

    In entity space, not world space.
    Usually a unit directional or zero (not accelerating) vector.

  const pure nothrow @property bool instantAcceleration();

    Is acceleration instant?

  this(ref Node yaml);

    Load from a YAML node. Throws YAMLException on error.

  pure nothrow this(const(float) maxSpeed, const(float) acceleration);

    Construct manually.

    Note that if acceleration is set to a negative value, it is instant.

Copyright © Ferdinand Majerech 2011. | Page generated by AutoDDoc and Ddoc.