I’m too tired at this point, so maybe I’m missing something extremely obvious, but my oncomplete callback isn’t functioning and since no errors are being raised I have no idea why and can’t debug it myself. The onupdate call functions perfectly fine. Relevant code:
public void ActivateWindup(float time)
{
if (GetComponent<iTween>() != null) Destroy(GetComponent<iTween>());
Hashtable hash = new Hashtable {
{"from", 0},
{"to", maxSize},
{"time", time},
{"oncomplete", "WindupCallback"},
{"onupdate", "UpdateVal"}
};
iTween.ValueTo(gameObject, hash);
}
void WindupCallback()
{
Debug.Log("Windup Finished");
associatedEidolon.ActivateAbility(associatedEidolon.battleArenaAt.GetCombatantListWithoutBattler(associatedEidolon));
}
The class that contains the previous code inherits ProgressBar which has:
public void UpdateVal(float val){
if(val <= maxSize){
curVal = val;
percentDone = ((val/maxSize) * 100);
}
else{
curVal = maxSize;
percentDone = 100;
}
}
No moving the callback into the parent method did not help. No adding an “oncompletetarget”: gameObject did not help, nor did I expect it too since the iTween script and the callback method is on the same object. No making it public did not help. No renaming it did not help.