-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve Game Setup Menu #79
Comments
That's a really useful image, thanks. (I assume that's an image, and not a screen cap of some ugui elements?) |
https://forums.doublefine.com/topic/17182-concept-art/?do=findComment&comment=403659 link to image @KGuNN45 If we do something like this I might able to fake the ui button borders, but it might better to have a ui image for the border. |
Yeah, it's something I slapped together quickly in Inkscape a few days back |
So, how do we want to choose between network play vs local play and local one player vs local 2 player in the menu? |
I have started exposing the functionality of the LoadAssets script so it can be tied to the UGUI. Currently several methods exist: int GetCount(string type) // returns the number of a certain type available types are: "table", "variant" or "paddle" string GetName(string type, int index) // takes the index of a certain type and returns its name void LoadScene(int variantIndex, int tableIndex) // takes the index of a variant and table and loads a table bool HasFinishedLoading() // returns true when the table has finished loading |
When dealing with networking the following methods are relevant inside NetworkSetup which will need added to ScriptHolder: void BeginHosting(int port) // takes the port and begins hosting using it bool ConnectToServer(string IP, int remotePort) // takes an IP address as a string and a port and returns whether it successfully connected bool LoadTableOnClient() // attempts to load the table the server has chosen on the client, continue to call this until it returns true otherwise the client's table will not load! |
I have also added a few more vital functions to the LoadAssets script which will need called from parts of the menu: void SetSinglePlayer(bool singlePlayer) // Determines whether or not the second paddle is an AI, takes a bool true or false void BeginPlaying() // Must be called TO BEGIN THE GAME! Loads the paddles in and sets them up to be players or AI |
This should now set up everything. LoadAssets contains an array of player prefabs which will need updated from the inspector with all of the variations. These will need to have their names hardcoded in to the dictionary called paddleNames in LoadAssets too! |
It appears that HasFinishedLoading() never returns true. I get these two errors
|
The current temporary game setup menu could do with some improvement (replace with ugui?).
Matchmaking buttons can be dropped from the online config - we've decided to drop that functionality for now.
During today's contributor catchup, it was suggested that asset/table/etc. selection should probably use left/right buttons to seek through available options as a scalable alternative to showing every available item in a list.
The text was updated successfully, but these errors were encountered: