WarTornLands.Entities.Modules.Think.Parts.SwingHitAbility.TryExecute C# (CSharp) Method

TryExecute() public method

public TryExecute ( ) : bool
return bool
        public bool TryExecute()
        {
            if (_owner is Player && Player.Instance.Inventory.Hammer.HasNone)
            {
                return false;
            }

            if (this.Active)
                return false;

            // Lock owner direction while hitting
            _owner.FaceLock = true;

            _cm.StartCounter(_cSwingHit, false);

            if (Use != null)
                Use(null, EventArgs.Empty);

            return true;
        }