類別: PlayerDataBinder

透過集合功能整理內容 你可以依據偏好儲存及分類內容。

建構函式

播放器資料繫結

new PlayerDataBinder(playerData)

參數

播放器資料

(非空值物件或非空值的 cast.framework.ui.PlayerData)

要繫結至目前玩家狀態的物件。 系統會更新物件屬性 (詳情請參閱 cast.framework.ui.PlayerData),以反映玩家的狀態,而不會觸發變更事件。

方法

addEventListener

addEventListener(type, Listener)

新增玩家資料變更的事件監聽器。

參數

type

cast.framework.ui.PlayerDataEventType

事件類型。如有任何異動,請使用 cast.framework.ui.PlayerDataEventType.ANY_CHANGE

值不得為空值。

事件監聽器

function(non-null cast.framework.ui.PlayerDataChangedEvent)

移除事件監聽器

removeEventListener(type, Listener)

移除對玩家資料變更的事件監聽器。

參數

type

cast.framework.ui.PlayerDataEventType

事件類型。

值不得為空值。

事件監聽器

function(non-null cast.framework.ui.PlayerDataChangedEvent)