public TreeChartBox() { SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true); UpdateStyles(); BorderStyle = BorderStyle.Fixed3D; DoubleBuffered = true; TabStop = true; BackColor = Color.White; fModel = new TreeChartModel(); fRenderer = null; fSelected = null; fToolTip = new ToolTip(); fTraceSelected = true; fTreeControls = new TreeControlsList <ITreeControl>(); fTreeControls.Add(new TCScaleControl(this)); fTreeControls.Add(new TCGenerationsControl(this, TreeChartKind.ckDescendants)); //fPersonControl = new PersonControl(this); InitTimer(); fTween = new TweenLibrary(); SetLayout(new NativeTreeLayout()); }
public void Tween_Tests() { #if !__MonoCS__ TweenLibrary tween = new TweenLibrary(); tween.StartTween(TweenHandler, 0, 0, 10, 10, TweenAnimation.EaseInOutQuad, 20); #endif }
public static void FadeOut(float duration, GameObject panel, Action onFinished) { if (panel != null) { panel.SetActive(true); TweenLibrary.LeanFadeUI_Image(panel.gameObject, panel.GetComponent <Image>(), 0, 1, duration, onFinished); } }
private void Update() { if (Vector2.Distance(transform.position, Target) >= 0.5f) { // theta = Time.deltaTime; // theta = theta % 5f; transform.position = TweenLibrary.Parabola(transform.position, Target * 10f, Curve, Time.deltaTime); } }
public static void FadeIn(float duration, GameObject panel, Action onFinished) { if (panel != null) { panel.SetActive(true); TweenLibrary.LeanFadeUI_Image(panel.gameObject, panel.GetComponent <Image>(), 1, 0, duration, () => { panel.gameObject.SetActive(false); onFinished?.Invoke(); }); } }
public TreeChartBox() : base() { BackgroundColor = Colors.White; fModel = new TreeChartModel(); fRenderer = null; fSelected = null; fTraceSelected = true; fTreeControls = new TreeControlsList <ITreeControl>(); fTreeControls.Add(new TCScaleControl(this)); fTreeControls.Add(new TCGenerationsControl(this)); //fPersonControl = new PersonControl(this); InitTimer(); fTween = new TweenLibrary(); }
private void FixedUpdate() { if (Active) { transform.position = TweenLibrary.LinearTween(transform.position, target.position, speed * Time.fixedDeltaTime); transform.position = ApplyGravity(transform.position); if (Vector2.Distance(transform.position, target.position) < target.GetComponent <Pollen>().Radius / 2) { Active = false; } if (!Active) { StartCoroutine(StopBee()); } } }
public TreeChartBox() { BackgroundColor = Colors.White; fModel = new TreeChartModel(); fRenderer = null; fSelected = null; fTraceSelected = true; fTreeControls = new TreeControlsList <ITreeControl>(); fTreeControls.Add(new TCScaleControl(this)); fTreeControls.Add(new TCGenerationsControl(this, TreeChartKind.ckDescendants)); //fPersonControl = new PersonControl(this); InitTimer(); fTween = new TweenLibrary(); SetLayout(new NativeTreeLayout()); }
void AddTween(Transform targetObject, Vector2 endPos, float duration) { TweenLibrary tweenLibrary = new TweenLibrary(targetObject, targetObject.transform.position, endPos, deltaTime, duration); activeTweens.Add(tweenLibrary); }
private void FixedUpdate() { var targetPos = new Vector3(target.position.x, transform.position.y, target.position.z); transform.position = TweenLibrary.EaseInOutLinear(transform.position, targetPos, speed * Time.fixedDeltaTime); }