Light

Description

Simulates actual light sources, providing illumination in scenes. It has two modes: point light and spot light. Point light is a light source that emits rays from a single point. Rays are emitted based on LigthRange in the form of a sphere. Spot light emits rays in the form of a cone with a certain apex and radius.

Properties

        string   Name
    The custom name of this object.

        string   ClassName
    The object-type name.

        RWObject   Parent
    The parent of this object.

        Vector3   Position
    Display the position of an object (global position and relative position).

        Vector3   Rotation
    The size of an object.

        Enum.LightComType   LigthComType
    Switch the mode of light source.

        Vector3   LigthColor
    Change the color of light source.

        float   LightIntensity
    Used to adjust the intensity of light source.

        float   LightIntensityMultiplier
    Used to adjust the reflection intensity of light source.

        float   LigthRange
    Used to adjust the light range.

        float   LigthSpotAngle
    Used to adjust the light angle.

        string   Cookie
    Used to change the cookie.

        float   CookieSize
    Used to change the cookie size.

        bool   EnableComponent
    Used to control whether the light source is enabled.

        Enum.LightShadows   LigthShadows
    Used to switch the shadow type.

        float   LigthShadowStrength
    Used to adjust the shadow strength.

        Enum.LightShadowResolution   LigthShadowResolution
    Used to adjust the shadow resolution.

      Vector3  WorldPosition
    Global position.

      Vector3  WorldRotation
    Global direction.

Functions

    RWObject.Create(classname)
    A special function, creating an instance of the specified class.

    DelAllChild()
    Deletes all child objects.

    Clone()
    Clones an object to create a copy.

    Destroy()
    Delete objects.

    GetAncestorByName(Name)
    Returns the object's first parent node with the same name.

    GetAncestorByClassName(className)
    Returns the object's first parent node of the same class.

    GetChildByName(Name,recursive)
    Returns the object's first child object with the same name. If the second parameter is true, it will search through descendants of all hierarchies.

    GetChildByClassName(className,recursive)
    Returns the object's first child object of the same type. If the second parameter is true, it will search through descendants of all hierarchies.

    GetAllChild()
    Seeks all its child objects and returns as a list.

    GetAllDescendant()
    Recursively seeks all its descendants and returns as a list.

    IsClass(ClassName)
    Judges whether it is the class the same as the given object class or not.

    IsAncestor(TarObj)
    Judges whether itself is the ancestor of the target object or not.

    IsDescendant(TarObj)
    Judges whether itself is the descendant of the target object or not.

    WaitForChild(childName,timeout)
    Seeks its own child object.

    Child(childName)
    Seeks its own child object by a given name.

    Equals(TarObj)
    Judges whether the target object is the same as itself or not.

Events

    ChildAdded(childobject)
    Triggered when a direct child object is added.

    ChildRemoved(childobject)
    Deletes all child objects.

    DescendantAdded(descendantobject)
    Triggered when a descendant is added.

    DescendantRemoved(descendantobject)
    Triggered when a descendant is removed.

    AncestryChanged(AncestryChanged)
    Triggered when the ancestry is changed.