N人プレイ対応#6
Open
amatsuda wants to merge 2 commits into
Open
Conversation
Contributor
|
これだと、ゲーム起動後に gamepad を接続した場合に reload しないといけなくなりますね 後から接続については gamepadconnected の hook を使ってなんとかなりそうではありますが、プレイヤーの表示順を index 順にするのがめんどくさそう |
Contributor
|
とは言え、index は内部的なものなので ”Player 1" とか "Player 2" という表記をやめさえすれば問題なさそうですね |
Contributor
|
gamepadconnected hook 、思った通りに発火してくれない...... |
Contributor
|
現状のままでも、4人揃わなくてもゲームはできるので、特に別途少人数対応をしなくてもいいんじゃないかなと思い始めました |
Member
Author
|
なるほど。起動後に乱入のケースは考えていなかったし、思ったよりめんどくさそうなのも理解しました。じゃあひとまずこの件は放置で良いですー。 |
Contributor
|
はいー |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
4人プレイ限定じゃなくて、接続されているgamepadの数だけプレイヤーが出現するようにしました。
せっかくgamepadオブジェクトを取ってるんだったらそのままPlayerのコンストラクタに渡せばいいじゃん、とかツッコめるところは色々あるところかと思いますが、ひとまずやりたいことは実現できたのでここまででぷるります。