Created
January 20, 2020 14:02
-
-
Save oivoodoo/87ce6bb592a3da456c7ae7e2cb39e58d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CrystalBlast.Data; | |
namespace CrystalBlast.DebugTools | |
{ | |
using LunarConsolePlugin; | |
[CVarContainer] | |
// ReSharper disable once UnusedMember.Global | |
public static class Variables | |
{ | |
// ReSharper disable once UnusedMember.Global | |
public static readonly CVar Level = new CVar( | |
"Level", 1, CFlags.None, | |
new CVarProxy<int>( | |
() => Properties.Instance != null ? Properties.Instance.Game.Level : 1, | |
value => | |
{ | |
if (Properties.Instance != null) | |
{ | |
Properties.Instance.Game.Level = value; | |
} | |
return value; | |
} | |
) | |
); | |
// ReSharper disable once UnusedMember.Global | |
public static readonly CVar Coins = new CVar( | |
"Coins", 1, CFlags.None, | |
new CVarProxy<int>( | |
() => Properties.Instance != null ? Properties.Instance.Game.Coins : 1, | |
value => | |
{ | |
if (Properties.Instance != null) | |
{ | |
Properties.Instance.Game.Coins = value; | |
} | |
return value; | |
} | |
) | |
); | |
// ReSharper disable once UnusedMember.Global | |
public static readonly CVar DidReview = new CVar( | |
"Did review?", false, CFlags.None, | |
new CVarProxy<bool>( | |
() => | |
{ | |
if (Properties.Instance != null) | |
{ | |
return Properties.Instance.Game.DidReview; | |
} | |
return false; | |
}, | |
value => | |
{ | |
if (Properties.Instance != null) | |
{ | |
Properties.Instance.Game.DidReview = value; | |
} | |
return value; | |
} | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment