From bd673c78726f8af1684330dd844f854e2ae9158b Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Sun, 20 Nov 2022 17:08:32 -0300 Subject: [PATCH] add public bolt and energy properties to game --- scenes/game/Game.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scenes/game/Game.cs b/scenes/game/Game.cs index 2bfd217..2d17518 100644 --- a/scenes/game/Game.cs +++ b/scenes/game/Game.cs @@ -3,9 +3,11 @@ using Godot; public sealed class Game : Node { [Export] - private int _energy { get; set; } = 3; + private int _energy = 3; [Export] - private int _bolts { get; set; } = 0; + private int _bolts = 0; + public int Energy { get { return _energy; } set { _energy = value; } } + public int Bolts { get { return _bolts; } set { _bolts = value; } } public enum PhysicsLayer : ushort { @@ -26,18 +28,10 @@ public sealed class Game : Node public void OnEnergyCollected(int energy) { _energy += energy; - if (OS.IsDebugBuild()) - { - GD.Print("Energy: " + _energy); - } } public void OnBoltCollected(int bolts) { _bolts += bolts; - if (OS.IsDebugBuild()) - { - GD.Print("Bolts: " + _bolts); - } } }