[Roblox] 中文API 翻译 | Classes | Accessory

写在前面的话

roblox 更新了新的API文档,去除了原本中文版本开发文档,虽然全英文阅读API是每个程序员的基础技能,但是为了提高自己学习引擎效率(第一次接触编程学习),我抽时间翻译了全篇roblox API开发文档,并且使用中英文对照翻译的方式,加深学习,文档仅供学习参考,roblox官方经常更新文档API以及增添新功能,如有错误,还请指正

翻译文章顺序基于我学习API的顺序展开,可能会优先翻译核心的API,比如对象创建,事件处理等等,API顺序依照官网顺序排列
roblox脚本基于Lua 翻译时间 2024.9.2

Roblox Engine Classes

类表示 Roblox 引擎中的核心对象和服务。它们包含 属性、方法、事件和回调

Accessory 饰品

The Accessory Instance is the parent Instance of all accessories (regardless of their specific accessory type). It typically has a child Handle with a child Attachment and a WrapLayer in the case of Layered Clothing.

饰品对象Accessory是所有饰品的父对象(不管它们的特定饰品类型是什么,比如帽子,面部饰品等等)。在分层服装的情况下,它通常有一个子对象Handle(这个对象含有Attachment对象以及一个WrapLayer对象)

The Accessory class is the successor to the legacy Hat system. It’s cross-compatible with both the legacy R6 character system and the new R15 character system.

Accessory 类是遗留Hat系统的继承者。它与传统的R6角色系统和新的R15角色系统交叉兼容的。

If you insert an Attachment into the Accessory’s Handle with the same name as an Attachment in one of the character’s limbs, they connect and ignore properties inherited from the Accoutrement class. Otherwise, the Accessory functions identically to a Hat.

如果你在配件的 Handle 中插入一个与角色肢体上的附件同名的附件,它们会连接并忽略从装备类继承的属性。否则,配件的功能与帽子相同。

Note: If there are two matching Attachments, the resulting Weld is a child of the Accessory’s Handle. This differs from the legacy behavior of Hats where the Weld is always a child of the Head of the character.

注意:如果有两个匹配的附件,则产生的焊缝是附件句柄的子对象。这与帽子的遗留行为不同,在那里焊缝总是角色头部的子对象。

总结 Summary

Properties 属性

AccessoryType: Enum.AccessoryType ----- Read Parallel 读取并行

AccessoryType类型有例如:帽子,T恤,腰部饰品等等
指定附件的 AccessoryType。是 AccessoryType.Unknown,除非你装备了该配饰 通过玩家生成过程或 Humanoid:ApplyDescription()。如果 Marketplace 上提供,则您 可以设置 Enum.AccessoryType 对 Accessory 项(对于 例如,“Hat” 或 “Face”)。

从 Accoutrement (装备) 继承的属性

属性名称数据类型可读性备注
AttachmentForwardVector3Hidden 隐藏1 Not Replicated不可复制2 Read Parallel 读取并行3设置 Player 上对象的偏移位置
AttachmentPointCFrame读取并行装备的准确 CFrame
AttachmentPosVector3隐藏 不可复制 读取并行设置对象在 Player 上的位置
AttachmentRighVector3隐藏 不可复制 读取并行设置 Player 上对象的偏移位置
AttachmentUpVector3隐藏 不可复制 读取并行设置 Player 上对象的偏移位置

Methods 方法

查看从 Instance 继承的所有内容

Events

查看从 Instance 继承的所有内容


  1. Hidden 隐藏 此成员不会出现在对象浏览器中,并不考虑广泛使用。 ↩︎

  2. Not Replicated (Roblox不会跨服务器-客户端边界复制该成员。) ↩︎

  3. Read Parallel 读取并行 (注:此属性是只读的,在非同步线程中读取是安全的。试图写入它会导致错误。) ↩︎

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值