public override string ToString() { return(" sceneName:" + sceneName + "\t anim:" + anim.ToString() + "\t oldSceneTime:" + oldSceneTime + "\t newSceneTime:" + newSceneTime + "\t EaseType:" + ease.ToString() + "\t bgAlpha:" + bgAlpha.ToString() + "\t data:" + data.ToString() + "\t callback is null:" + (cb == null)); }
private static Hashtable getBasicHs(Vector3 amount, float time, float delay, iTween.EaseType easeType) { Hashtable hs = new Hashtable(); hs.Add("amount", amount); hs.Add("time", time); hs.Add("delay", delay); hs.Add("space", Space.World); hs.Add("easetype", easeType.ToString()); return(hs); }
public void changeTarget(Transform transform, float time = 1.0f, iTween.EaseType ease = iTween.EaseType.linear) { clearTarget(); changeTargetTransform = transform; Hashtable parameters = new Hashtable(); parameters.Add("x", transform.position.x); parameters.Add("y", transform.position.y); parameters.Add("islocal", true); parameters.Add("time", time); parameters.Add("oncomplete", "CompleteHandler"); parameters.Add("easeType", ease.ToString()); iTween.MoveTo(gameObject, parameters); }
/// <summary> /// Changes to page absolute(tabNumber%Tabs.Length). If /// </summary> /// <param name="tabNumber">Tab number.</param> public void ChangeToTabAnimating(int tabNumber) { if (!initiated) { throw new UnityException("The Tab Control need to be Initiated before changing pages."); } if (tabNumber < 0) { int tab = Tabs.Length + tabNumber % Tabs.Length; ChangeToTabAnimating(tab); return; } else if (tabNumber > Tabs.Length - 1) { ChangeToTabAnimating(tabNumber % Tabs.Length); return; } float Yquantity = tabNumber * Content.rect.width; Content.gameObject.MoveTo(GameObjectExtension.Axis.X, -Yquantity, AnimationTransitionTime, easeType.ToString()); }
// Use this for initialization public void Move() { if (_path == null) { return; } iTween.Reset(); //apply base position List <Vector3> tmp_nodes = new List <Vector3>(_path.nodes); for (int iNode = 0; iNode != tmp_nodes.Count; ++iNode) { tmp_nodes[iNode] = _path.nodes[iNode] + _path.transform.position; } gameObject.transform.position = tmp_nodes[0]; if (lookAt != null) { iTween.MoveTo(gameObject, iTween.Hash("path", tmp_nodes.ToArray(), "movetopath", true, "time", time, "looktime", lookTime, "looktarget", lookAt, "easeType", easeType.ToString(), "loopType", loopType.ToString(), "delay", delay, "oncomplete", onComplete, "oncompletetarget", gameObject)); } else { iTween.MoveTo(gameObject, iTween.Hash("path", tmp_nodes.ToArray(), "movetopath", true, "time", time, "orienttopath", true, "easeType", easeType.ToString(), "loopType", loopType.ToString(), "delay", delay, "oncomplete", onComplete, "oncompletetarget", gameObject)); } }
void IncreaseSize() { if (isEnabled) { iTween.ScaleTo(gameObject, iTween.Hash("scale", increasingScale, "time", animationTime, "easetype", ease.ToString(), "oncompletetarget", this.gameObject, "oncomplete", "DecreaseSize")); } }