Ejemplo n.º 1
0
        public override void Init()
        {
            try
            {
                if (containingAtom != null)
                {
                    _animation = containingAtom.GetComponent <Animation>() ?? containingAtom.gameObject.AddComponent <Animation>();
                }

                _curve1JSON     = new JSONStorableAnimationCurve("Curve 1", CurveUpdated);
                _curve1JSON.val = AnimationCurve.EaseInOut(0, 0, 2, 10);
                _curve2JSON     = new JSONStorableAnimationCurve("Curve 2", CurveUpdated);
                _curve2JSON.val = AnimationCurve.EaseInOut(0, 1, 2, 0);

                CreateUI();
            }
            catch (Exception e)
            {
                SuperController.LogError("Exception caught: " + e);
            }
        }
Ejemplo n.º 2
0
        public override void Init()
        {
            try
            {
                if (containingAtom != null)
                {
                    _animation = containingAtom.GetComponent <Animation>() ?? containingAtom.gameObject.AddComponent <Animation>();
                }

                _curveJSON = new JSONStorableAnimationCurve("Curve", CurveUpdated);
                _curveJSON.SetValToDefault();
                _curve2JSON     = new JSONStorableAnimationCurve("Curve", CurveUpdated);
                _curve2JSON.val = AnimationCurve.Linear(0f, 0.5f, 1f, 0.5f);

                CreateUI();
            }
            catch (Exception e)
            {
                SuperController.LogError("Exception caught: " + e);
            }
        }