diff --git a/scripts/Cube.cs b/scripts/Cube.cs index 9909a91..9086899 100644 --- a/scripts/Cube.cs +++ b/scripts/Cube.cs @@ -76,7 +76,7 @@ public partial class Cube : StaticBody2D, ITileDraggable new(new Vector2I(13, 33), equip2Rect), }; - private bool _draggable = false; + private bool _draggable; public bool Draggable { get => _draggable; set { diff --git a/scripts/Lab.cs b/scripts/Lab.cs index d87991d..a1195d6 100644 --- a/scripts/Lab.cs +++ b/scripts/Lab.cs @@ -55,7 +55,7 @@ public partial class Lab : Node2D GD.Print(H.RectHasPointInclusive(r, new Vector2I(1,0))); } - private Label _moneyLabel = null; + private Label _moneyLabel; // Called every frame. 'delta' is the elapsed time since the previous frame. public override void _Process(double delta) { @@ -81,7 +81,7 @@ public partial class Lab : Node2D } } - private bool _isDragging = false; + private bool _isDragging; public void Pickup(ITileDraggable target) { if (target == null) return; _isDragging = true; @@ -98,7 +98,7 @@ public partial class Lab : Node2D DraggingTarget = null; UpdateMap(); } - public ITileDraggable DraggingTarget { get; set; } = null; + public ITileDraggable DraggingTarget { get; set; } public const int MapWidth = 40; public const int MapHeight = 21; diff --git a/scripts/Loader.cs b/scripts/Loader.cs index c5e8026..df9f678 100644 --- a/scripts/Loader.cs +++ b/scripts/Loader.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; public partial class Loader : Control { private ProgressBar _progressBar; - private int _sceneLoaded = 0; + private int _sceneLoaded; private List _resToLoad = new (){ "res://scenes/lab.tscn", "res://scenes/player.tscn" diff --git a/scripts/Student.cs b/scripts/Student.cs index cebfed9..277769a 100644 --- a/scripts/Student.cs +++ b/scripts/Student.cs @@ -9,7 +9,7 @@ public partial class Student : CharacterBody2D { public float Speed { get; set; } = 8.0f; public const float JumpVelocity = -400.0f; - [Export] public bool Use16X16Sprites { get; set; } = false; + [Export] public bool Use16X16Sprites { get; set; } // --- MVP: Model Binding --- public StudentModel Model { get; private set; } @@ -34,7 +34,7 @@ public partial class Student : CharacterBody2D private Vector2I _targetSpecialPosition; private Vector2I _lastWalkablePosition; - private double _duration = 0; + private double _duration; private void SitDown(double delta) {