added Enemy
This commit is contained in:
@@ -29,12 +29,11 @@ public class Character : MonoBehaviour
|
||||
{
|
||||
var groundCheck = Physics2D.BoxCast(_boxCollider.bounds.center, _boxCollider.bounds.size, 0f, Vector2.down, .1f, groundLayer);
|
||||
|
||||
float h_movement=0;
|
||||
float v_movement=0;
|
||||
if (groundCheck || _isOnLadder)
|
||||
{
|
||||
_isFall = false;
|
||||
h_movement=inputHorizontal ;
|
||||
float h_movement = inputHorizontal;
|
||||
if (h_movement > 0 && !_facingRight)
|
||||
{
|
||||
FlipCharacter();
|
||||
|
||||
Reference in New Issue
Block a user