擁有組件

STD 庫
伺服器端
可在 Mobile 端和 PC 端使用

判斷目標實體是否存在組件

聲明

func HasComponent(target entity, componentID Type) bool
go

參數

輸入

名稱 類型 描述
目標 entity 目標實體
組件類型 ID Type 組件類型

返回

類型 描述
Bool 是否存在