示例#1
0
        public IEnumerator AttackHandlerInit()
        {
            while (HeroController.instance == null)
            {
                yield return(null);
            }

            hc_instance        = HeroController.instance;
            h_state            = HeroController.instance.cState;
            knight             = HeroController.instance.GetAttr <Rigidbody2D>("rb2d");
            damageNumberTestGO = new GameObject("damageNumberTESTCLONE", typeof(Text), typeof(CanvasRenderer), typeof(RectTransform));
            DontDestroyOnLoad(damageNumberTestGO);
        }
示例#2
0
        private static bool CanQuickMap(On.HeroController.orig_CanQuickMap orig, HeroController self)
        {
            HeroControllerStates cs = self.cState;

            return(Storage
                ? !GameManager.instance.isPaused &&
                   !cs.onConveyor &&
                   !cs.dashing &&
                   !cs.backDashing &&
                   (!cs.attacking || ReflectionHelper.GetAttr <HeroController, float>(self, "attack_time") >= self.ATTACK_RECOVERY_TIME) &&
                   !cs.recoiling &&
                   !cs.hazardDeath &&
                   !cs.hazardRespawning
                : orig(self));
        }
示例#3
0
        private static bool CanOpenInventory(On.HeroController.orig_CanOpenInventory orig, HeroController self)
        {
            HeroControllerStates cs = self.cState;

            return(MenuDrop
                ? !GameManager.instance.isPaused &&
                   !self.controlReqlinquished &&
                   !cs.recoiling &&
                   !cs.transitioning &&
                   !cs.hazardDeath &&
                   !cs.hazardRespawning &&
                   !self.playerData.disablePause &&
                   self.CanInput() ||
                   self.playerData.atBench
                : orig(self));
        }
示例#4
0
        public IEnumerator InitRoutine()
        {
            while (HeroController.instance == null)
            {
                yield return(null);
            }
            clickAudioGO = new GameObject("GunEmptyGO", typeof(AudioSource));
            fireAudioGO  = new GameObject("GunFireGO", typeof(AudioSource));

            DontDestroyOnLoad(clickAudioGO);
            DontDestroyOnLoad(fireAudioGO);

            h_state            = HeroController.instance.cState;
            knight             = HeroController.instance.GetAttr <Rigidbody2D>("rb2d");
            damageNumberTestGO = new GameObject("damageNumberTESTCLONE", typeof(Text), typeof(CanvasRenderer), typeof(RectTransform));
            DontDestroyOnLoad(damageNumberTestGO);
        }