private void SingleFireMode(On_ChargeCaptainShotgun.orig_FixedUpdate orig, ChargeCaptainShotgun self)
        {
            orig.Invoke(self);

            if (self.GetFieldValue <bool>("released"))
            {
                fixedAge = 0;
            }
        }
        private void AutoFireMode(On_ChargeCaptainShotgun.orig_FixedUpdate orig, ChargeCaptainShotgun self)
        {
            var didFire  = false;
            var released = self.GetFieldValue <bool>("released");

            if (!released)
            {
                didFire  = true;
                fixedAge = 0;
                self.SetFieldValue("released", true);
            }

            orig.Invoke(self);

            if (didFire)
            {
                self.SetFieldValue("released", false);
            }
        }
        public void FixedUpdateHook(On_ChargeCaptainShotgun.orig_FixedUpdate orig, ChargeCaptainShotgun self)
        {
            fixedAge += Time.fixedDeltaTime;

            switch (fireMode)
            {
            case FireMode.Normal:
                SingleFireMode(orig, self);
                break;

            case FireMode.Auto:
                AutoFireMode(orig, self);
                break;

            case FireMode.AutoCharge:
                AutoFireChargeMode(orig, self);
                break;

            default:
                // fallback to single fire mode
                SingleFireMode(orig, self);
                break;
            }
        }