public override void Update() { base.Update(); if (base.LastOwner != null) { GungeonActions m_activeActions = WowTasticPaintbrush.ReflectGetField <GungeonActions>(typeof(PlayerController), "m_activeActions", base.LastOwner); bool IsKeyboardAndMouse = BraveInput.GetInstanceForPlayer(base.LastOwner.PlayerIDX).IsKeyboardAndMouse(false); if (IsKeyboardAndMouse) { this.spawnpos = base.LastOwner.unadjustedAimPoint.XY() - (base.LastOwner.CenterPosition - base.LastOwner.specRigidbody.UnitCenter); } else { if (m_activeActions != null) { spawnpos += m_activeActions.Aim.Vector.normalized * BraveTime.DeltaTime * 10f; } } BraveInput input = BraveInput.GetInstanceForPlayer(base.LastOwner.PlayerIDX); if (this.IsCurrentlyActive && input.ActiveActions.GetActionFromType(GungeonActions.GungeonActionType.Shoot).IsPressed&& !input.ActiveActions.GetActionFromType(GungeonActions.GungeonActionType.Shoot).WasPressed&& Time.frameCount % 5 == 0) { if (this.numberOfUses == 3) { DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(WowTasticPaintbrush.goopDefs[0]).AddGoopCircle(this.spawnpos, 0.9f); } else if (this.numberOfUses == 2) { DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(WowTasticPaintbrush.goopDefs[1]).AddGoopCircle(this.spawnpos, 0.9f); } else if (this.numberOfUses == 1) { DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(WowTasticPaintbrush.goopDefs[2]).AddGoopCircle(this.spawnpos, 0.9f); for (int i = 0; i < StaticReferenceManager.AllGoops.Count; i++) { StaticReferenceManager.AllGoops[i].ElectrifyGoopCircle(base.LastOwner.specRigidbody.UnitBottomCenter, 50f); } } } /*if(Time.frameCount % 10 == 0 && this.instanceHat) * { * if (this.instanceHatSprite) * { * this.disengageEffect(base.LastOwner); * this.engageEffect(base.LastOwner); * if (base.LastOwner.IsFalling) * { * this.instanceHatSprite.renderer.enabled = false; * } * else * { * this.instanceHatSprite.renderer.enabled = true; * } * if (base.LastOwner.IsBackfacing() && !this.instanceHatSprite.IsPlaying("back")) * { * this.instanceHatSprite.Play("back"); * } * else if (!base.LastOwner.IsBackfacing() && !this.instanceHatSprite.IsPlaying("front")) * { * this.instanceHatSprite.Play("front"); * } * if (this.instanceHatSprite.sprite.FlipX != base.LastOwner.sprite.FlipX) * { * this.instanceHatSprite.transform.localPosition.Set(this.instanceHatSprite.transform.localPosition.x * -1, this.instanceHatSprite.transform.localPosition.y, this.instanceHatSprite.transform.localPosition.z); * } * if (GameManager.Instance.CurrentLevelOverrideState == GameManager.LevelOverrideState.END_TIMES) * { * this.disengageEffect(base.LastOwner); * } * } * else if(GameManager.Instance.CurrentLevelOverrideState != GameManager.LevelOverrideState.END_TIMES) * { * this.engageEffect(base.LastOwner); * } * }*/ } }
public override void Start() { ItemBuilder.Init(); //Hooks.Init(); //EnemyTools.Init(); //Tools.Init(); //EnemyBuilder.Init(); LifeCube.Register(); GungeonWind.Register(); FriendshipBracelet.Register(); FlamingSkull.Register(); Carrot.Register(); WinchestersHat.Register(); GundromedaPain.Register(); Bleaker.Register(); CheeseAmmolet.Register(); StrawberryJam.Register(); //WhiteBulletCell.Register(); Distribullets.Register(); HungryClips.Register(); TatteredCape.Register(); HeroicCape.Register(); Popcorn.Register(); RepurposedShellCasing.Register(); GatlingGullets.Register(); //SomeBunny.Register(); FittedTankBarrel.Register(); LeadCrown.Register(); //PiratesPendant.Register(); PendantOfTheFirstOrder.Register(); MimicBullets.Register(); CatchingMitts.Register(); Protractor.Register(); HealthyBullets.Register(); ChamberOfFrogs.Register(); TrickShot.Register(); ShowoffBullets.Register(); BabyGoodShellicopter.Init(); PrismaticGuonStone.Init(); //GoonStone.Init(); Overpill.Init(); JammomancersHat.Init(); ShotgunEnergyDrink.Init(); BowlersBriefcase.Init(); FatalOptics.Init(); MicroEnhancement.Init(); TargetingSpecs.Init(); GunShredder.Init(); GlassPrincesCannon.Add(); Rewind.Init(); Telegunesis.Init(); //Underpill.Init(); AegisShield.Init(); AmmocondasNest.Init(); ShadesShades.Init(); BeholstersBelt.Init(); SuspiciousLookingBell.Init(); WowTasticPaintbrush.Init(); SmokingSkull.Init(); PortableSewerGrate.Init(); GoldenCirclet.Init(); //PackOfLostItems.Init(); CapeOfTheResourcefulRat.Init(); //DemonicBrick.Init(); EffigyOfVengeance.Init(); HornOfTheDragun.Init(); PickpocketGuide.Init(); SpillOJar.Init(); PhaseShifterStopwatch.Init(); Rhythminator.Add(); //Bubbler.Add(); StartStriker.Add(); PrizeRifle.Add(); MultiActiveReloadManager.SetupHooks(); EasyGoopDefinitions.DefineDefaultGoops(); //ZipFilePath = this.Metadata.Archive; //FilePath = this.Metadata.Directory; //AudioResourceLoader.InitAudio; SaveAPIManager.Setup("bb:"); Log($"{MOD_NAME} v{VERSION} started successfully.", TEXT_COLOR); }