Skip to content

Instantly share code, notes, and snippets.

@zonaryFUND
Created February 10, 2022 15:13
Show Gist options
  • Save zonaryFUND/87e771a4fe3e417599f0556d158b06ad to your computer and use it in GitHub Desktop.
Save zonaryFUND/87e771a4fe3e417599f0556d158b06ad to your computer and use it in GitHub Desktop.
public class CommandWindowManager: MonoBehaviour {
public class CreateWindow(Array<(string, Action)>) {
// コマンドボタンの作成
}
}
public class BattleMain: MonoBehabiour {
void CreateCommandWindow() {
commandWindowManager.CreateWindow(new Array<(string, Action)> {
(
"攻撃",
() => {
// 攻撃対象選択待機に移る処理
}
),
(
"待機",
() => {
selectedCharacter.Wait();
}
)
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment