using System; using Framework.Services; namespace Framework.Actors.Shooter { /// Abilities a playable character possesses public class Abilities : ScriptComponent { /// Number of jumps the character can do (reset upon ground contact) /// /// /// Setting this number to zero prevents the character from jumping at all, /// a value of 1 would allow normal jumping off the ground at 2 would allow /// for one "air-jump" where the character gets an upwards impulse in mid-air. /// /// /// Running off a platform also counts as one jump, so with this value set to 2, /// after falling off a platform, the character can only jump off in mid-air once. /// /// public int JumpCount = 1; /// How high the character can jump with a normal jump /// /// Player-controlled characters can control their jump high by how long the jump /// key is held. This is the maximum height the character will achieve when /// the jump key is not released until the apex of the jump or later. /// public float JumpHeight = 2.0f; /// How much the character can be controlled during a jump or fall /// /// A factor of 1.0 means that the player can control the character's horizontal /// movement in the air just as good as on the ground, a factor of 0.0 would prevent /// the player from altering the character's trajectory at all after jumping off. /// public float AirControlFactor = 1.0f; /// How fast the character moves horizontally when sneaking public float SneakingSpeed = 5.0f; /// How fast the character moves horizontally when walking public float WalkingSpeed = 10.0f; /// How fast the character moves horizontally when running public float RunningSpeed = 15.0f; /// How quickly the character accelerates /// /// This goes for all movement speeds, so if the user holds the sprint key, /// the character will accelerate quicker, still reaching the full speed /// within this time. /// public float SecondsToFullSpeed = 0.25f; /// How quickly the character turns around when moving /// /// This is used when the character is moved in cutscenes and indirectly /// by player input. The default actor controller implementation will let /// the player turn the character's head without moving the body. Starting /// to run will then turn the body into the direction the player is running /// using this speed. Note that the character will at most to a half-turn, /// so setting this to 1 second means the worst case turn will be 0.5 seconds. /// public float TurnDegreesPerSecond = 180.0f; /// How long the jump button needs to be held for maximum jump height /// /// /// If this is set to 0, the actor will always jump to the maximum height /// without allowing the player to make smaller jumps. Other values indicate /// the time for which the player has to hold the jump key to achieve maximum /// height, allowing for smaller jumps by pressing the jump key for a shorter /// duration /// /// /// This works by 'boosting' the jump during the initial stage (applying /// the required upwards force over a small time frame) rather than /// applying the full force as a single impulse. Having extremely long boost /// durations will not work because /// /// public float JumpBoostDuration = 0.25f; /// Whether the character can move extra fast /// > /// This is a simple sprint function that makes the character move faster when /// the player holds the 'sprint' button. /// public bool CanSprint = false; } } // namespace Framework.Actors.Shooter