20 lines
496 B
C#
20 lines
496 B
C#
using Godot;
|
|
using Newlon.Components.Level;
|
|
|
|
namespace Newlon.Debug;
|
|
|
|
public partial class Cheats : Node
|
|
{
|
|
public override void _Input(InputEvent @event)
|
|
{
|
|
if (OS.IsDebugBuild() == false) return;
|
|
if (@event.IsActionPressed("cheat_add_sun"))
|
|
{
|
|
RuntimeLevelData.Instance.AddSun(50);
|
|
}
|
|
if (@event.IsActionPressed("cheat_unlock_all"))
|
|
{
|
|
PlayerProgress.Instance.PlayerPlants = GameRegistry.GetPlants();
|
|
}
|
|
}
|
|
}
|