Hello,
New NGUI user (and new to programming, in general). This is probably a naive question, but i'll ask anyway because i don't want to tread too far down the wrong path...
I have a host of buttons that fire off player abilities and I want to enable/disable each button based on a host of bool conditions that change frequently during gameplay. Conditions such as:
-isCurrentlyPlayerTurn
-hasResourcesToUseAbility
-enemyIsNearby
-etc
Does it makes sense to put an OnUpdate script on each button that constantly checks for all the necessary conditions to be true? Seems like a lot of checking every frame, but I don't really know if that's standard procedure or foolish coding. Is there a more efficient way to handle this?
Thanks very much!