/// <summary> /// Function Callback for OTAnimation /// </summary> private void AnimationFinsh(OTObject owner) { string _subName = "Icon13_Ani"; OTAnimatingSprite tempAsp = owner.GetComponent<OTAnimatingSprite> (); if (tempAsp.animation.name == _subName ) { ++m_SubPlayCounter; owner.GetComponent<OTAnimatingSprite> ().alpha = 0; //! if got more than one pearls, should take action after loop only once. if(m_SubPlayCounter == 2) return; ActtionAfterLoops (); } else { if(HasPearInWin()) //if(m_SubPlayCounter != 0) return; if (++m_FinishCounter % WinManager.Instance.WINICONINDICIES [k].Length != 0) return; m_FinishCounter = 0; //Debug.Log("Normal Icons"); owner.GetComponent<OTAnimatingSprite> ().alpha = 0; ActtionAfterLoops (); } DestroyAnimSprite(); }
private void ResetAnim(OTObject owner) { owner.GetComponent<OTAnimatingSprite> ().frameIndex = 4; }