// 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); } }
// 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); }