====== タッチ操作で反応するボタン ====== SpriteやShapeのonpointstartやonpointendを設定することでタッチ操作に反応するボタンを作ることができます。 事前にsetInteractiveにtrueを指定しておく必要があります。 this.button = RectangleShape({ height: BUTTON_HEIGHT, width: BUTTON_WIDTH, }); this.button.addChildTo(this.base); this.button.setInteractive(true); this.button.onpointstart = function() { // タッチ開始時の処理 }; this.button.onpointend = function() { // タッチ終了時の処理 };