Saturday, January 3, 2015

Rise of Dagon: Jan 3, 2015


The Rise of Dagon had a really nice start in 2014, but I am going to skip a January based 'year' recap because it was not started in January. 

Also I am going to skip a studio style yearly recap at this point because my indie journey also did not start in January.

So for today I simply bring you the latest and greatest Rise of Dagon update!

Firstly I have continued with working on the inventory system that I talked about last week. Given that I decided to work on the 'item inspector' elements and begin to implement some of the procedural loot system so that it could be displayed in the inspector.

So as you see in the first image (top of post) that we have an item being highlighted by a yellow mouse over highlight, and when the cursor is over it we now have a 'inspector' panel informing you what the statistics of that particular item is. In the screenshot I have generated a random 'common' quality longsword.  

In the next screenshot I have an image that shows off 4 different random items of differing quality.  

As you see for each item as it gets better quality information changes as well as the stats of the item are better.




This was done using the  IPointerEnterHandler, IPointerExitHandler interfaces in the new Unity 4.6 UI system.  I learned about them by downloading the 4.6 example project.  I do not recall seeing these interfaces listed in the documentation for 4.6 -- so I would definitely recommend digging around in those sample projects if you have not already there are some hidden gems in there!

So I implemented the two relevant methods as seen here and simple set my highlight color, as well as call a method on the player inventory to set the inspector properties of the item that was clicked on in the slotnumber:

public void OnPointerEnter(PointerEventData data)
{
if (containerImage == null)
return;
        containerImage.color = highlightColor;
        playerInventory.SetInventoryInspector(slotnum);
}

Then when done we set it back to the original color and disable the inspector until next time we need it:

public void OnPointerExit(PointerEventData data)
{
if (containerImage == null)
return;
containerImage.color = normalColor;
        playerInventory.DisableInSpector();
}

Finally I wanted to show off a little animated gif I made of a leather helmet that I decided to sculpt in to looking like a Raven molded in to the leather.  I ended up taking a screenshot ( as described last week) from a particular angle to use this as an actual icon for an armor set  - but it just looks cool all the way around so I wanted to share that on my dev log today.



Thanks for reading, see you next week!

No comments:

Post a Comment