Project structure, add docs update unity version
This commit is contained in:
@@ -87,15 +87,15 @@ public abstract class Character : MonoBehaviour
|
||||
if (isAllowVertical)
|
||||
{
|
||||
SetClimbingAnimation(v_movement != 0);
|
||||
_body.velocity = new Vector2(h_movement * _movementSpeed, v_movement * _movementSpeed);
|
||||
_body.linearVelocity = new Vector2(h_movement * _movementSpeed, v_movement * _movementSpeed);
|
||||
}
|
||||
else{
|
||||
_body.velocity = new Vector2(h_movement * _movementSpeed, _body.velocity.y);
|
||||
_body.linearVelocity = new Vector2(h_movement * _movementSpeed, _body.linearVelocity.y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_body.velocity = new Vector2(h_movement * _movementSpeed, _body.velocity.y);
|
||||
_body.linearVelocity = new Vector2(h_movement * _movementSpeed, _body.linearVelocity.y);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -115,12 +115,12 @@ public abstract class Character : MonoBehaviour
|
||||
}
|
||||
if (_isFalling)
|
||||
{
|
||||
_body.velocity = new Vector2(0, _body.velocity.y);
|
||||
_body.linearVelocity = new Vector2(0, _body.linearVelocity.y);
|
||||
SetWalkingAnimation(false);
|
||||
|
||||
if (block?.ElementSO.ElementType == MapElementType.Ladder)
|
||||
{
|
||||
_body.velocity = Vector2.zero;
|
||||
_body.linearVelocity = Vector2.zero;
|
||||
_isOnLadder = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user