界面初始化 Starter UI
- Class:StarterUI
服务对象 Service Object
此对象为服务对象,可以使用GetService()
函数获取此服务。UseGetService()
to obtain this service.
不可创建 Cannot create
无法使用RWObject:New(Classname)
创建此对象,也不在编辑器对象列表中显示。Cannot useRWObject:New(Classname)
to create this object. It will not display in editor object list either. bing
脚本可访问 Can access in script
此对象脚本可访问,但只有服务器脚本可访问 This object can be accessed from script, but only at server script
Properties
IsActivate 界面是否显示 bool
编辑状态下界面UI是否可见。
IsActivate Whether UI will display bool
Whether UI will display while editing
ScreenOrientationType 屏幕方向 Enum.ScreenOrientationType
界面的展示方向,包括横屏与竖屏,横屏以1920✖1080为设计分辨率,竖屏以1080✖1920为设计分辨率。
ScreenOrientationType Screen orientation Enum.ScreenOrientationType
Screen orientation including horizontal or vertical. 1920✖1080 pixels horizontal,1080✖1920 pixels vertical.
Inherited from RWObject:
Name 名称 string
该对象的自定义名称
Name string
The object’s customized name.
ClassName 类型 string
该对象对应的对象类型名称
ClassName string
The object’s corresponding object class name.
Parent 父级 RWObject
该对象的父级对象
Parent RWObject
The object’s parent object.
函数 Functions
Inherited from RWObject:
DelAllChild()
删除所有子对象
Delete all child objects.
Available()
检查对象是否可用
Check to see if object is available to use.
Clone(parent)
复制自身,若有参数则以参数为父级
Duplicate itself, if there is a parmeter, then set parameter as parent.
Destroy()
删除自身
Delete itself.
GetAncestorByName(Name)
通过对象名字寻找父级对象
Find parent object by object’s name.
GetAncestorByClassName(className)
通过对象类型寻找父级对象
Find parent object by object’s type.
GetChildByName(Name,recursive)
通过对象名字寻找子级对象
Find child object by object’s name.
GetChildByClassName(className,recursive)
通过对象类型寻找子级对象
Find child object by object type.
GetAllChild()
寻找自身所有子级对象,并作为一个列表返回
Find all child objects and return as a list.
GetAllDescendant()
递归寻找自身所有后代,并作为一个列表返回
Recursively find all descendants of itself and return as a list.
IsAncestor(TarObj)
判断自身是否为目标对象的祖先
Determine whether object itself is the ancestor of the target object.
IsDescendant(TarObj)
判断自身是否为目标对象的后代
Determine whether object itself is the descendant of the target object.
WaitForChild(childName,timeout)
寻找自身的子对象。如果没有子对象,在没有填写timeout参数时,会暂停进程直到找到子对象;如果填写了timeout参数,会根据参数时间暂停进程,超出参数时间后,进程照常进行
Find child of object. If child does not exist when there are no timeout parameters, the process will be paused until child is found. If there are timeout parameters, the process will pause based on the parameter, once process exceeds timeout parameters, the process will continue.
Child(childName)
根据给定的名字寻找自身的子对象
Find object’s child based on name.
Equals(TarObj)
判断自身是否为目标对象,结果为真返回True,结果为假返回False;注意克隆、新建同类型、同名对象,equal结果均为假
Determine whther object itself is target object, if true then will return as True, vice versa for false. Notice that duplicate, new same type, same name objects, and equals will return as false.
IsClass(className)
判断自身是否为给定的对象类型
Determine whether object itself is the given object class.
Events
Inherited from RWObject:
Destroyed()
删除自身时触发
Triggered when object destroyed itself.
ChildAdded(childobject)
添加子对象时触发
Triggered when child object is added.
ChildRemoved(childobject)
移除子对象时触发
Triggered when child object is removed
DescendantAdded(descendantobject)
添加后代时触发
Triggered when descendant is added.
DescendantRemoved(descendantobject)
移除后代时触发
Triggered when descendant is removed.
AncestryChanged(AncestryChanged)
祖先变更时触发
Triggered when ancestry is changed.