Exemple #1
0
    private void FixedUpdate()
    {
        if (_enable)
        {
            movementSM.CurrentState.PhysicsUpdate();

            if (Input.GetKey(KeyCode.Space))
            {
                rigidBody.AddForce(transform.up * 0.5f, ForceMode2D.Impulse);
            }
        }
        _move  = Input.GetAxis("Horizontal");
        _angle = ControlOptions.GetAngle();
    }