private void Reset() { icon = transform.GetChild(0).GetComponent <Image>(); hpBar = transform.GetChild(1).GetChild(0).GetComponent <Image>(); infoText = transform.GetChild(2).GetComponent <Text>(); infoTextAnimation = transform.GetChild(2).GetComponent <UITweenSequence>(); }
public static UITweenSequence On( GameObject targetGO ) { if ( instance == null ) { Debug.LogError( "Unable to access or create an instance of UITween." ); return null; } UITweenSequence seq; tweens.TryGetValue( targetGO, out seq ); if ( seq == null ) { seq = new UITweenSequence( targetGO ); tweens[ targetGO ] = seq; } script.StartTweening(); return seq; }