図形をアニメーションの下に描写したい

コズミック戦士
記事: 1
登録日時: 2023年8月09日(水) 10:46

図形をアニメーションの下に描写したい

投稿記事by コズミック戦士 » 2023年8月09日(水) 10:56

みなさんはじめまして!

ツクールフォーラムのこちらのトピック
https://forum.tkool.jp/index.php?thread ... .90/page-2
で紹介されている下記スクリプトを使おうと思いました。

コード: 全て選択

/*:ja
* @param DRAW ID
* @desc SceneManager._sceneに関連付けるSprite名
* @default drawer
*/
(() => {

  // 1.プラグインのファイル名をここに書く
  const PLUGIN_NAME = "test";

  // 2.この中に処理内容を書く
  const draw = context => {
    // context.fillText("Hello, World!", 48, 48);
  }

  const drawId = PluginManager.parameters(PLUGIN_NAME)["DRAW ID"];
  const { update } = Game_Screen.prototype;
  Game_Screen.prototype.update = function () {
    update.apply(this);
    main();
  }
  const [width, height] = [SceneManager._screenWidth, SceneManager._screenHeight];
  const main = () => {
    if (!SceneManager._scene[drawId]) {
      SceneManager._scene[drawId] = new Sprite();
      SceneManager._scene[drawId].bitmap = new Bitmap(width, height);
      SceneManager._scene.addChild(SceneManager._scene[drawId]);
    }
    const { bitmap } = SceneManager._scene[drawId];
    const { context } = bitmap;
    bitmap.clear();
    // context.textBaseline = 'top'; // テキストの基準位置を左上にする
    draw(context);
  }
})()



無事マップに図形を描写することはできたんですが、アニメーションの上に表示されてしまいます。
どこをどう変更すればアニメーションの下に図形を描写することができるのでしょうか?

ご回答お待ちしております。

“MV:質問” へ戻る