private void btn_rfid_Click(object sender, EventArgs e)
 {
     if (count == 0)
     {
         pick_to_pre_drop.Play(pb_AGV, Animator2D.KnownProperties.Location);
     }
     else if (count == 1)
     {
         predrop_to_dropstay.Play(pb_AGV, Animator2D.KnownProperties.Location);
     }
     else if (count == 2)
     {
         dropstay_to_drop.Play(pb_AGV, Animator2D.KnownProperties.Location);
     }
     else if (count == 3)
     {
         drop_to_prepick.Play(pb_AGV, Animator2D.KnownProperties.Location);
     }
     else if (count == 4)
     {
         prepick_to_pickstay.Play(pb_AGV, Animator2D.KnownProperties.Location);
     }
     else if (count == 5)
     {
         pickstay_to_pick.Play(pb_AGV, Animator2D.KnownProperties.Location);
     }
     count++;
     if (count > 5)
     {
         count = 0;
     }
 }
Esempio n. 2
0
        public void MoveTo(int x, int y)
        {
            lock (_runningLock)
            {
                if (!_running)
                {
                    var animator = new Animator2D(FPSLimiterKnownValues.LimitSixty);
                    var currPos  = _playerDrawable.GetPosition();

                    animator.Paths = CreatePath(currPos.X, currPos.Y, x, y);

                    _lastPathEnd = animator.Paths.Last().End;
                    animator.Play(_frameCallbackInvoker, _endCallback);
                    _running = true;
                }
                else
                {
                    var path = CreatePath((int)_lastPathEnd.X, (int)_lastPathEnd.Y, x, y);
                    _lastPathEnd = path.Last().End;

                    foreach (var path2D in path)
                    {
                        _waitingPaths.Add(path2D);
                    }
                }
            }
        }
    public void EnterCharacterState(PlayerCharacterState.ECharacterState eState)
    {
        if (!m_Animator2D)
        {
            return;
        }

        if (m_CharacterState != null)
        {
            m_CharacterState.OnExit();
        }

        switch (eState)
        {
        case PlayerCharacterState.ECharacterState.Stationary:
        {
            m_CharacterState = m_StationaryState;
        }
        break;

        case PlayerCharacterState.ECharacterState.Run:
        {
            m_CharacterState = m_RunState;
        }
        break;

        case PlayerCharacterState.ECharacterState.JumpUp:
        {
            //WHY DOESN'T THIS WORK
            m_v3Velocity.y   = m_fJumpVelocity;
            m_CharacterState = m_JumpUpState;
        }
        break;

        case PlayerCharacterState.ECharacterState.FallDown:
        {
            m_CharacterState = m_FallDownState;
        }
        break;
        }

        m_CharacterState.OnEnter();

        //Play the current animation associated with this state
        if (!string.IsNullOrEmpty(m_CharacterState.AnimationName))
        {
            m_Animator2D.Play(m_CharacterState.AnimationName);
        }
    }
Esempio n. 4
0
        private void EndCallback()
        {
            lock (_runningLock)
            {
                if (_waitingPaths.Any())
                {
                    var animator = new Animator2D(FPSLimiterKnownValues.LimitSixty)
                    {
                        Paths = _waitingPaths.ToArray()
                    };
                    _waitingPaths.Clear();

                    animator.Play(_frameCallbackInvoker, _endCallback);
                }
                else
                {
                    _running = false;
                }
            }
        }
Esempio n. 5
0
 private void PlayButton(object sender, EventArgs e)
 {
     _animator.Play(pb_image, Animator2D.KnownProperties.Location);
 }
Esempio n. 6
0
 private void btn_play_Click(object sender, EventArgs e)
 {
     ani.Play(pb_image, Animator2D.KnownProperties.Location);
 }
Esempio n. 7
0
 private void vlcControl1_MouseClick(object sender, MouseEventArgs e)
 {
     _animator.Play(panel2, Animator2D.KnownProperties.Location);
 }