Exemplo n.º 1
0
 void Reset()
 {
     Animator = GetComponent <Animator>();
     Key      = new AnimatorKey
     {
         triggerData = true,
         KeyType     = AnimatorKey.AnimType.Trigger,
         Key         = "TriggerAnim"
     };
 }
Exemplo n.º 2
0
            void menuItem_Click(object sender, System.EventArgs e)
            {
                AnimatorTrackBar trackBar = (AnimatorTrackBar)Owner;

                System.Type type = (System.Type)((Skill.Editor.UI.MenuItem)sender).UserData;

                AnimatorKey newKey = ScriptableObject.CreateInstance(type) as AnimatorKey;

                trackBar.AddKeyAt(Position.x, newKey);
            }
Exemplo n.º 3
0
        /// <summary>
        /// add key at position
        /// </summary>
        /// <param name="x">position inside track</param>
        private void AddKeyAt(float x, AnimatorKey newKey)
        {
            TimeLine timeLine = FindInParents <TimeLine>();

            if (timeLine != null)
            {
                // convert to local position of TimeBar - because of zooming
                x -= timeLine.View.ScrollPosition.x;
                newKey.FireTime = (float)timeLine.TimeBar.GetTime(x);

                EventOrientedKeyView e = CreateEvent(newKey);
                InspectorProperties.Select(e);
                RebuildTrackKeys();
            }
        }
Exemplo n.º 4
0
            //private AnimatorKey _AnimatorKey;

            public AnimatorKeyView(AnimatorTrackBar trackBar, AnimatorKey key)
                : base(trackBar, key)
            {
                //_AnimatorKey = key;

                this.ColumnDefinitions.Add(10, Framework.UI.GridUnitType.Pixel);
                this.ColumnDefinitions.Add(1, Framework.UI.GridUnitType.Star);


                _Bg       = new Framework.UI.Box();
                _ImgState = new Skill.Framework.UI.Image()
                {
                    Row = 0, Column = 0
                };

                Controls.Add(_Bg);
                Controls.Add(_ImgState);
            }