LightingApi class
API used to configure lighting in a component.
Constructors
- LightingApi(GameComponent _comp)
Properties
- angle ↔ double
-
Used to define rotation angle.
getter/setter pair
- config → LightingConfig?
-
Current lighting configuration.
no setter
- enabled ↔ bool
-
Used to enable and disable light.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAnimating → bool
-
Whether a animateTo transition is currently running.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
animateTo(
LightingConfig config, {Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.decelerate}) → void -
Animates the current configuration to
config. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setup(
LightingConfig? config) → void - Sets the lighting configuration immediately, cancelling any running transition.
-
stopAnimation(
) → void - Stops a running animateTo transition, keeping the current state.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
double dt) → void - Updates lighting state. Should be called by the component's update.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited