Finally bots can die. Player to. And another fixes.
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
using Unity.Mathematics;
|
||||
using System;
|
||||
using CameraScripts;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Animators.Leonid_Animator
|
||||
@ -10,7 +12,7 @@ namespace Animators.Leonid_Animator
|
||||
|
||||
private int _horizontal;
|
||||
private int _vertical;
|
||||
private bool _isCrouching = false;
|
||||
public bool isCrouching = false;
|
||||
private bool _isJumping;
|
||||
|
||||
private int _crouch;
|
||||
@ -77,14 +79,8 @@ namespace Animators.Leonid_Animator
|
||||
|
||||
if (pressedCrouching == true)
|
||||
{
|
||||
_isCrouching = !_isCrouching;
|
||||
if (_isCrouching == true)
|
||||
transform.Rotate(Vector3.up, 45);
|
||||
else
|
||||
{
|
||||
transform.Rotate(Vector3.up, -45);
|
||||
}
|
||||
anim.SetBool(_crouch, _isCrouching);
|
||||
isCrouching = !isCrouching;
|
||||
anim.SetBool(_crouch, isCrouching);
|
||||
}
|
||||
|
||||
anim.SetBool(_jump, pressedJumped);
|
||||
|
Reference in New Issue
Block a user