private static void HitboxOnRender(On.Monocle.Hitbox.orig_Render orig, Hitbox self, Camera camera, Color color) { if (self.Entity is not Player player || !Settings.ShowHitboxes || Settings.ShowActualCollideHitboxes == ActualCollideHitboxTypes.Off || Manager.FrameLoops > 1 || player.Scene is Level { Transitioning : true } || player.LoadActualCollidePosition() == null ||
private void modHitboxRender(On.Monocle.Hitbox.orig_Render orig, Monocle.Hitbox self, Monocle.Camera camera, Color color) { if (Settings.Enabled && Settings.DebugHitboxes) { DisplayBounds(self, (int)(self.AbsoluteX - 1), (int)(self.AbsoluteY - 1), (int)(self.Width + 3), (int)(self.Height + 3), color); } else { orig(self, camera, color); } }
private static void HitboxOnRender(On.Monocle.Hitbox.orig_Render orig, Hitbox self, Camera camera, Color color) { if (!CelesteTasModule.Settings.ShowHitboxes) { orig(self, camera, color); return; } if (self.Entity is FinalBossShot) { color = Color.Aqua; } orig(self, camera, color); }
private static void DrawAssistedHitbox(On.Monocle.Hitbox.orig_Render orig, Hitbox self, Camera camera, Player player, Vector2 hitboxPosition) { Collider origCollider = player.Collider; Collider hurtbox = (Collider)PlayerHurtbox.GetValue(player); Vector2 origPosition = player.Position; player.Position = hitboxPosition; orig(self, camera, HitboxColor); player.Collider = hurtbox; Draw.HollowRect(hurtbox, HurtboxColor); player.Collider = origCollider; player.Position = origPosition; }
private static void ModHitbox(On.Monocle.Hitbox.orig_Render orig, Hitbox hitbox, Camera camera, Color color) { Entity entity = hitbox.Entity; if (entity is WallBooster) { Draw.Rect(hitbox.AbsolutePosition, hitbox.Width, hitbox.Height, HitboxColor.EntityColorInverselyLessAlpha); return; } if (entity is ClutterBlockBase clutterBlockBase && !clutterBlockBase.Collidable) { return; } orig(hitbox, camera, color); }
private static void HitboxOnRender(On.Monocle.Hitbox.orig_Render orig, Hitbox self, Camera camera, Color color) { if (!(self.Entity is Player player) || !Settings.ShowHitboxes || Settings.ShowActualCollideHitboxes == ActualCollideHitboxTypes.Off || Manager.FrameLoops > 1 || player.LoadActualCollidePosition() == null || player.LoadActualCollidePosition().Value == player.Position || player.Scene is Level level && level.Transitioning ) { orig(self, camera, color); return; } DrawAssistedHitbox(orig, self, camera, player, player.LoadActualCollidePosition().Value); orig(self, camera, color); }
private static void ModHitbox(On.Monocle.Hitbox.orig_Render orig, Hitbox hitbox, Camera camera, Color color) { if (!Settings.ShowHitboxes || !Settings.SimplifiedHitboxes) { orig(hitbox, camera, color); return; } Entity entity = hitbox.Entity; if (entity is WallBooster || entity.GetType().FullName == "Celeste.Mod.ShroomHelper.Entities.SlippyWall") { color = HitboxColor.EntityColorInverselyLessAlpha; } if (entity is FireBall fireBall && (bool)FireBallIceMode.GetValue(fireBall) == false) { return; } orig(hitbox, camera, color); }
private static void HitboxOnRender(On.Monocle.Hitbox.orig_Render orig, Hitbox self, Camera camera, Color color) { DrawLastFrameHitbox(self, color, hitboxColor => orig(self, camera, hitboxColor)); }