Skip to content

Instantly share code, notes, and snippets.

@oivoodoo
Created January 20, 2020 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oivoodoo/87ce6bb592a3da456c7ae7e2cb39e58d to your computer and use it in GitHub Desktop.
Save oivoodoo/87ce6bb592a3da456c7ae7e2cb39e58d to your computer and use it in GitHub Desktop.
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