Пример #1
0
        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());
        }
Пример #2
0
 public void Tween_Tests()
 {
     #if !__MonoCS__
     TweenLibrary tween = new TweenLibrary();
     tween.StartTween(TweenHandler, 0, 0, 10, 10, TweenAnimation.EaseInOutQuad, 20);
     #endif
 }
Пример #3
0
 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);
     }
 }
Пример #4
0
    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);
        }
    }
Пример #5
0
 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();
         });
     }
 }
Пример #6
0
        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();
        }
Пример #7
0
    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());
            }
        }
    }
Пример #8
0
        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());
        }
Пример #9
0
    void AddTween(Transform targetObject, Vector2 endPos, float duration)
    {
        TweenLibrary tweenLibrary = new TweenLibrary(targetObject, targetObject.transform.position, endPos, deltaTime, duration);

        activeTweens.Add(tweenLibrary);
    }
Пример #10
0
    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);
    }