Environment

Description

Used to edit ambient light, sky box and other parameters affecting the environment.

Properties

        string    Name
    The custom name of this object.

        string    ClassName
    The object-type name.

        RWObject    Parent
    The parent of this object.

        Enum.LightingComType    LightingMode
    Used to switch the ambient light mode.

        float    AmbientIntensity
    Used to adjust the ambient light intensity.

        Vector3    AmbientLight
    Used to change the ambient light color.

        Vector3    AmbientSkyColor
    Change the sky color.

        Vector3    AmbientEquatorColor
    Used to change the skyline color.

        Vector3    AmbientGroundColor
    Used to change the ground color.

        float    ReflectionIntensity
    Indirect light intensity of scattering and reflection

        Enum.SkyBoxType    SkyMaterialID
    Used to switch the skybox.

        string    FrontTexture
    Used to replace the texture in the front of the skybox.

        string    BackTexture
    Used to replace the texture at the back of the skybox.

        string    LeftTexture
    Used to replace the texture on the left of the skybox.

        string    RightTexture
    Used to replace the texture on the right of the skybox.

        string    UpTexture
    Used to replace the texture at the top of the skybox.

        string    DownTexture
    Used to replace the texture at the bottom of the skybox.

        bool    EnableFog
    Simulate fog effect.

        RGBColor    FogColor
    Fog color.

        float    FogStartDistance
    Fog start position when taking the camera as origin.

        float    FogEndDistance
    Fog end position when taking the camera as origin.

Functions

    DelAllChild()
    Deletes all child objects.

    Clone()
    Clones an object to create a copy.

    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.

    GetMaterialName()
    Retrieves the name of its own material. Temporarily cannot used for the terrain.

    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 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.