SF Tool Documentation
Search Results for

    Show / Hide Table of Contents

    Class PlayerController

    A physics controller for the playable character that help implement gravity, slope mechanics, collision for platforms, and updates the MovementState while using the CollisionController for custom collision callbacks.

    This player specific controller also implements logic for the game when paused, character state is moved to a dialogue, and helps set up the instance object for other classes to know what is the player. This sets up the PlayerController instance in the game manager during the awake call. In the start call for objects being loaded at the same time, other objects can now get a reference to the PlayerController after it is set in OnAwake().

    Inheritance
    System.Object
    Controller2D
    GroundedController2D
    PlayerController
    Inherited Members
    GroundedController2D.OneWayPlatformFilter
    GroundedController2D.MovingPlatformLayer
    GroundedController2D.StandingOnObject
    GroundedController2D.IsGrounded
    GroundedController2D._wasGroundedLastFrame
    GroundedController2D.IsRunning
    GroundedController2D.IsSwimming
    GroundedController2D.IsJumping
    GroundedController2D.IsFalling
    GroundedController2D.IsGliding
    GroundedController2D.IsCrouching
    GroundedController2D.IsClimbing
    GroundedController2D._slopeNormal
    GroundedController2D.OneWayFilterBitMask
    GroundedController2D.OnGrounded
    GroundedController2D._character
    GroundedController2D._originalColliderSize
    GroundedController2D._modifiedColliderSize
    GroundedController2D._previousColliderSize
    GroundedController2D.ColisionChecks()
    GroundedController2D.GroundChecks()
    GroundedController2D.SideCollisionChecks()
    GroundedController2D.ClimbableSurfaceChecks()
    GroundedController2D.SlopeChecks()
    GroundedController2D.CalculateHorizontal()
    GroundedController2D.CalculateVertical()
    GroundedController2D.Move()
    GroundedController2D.CorrectCollisionClipping()
    GroundedController2D.ResizeCollider(Vector2)
    GroundedController2D.ResetColliderSize()
    GroundedController2D.UpdatePhysics(MovementProperties, PhysicsVolumeType)
    GroundedController2D.ResetPhysics(MovementProperties)
    Controller2D.ReferenceSpeed
    Controller2D.DistanceToGround
    Controller2D.DefaultPhysics
    Controller2D.CurrentPhysics
    Controller2D.PhysicsVolumeType
    Controller2D.CharacterState
    Controller2D.PlatformFilter
    Controller2D.Direction
    Controller2D._direction
    Controller2D._directionLastFrame
    Controller2D._previousDirection
    Controller2D.OnDirectionChanged
    Controller2D.IsFrozen
    Controller2D._boxCollider
    Controller2D._rigidbody2D
    Controller2D.Bounds
    Controller2D.CollisionInfo
    Controller2D.CollisionController
    Controller2D._calculatedVelocity
    Controller2D._externalVelocity
    Controller2D.CollisionActivated
    Controller2D.Init()
    Controller2D.OnInit()
    Controller2D.OnStart()
    Controller2D.FixedUpdate()
    Controller2D.OnLateUpdate()
    Controller2D.OnPreFixedUpdate()
    Controller2D.LowerToGround()
    Controller2D.FreezeController()
    Controller2D.UnfreezeController()
    Controller2D.SetExternalVelocity(Vector2)
    Controller2D.SetDirectionalForce(Vector2)
    Controller2D.AddVelocity(Vector2)
    Controller2D.AddHorizontalVelocity(Single)
    Controller2D.AddVerticalVelocity(Single)
    Controller2D.SetVelocity(Vector2)
    Controller2D.SetHorizontalVelocity(Single)
    Controller2D.SetVerticalVelocity(Single)
    Controller2D.DebugBoxCast(Vector2, Vector2, Single, Vector2, Single, LayerMask)
    Controller2D.DebugRayCast(Vector2, Vector2, Single, LayerMask)
    Controller2D.CeilingChecks()
    Controller2D.RaycastMultiple(Vector2, Vector2, Vector2, Single, LayerMask, Int32)
    Controller2D.RaycastMultiple(Vector2, Vector2, Vector2, Single, ContactFilter2D, Int32)
    Controller2D.CheckOnCollisionActions()
    Controller2D.ChangeDirection()
    Controller2D.SetDirection(Single)
    Controller2D.OnStatusEffectChanged(StatusEffect)
    Controller2D.PositionCorection()
    Controller2D.Reset()
    Controller2D.GetColliderBounds()
    Namespace: SF.Characters.Controllers
    Assembly: cs.temp.dll.dll
    Syntax
    public class PlayerController : GroundedController2D

    Methods

    CalculateMovementState()

    Declaration
    protected override void CalculateMovementState()
    Overrides
    GroundedController2D.CalculateMovementState()

    OnAwake()

    Declaration
    protected override void OnAwake()
    Overrides
    GroundedController2D.OnAwake()
    In This Article
    Back to top Generated by DocFX