//private bool CanSpin => protected override void Awake() { base.Awake(); _stamina = _maxStamina; _mellee = GetComponentInChildren <MelleeWeapon>(); _pUIMngr = GetComponent <PlayerUIManager>(); moveAxis = Vector2.zero; _inputMaster = new InputManager(); _inputMaster.Player.Movement.performed += ctx => moveAxis = ctx.ReadValue <Vector2>(); _inputMaster.Player.WeaponSpin.performed += ctx => _weaponSpinAxis = ctx.ReadValue <float>(); }
private void FindParentWeapon() { MelleeWeapon[] mellees = GetComponentsInParent <MelleeWeapon>(); for (int i = 0; i < mellees.Length; i++) { if (mellees[i].transform == transform.parent) { _parentWeapon = mellees[i]; return; } } Debug.LogError($"Parent Weapon not found on: {name} !"); }