Class: DebugLabel

phina.ui.DebugLabel

new phina.ui.DebugLabel (options, updateEveryFrame)

指定したオブジェクトのプロパティ値を毎フレーム更新表示します。
Name Type Default Description
options object optional phina.ui.LabelAreaのoptionsと一緒
updateEveryFrame boolean true optional 毎フレーム表示の更新を行うかどうか
Example
phina.globalize();

// プレイヤーの位置を常に画面上に表示したい
this.player = Sprite('player').addChildTo(this);

DebugLabel({fill: 'red'})
  .subscribe(this.player, 'position')
  .setPosition(100, 100)
  .addChildTo(this);

Extends

  • phina.ui.LabelArea

Methods

clear ()this

追跡パラメータをクリア
Returns:
Type Description
this

subscribe (targetObj, propName)this

追跡表示するパラメータを追加
Name Type Description
targetObj object 対象オブジェクト
propName string プロパティ名
Returns:
Type Description
this

updateLabel ()void

プロパティ表示を更新する
Returns:
Type Description
void