Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ミニゲームのリザルト画面をもう少し詳細に作り込めるようにしたい #205

Open
trpfrog opened this issue Jan 17, 2021 · 2 comments
Assignees
Labels
easy issue Good for newcomers new feature New feature or request
Milestone

Comments

@trpfrog
Copy link
Owner

trpfrog commented Jan 17, 2021

ResultFactoryみたいなクラスを用意しておいて簡単にリザルトを作れるようにしたい

@trpfrog trpfrog added the new feature New feature or request label Jan 17, 2021
@trpfrog trpfrog self-assigned this Jan 17, 2021
@trpfrog trpfrog added the easy issue Good for newcomers label Jan 20, 2021
@trpfrog
Copy link
Owner Author

trpfrog commented Jan 20, 2021

欲しい機能は

  • 見出し
  • メダルの獲得の有無
  • 中央に大きく表示するテキスト
  • 下に説明文みたいなやつの表示

を設定できるようなBuilderクラス

例えば

ResultBuilder builder = new ResultBuilder();
builder.setTitle("Game Over");
builder.set中央に出るやつ(score + "");
builder.setDescription("あなたは地球を守れませんでした……", "次も頑張りましょう!");
builder.setMedal(new Medal(moonsWorkMedalImage));
GameScene result = builder.build();
SceneManager.getInstance().push(result);

みたいな感じでできると良さそう!

net.trpfrog.medipro_game.mini_game.GameOverWindow が参考になりそうです

@trpfrog trpfrog added this to the Alpha release milestone Jan 20, 2021
@trpfrog
Copy link
Owner Author

trpfrog commented Jan 21, 2021

メソッドチェーンができればもっと便利かもしれません。

var scene = new ResultBuilder()
                .setTitle("title")
                .setDescription("...")
                .setMedal(new Medal())
                .setColor(Color.GREEN)
                .setWindowSize(300, 200)
                .build();

みたいに書けます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy issue Good for newcomers new feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant