-
Notifications
You must be signed in to change notification settings - Fork 6
Gravity Helper support + other fixes #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3422b6e
8dad60c
9f5af23
ddc2f38
5a5dc7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| using Microsoft.Xna.Framework; | ||
| using MonoMod.ModInterop; | ||
| using System; | ||
|
|
||
| namespace Celeste.Mod.VortexHelper.Misc; | ||
|
|
||
| internal static class GravityHelperInterop | ||
| { | ||
| [ModImportName("GravityHelper")] | ||
| internal static class Imports | ||
| { | ||
| public static Func<bool> IsPlayerInverted; | ||
|
Check warning on line 12 in Code/Misc/GravityHelperInterop.cs
|
||
| public static Func<Actor, bool> IsActorInverted; | ||
|
Check warning on line 13 in Code/Misc/GravityHelperInterop.cs
|
||
| public static Action BeginOverride; | ||
|
Check warning on line 14 in Code/Misc/GravityHelperInterop.cs
|
||
| public static Action EndOverride; | ||
|
Check warning on line 15 in Code/Misc/GravityHelperInterop.cs
|
||
| } | ||
|
|
||
| public static bool IsPlayerInverted() => Imports.IsPlayerInverted?.Invoke() ?? false; | ||
| public static bool IsActorInverted(Actor actor) => Imports.IsActorInverted?.Invoke(actor) ?? false; | ||
| public static void BeginOverride() => Imports.BeginOverride?.Invoke(); | ||
| public static void EndOverride() => Imports.EndOverride?.Invoke(); | ||
| public static Vector2 InvertIfRequired(Vector2 v) => IsPlayerInverted() ? new Vector2(v.X, -v.Y) : v; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.