Beispiel #1
0
    public void Awake()
    {
        _boxCollider = this.GetComponent <BoxCollider2D>();
        rayOrigins   = new RayCastOrigins();

        RecalculateDistanceBetweenRays();
        collisionState = new CharacterCollisionState2D();
    }
Beispiel #2
0
 public void CopyTo(CharacterCollisionState2D other)
 {
     other.right = right;
     other.left  = left;
     other.above = above;
     other.below = below;
     other.becameGroundedThisFrame = becameGroundedThisFrame;
     other.movingDownSlope         = movingDownSlope;
     other.aboveObject             = aboveObject;
     other.belowObject             = belowObject;
     other.leftObject  = leftObject;
     other.rightObject = rightObject;
     other.abovePoint  = abovePoint;
     other.belowPoint  = belowPoint;
     other.leftPoint   = leftPoint;
     other.rightPoint  = rightPoint;
     other.aboveNormal = aboveNormal;
     other.belowNormal = belowNormal;
     other.leftNormal  = leftNormal;
     other.rightNormal = rightNormal;
     other.slopeAngle  = slopeAngle;
 }
 private void Awake()
 {
     SetUpMasks();
     RecalculateDistanceBetweenRays();
     collisionState = new CharacterCollisionState2D();
 }