这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
scripting:world:billboard [2023/10/22 00:50] – bibiboxs | scripting:world:billboard [2024/04/05 14:39] (当前版本) – bibiboxs | ||
---|---|---|---|
行 62: | 行 62: | ||
### billboard.Color | ### billboard.Color | ||
- | > 设置展示牌实例对象颜色,不同的`Type`对象有不同的默认值(例如`Sprite: | + | > 设置展示牌实例对象颜色,不同的`Type`对象有不同的默认值(例如`Sprite: |
> | > | ||
> *注意:这里所设置的颜色目标不一定是想象中的目标,比如`Bubble`设置的颜色其实是【气泡背景颜色】,如果想修改文本颜色请使用`Text`UBB颜色代码。* | > *注意:这里所设置的颜色目标不一定是想象中的目标,比如`Bubble`设置的颜色其实是【气泡背景颜色】,如果想修改文本颜色请使用`Text`UBB颜色代码。* | ||
```javascript | ```javascript | ||
- | billboard.Color = Color(255, 255, 255); //Color | + | billboard.Color = Color(255, 255, 255, 255); //Color |
``` | ``` | ||
行 74: | 行 74: | ||
### billboard.Alpha | ### billboard.Alpha | ||
- | > 设置展示牌实例透明度,默认为`255`。 | + | > 设置展示牌实例整体透明度,默认为`255`。 |
```javascript | ```javascript | ||
行 94: | 行 94: | ||
### billboard.Baffle | ### billboard.Baffle | ||
- | > 设置展示牌是否存在遮挡逻辑,默认为`false`,如果设置`true`将作为一个物体,可以被其他物体遮挡。 | + | > 设置展示牌是否存在遮挡逻辑,默认为`true`,如果设置`false`将不会被其他物体遮挡。 |
```javascript | ```javascript | ||
- | billboard.Baffle = false; //bool | + | billboard.Baffle = true; //bool |
``` | ``` | ||
行 146: | 行 146: | ||
### billboard.Text | ### billboard.Text | ||
- | > 设置展示牌显示气泡文本(只在`Type: 1`模式生效)。 | + | > 设置展示牌显示气泡文本(只在可附带文本的组件生效,例如图片组件则是无效的)。 |
```javascript | ```javascript | ||
行 187: | 行 187: | ||
```javascript | ```javascript | ||
billboard.MaxProgress = 0.0; //float | billboard.MaxProgress = 0.0; //float | ||
+ | ``` | ||
+ | |||
+ | |||
+ | |||
+ | ### billboard.IgnoreMatch | ||
+ | |||
+ | > 设置展示牌**忽略匹配表达式**。 | ||
+ | > | ||
+ | > 表达式内包含的`PlayerID`将被屏蔽(不可见),这可能用于【玩家头顶名称】对玩家自身不可见等情况。 | ||
+ | |||
+ | ```javascript | ||
+ | billboard.IgnoreMatch = ""; | ||
+ | ``` | ||
+ | |||
+ | ```javascript | ||
+ | billboard.IgnoreMatch = " | ||
+ | billboard.IgnoreMatch = " | ||
``` | ``` | ||
行 198: | 行 215: | ||
```javascript | ```javascript | ||
- | function Billboard.Create( type: int, pos: Vector ): Billboard | + | function Billboard.Create( type: int, pos: Vector |
``` | ``` | ||
行 215: | 行 232: | ||
```javascript | ```javascript | ||
- | function Billboard.CreateTips( text: string, pos: Vector3, time: float = 3, scale: float = 1, hasBG: bool = true, hasRotate: bool = true) | + | function Billboard.CreateTips( text: string, pos: Vector, time: float = 3, scale: float = 1, hasBG: bool = true, hasRotate: bool = true ) |
``` | ``` | ||
行 232: | 行 249: | ||
```javascript | ```javascript | ||
- | function Billboard.CreateSpriteBubble( texture: int, pos: Vector3, time: float = 3, scale: float = 1, hasBG: bool = true, hasRotate: bool = true) | + | function Billboard.CreateSpriteBubble( texture: int, pos: Vector, time: float = 3, scale: float = 1, hasBG: bool = true, hasRotate: bool = true ) |
``` | ``` | ||
行 264: | 行 281: | ||
- | ### Billboard.FindByIndex() | + | ### Billboard.GetCount() |
- | > 寻找一个展示牌实例(通过索引),不存在则返回`null`。 | + | > 获取当前所有存在展示牌数量(不包括静态对象)。 |
```javascript | ```javascript | ||
- | function Billboard.FindByIndex( index: int ): Billboard | + | function Billboard.GetCount(): int |
``` | ``` | ||
- | ### Billboard.GetCount() | + | ### Billboard.Get() |
- | > 获取当前所有存在展示牌数量(不包括静态对象)。 | + | > 获取当前存在的指定索引展示牌实例,通常搭配`GetCount()`遍历使用。 |
```javascript | ```javascript | ||
- | function Billboard.GetCount(): int | + | function Billboard.Get( index: int ): Billboard |
``` | ``` | ||
行 293: | 行 310: | ||
function billboard.Remove() | function billboard.Remove() | ||
``` | ``` | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||