A lot has been done.

It has been a while since I last posted, however I have been working intensively to produce the best possible outcome for what I imagine for this game/tool. Since the last time I posted, I watched an in depth tutorial on how inventories worked with UI. I thought that it would be a good idea but in reality it ended up just being a waste of my time. I learned a lot from it, but the solution to what I was trying to accomplish was actually very simple. I wanted the user to be able to drag and drop prefabs with the touch of a button on their keyboard, but what I ended up spending so much time on was thinking I could only do this using an inventory system. This was not the case at all. What I had to do was set up a mouse spawner. I accomplished this by using unity’s built in mousePosition command and referencing the game object that I wanted to spawn at that location in particular. To differentiate between which game object I was referencing, I created a string in which only the numbers 1-4 would interact with each game object and anything else pressed on the keyboard would do nothing. Below is the code that I have and have not used. all of the commented out code are my desperate efforts at creating an inventory system and falling on my face.

This slideshow requires JavaScript.

The first three slides show my absolute failure at trying to get the inventory system working. However, the last few slides is the combined, simpler, easier to manage way of accomplishing what I wanted. The next thing to do on my agenda is to have rotation for the platforms that the user puts into place. I plan on doing this by having the user place a platform and then use the arrow keys to rotate the platform any way in which they choose. I also plan on allowing the user to have customizable spawners so they do not have to place the balls where they want to every time.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s