Tweener ApplyPosition(Panel.Position pos) { Tweener tweener = panel.SetPosition(pos, true); tweener.duration = 0.5f; return(tweener); }
Panel.Position GetPosition(string posName, TextAnchor ownAnchor, TextAnchor parentAnchor) { Panel.Position position = panel[posName]; if (position == null) { position = new Panel.Position(posName, ownAnchor, parentAnchor, Vector2.zero); panel.AddPosition(position); } return(position); }
// Used to set default anchors in case they aren't alredy configured public void SetHideAnchors(TextAnchor ownAnchor, TextAnchor parentAnchor) { hidePosition = GetPosition("Hide", ownAnchor, parentAnchor); }