# Class LevelLight

java.lang.Object
com.codename1.gaming.level.LevelLight

public class LevelLight extends Object
A serializable directional light authored in a 3D `GameLevel`: a direction, a diffuse `#getColor()` and an `#getAmbientColor()`. A `GameSceneView` copies the level's primary light onto the `GameView`'s shared `com.codename1.gpu.Light`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LevelLight()`
  `LevelLight(float dirX, float dirY, float dirZ, int color, int ambientColor)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getAmbientColor()`
  `int`
  `getColor()`
  `float`
  `getDirectionX()`
  `float`
  `getDirectionY()`
  `float`
  `getDirectionZ()`
  `LevelLight`
  `setAmbientColor(int ambientColor)`
  `LevelLight`
  `setColor(int color)`
  `LevelLight`
  `setDirection(float x, float y, float z)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LevelLight

    public LevelLight()

  - ### LevelLight

    public LevelLight(float dirX, float dirY, float dirZ, int color, int ambientColor)

- ## Method Details

  - ### getDirectionX

    public float getDirectionX()

  - ### getDirectionY

    public float getDirectionY()

  - ### getDirectionZ

    public float getDirectionZ()

  - ### setDirection

    public LevelLight setDirection(float x, float y, float z)

  - ### getColor

    public int getColor()

  - ### setColor

    public LevelLight setColor(int color)

  - ### getAmbientColor

    public int getAmbientColor()

  - ### setAmbientColor

    public LevelLight setAmbientColor(int ambientColor)