Nice looking game! I would love to play it once you get it ready for demo!
- In my opinion, I think the icon in the top right corner would get annoying.
- I might make the players larger (unless there's more planned that you don't want to spoil for us).
Now, about the rounding:
My function's a bit lengthy, and I'm sure you could shorten it, but it works.
The other functions (from my testing) didn't work correctly, based on how numbers are supposed to be rounded.
Code: Select all
function Round( Number, DecimalPlace ) -- Number is the number being rounded. DecimalPlace is to how many place values (i.e. 0 would be integer, 1 would be 1 decimal place, etc.)
local DecimalPlace, ReturnedValue = DecimalPlace and 10 ^ DecimalPlace or 1
local UpperNumber = math.ceil( Number * DecimalPlace )
local LowerNumber = math.floor( Number * DecimalPlace )
local UpperDifferance = UpperNumber - ( Number * DecimalPlace )
local LowerDifference = ( Number * DecimalPlace ) - LowerNumber
if UpperNumber == Number then
ReturnedValue = Number
else
if UpperDifferance <= LowerDifference then ReturnedValue = UpperNumber elseif LowerDifference < UpperDifferance then ReturnedValue = LowerNumber end
end
return ReturnedValue / DecimalPlace
end
Sorry for the conversation getting off of your game, by the way, we're just trying to be too helpful, I guess.