Пример #1
0
        // Update is called once per frame
        void Update()
        {
            DirectionType direction = GetDirection();

            if (DirectionType.None != direction)
            {
                CurrentDirection = direction;
                if (DirectionType.Stop == direction)
                {
                    SpeedBarScript.SetSpeed(MovementSpeed.GetSpeed(MovementType.Standing));
                }
                SetMovementPadImage(direction);
            }
        }
Пример #2
0
        // Update is called once per frame
        void Update()
        {
            if (!moduleActive)
            {
                return;
            }
            DirectionType direction = GetDirection();
            float         speed     = SpeedBarScript.GetSpeed();

            if ((DirectionType.Stop != direction) &&
                (DirectionType.None != direction) &&
                (0 == speed))
            {
                SpeedBarScript.SetSpeed(MovementSpeed.GetSpeed(MovementType.Walking));
                speed = SpeedBarScript.GetSpeed();
            }
            SetMove(direction, speed);
        }