RefreshEXP¶
This method refreshes the rendered EXP orbs visually involving the expholder
. It is mostly called by Update.
- If the
expholder
doesn't exist, it is created as a new GameObject namedexpholder
childed to theGUICamera
with a tag ofDelAftBtl
(meaning it will get destroyed on ReturnToOverworld) - All existing
bigexporbs
andsmallexporbs
are destroyed bigexporbs
is recreated with lengthexpreward
/ 10 floored and each element is created as aPrefabs/Objects/ExpOrbGUI
instance childed to theexpholder
with a scale of (0.35, 0.35, 0.35) and a local position of (8.5 - index * 0.65, -4.26, 10.0)smallexporbs
is recreated with lengthexpreward
- (expreward
/ 10 floored) * 10 and each element is created as aPrefabs/Objects/ExpOrbGUI
instance childed to theexpholder
with a scale of (0.25, 0.25, 0.25) and a local position of (8.5 - index * 0.5, -4.9, 10.0)oldexp
is set toexpreward
which prevents the calling of this method by Update untilexpreward
changes