public void AddComponent(ComponentDefs type) { Transform findObject = transform.Find(type.ToString()); if (findObject != null) { AddComponent(type, findObject.GetComponent <tk2dSprite>(), findObject.GetComponent <tk2dSpriteAnimator>()); } }
public bool IsPlaying(string name) { return(animator.IsPlaying(name + "_" + StringUtils.Uncaptalize(type.ToString()))); }