Skip to content

Commit

Permalink
refactor: move pasta shared para dentro da pasta modules
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickreisx committed Jan 27, 2025
1 parent 9f3609e commit 12cd0aa
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 27 deletions.
48 changes: 24 additions & 24 deletions Modules/Game/Scripts/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@ namespace DungeonRoyale.Modules.Game.Scripts;

public partial class Game : Node2D
{
private static TilesManager _tilesManager => TilesManager.Instance!;
private static TilesManager _tilesManager => TilesManager.Instance!;

[Export] public MapSettingsResource MapSettings { get; private set; } = new MapSettingsResource();
[Export] public MapSettingsResource MapSettings { get; private set; } = new MapSettingsResource();

private bool MapIsLoading { get; set; } = true;
private bool MapIsLoading { get; set; } = true;

public override void _Ready()
{
_tilesManager.SetUpTiles(MapSettings.Width, MapSettings.Height);
public override void _Ready()
{
_tilesManager.SetUpTiles(MapSettings.Width, MapSettings.Height);

if (FindChild(nameof(MapScanner), true) is not MapScanner mapScanner)
{
GD.PrintErr("MapScanner node not found.");
return;
}
if (FindChild(nameof(MapScanner), true) is not MapScanner mapScanner)
{
GD.PrintErr("MapScanner node not found.");
return;
}

mapScanner.MapScanned += OnMapScanned;
mapScanner.Scan(MapSettings.Width, MapSettings.Height);
}
mapScanner.MapScanned += OnMapScanned;
mapScanner.Scan(MapSettings.Width, MapSettings.Height);
}

public void OnMapScanned()
{
MapIsLoading = false;
public void OnMapScanned()
{
MapIsLoading = false;

// Do something with the scanned map
}
// Do something with the scanned map
}

public void OnMapGenerated()
{
MapIsLoading = false;
public void OnMapGenerated()
{
MapIsLoading = false;

// Do something with the generated map
}
// Do something with the generated map
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://4gd2xpuyufru"
path="res://.godot/imported/font1.ttf-6e7ba9975eab5806005bb5a794c32bb2.fontdata"
path="res://.godot/imported/font1.ttf-a1e3d7eaf2a3dd96c6c75edf31a94005.fontdata"

[deps]

source_file="res://Shared/Resources/font1.ttf"
dest_files=["res://.godot/imported/font1.ttf-6e7ba9975eab5806005bb5a794c32bb2.fontdata"]
source_file="res://Modules/Shared/Resources/font1.ttf"
dest_files=["res://.godot/imported/font1.ttf-a1e3d7eaf2a3dd96c6c75edf31a94005.fontdata"]

[params]

Expand All @@ -23,6 +23,7 @@ allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Modules/Shared/Scripts/Extensions/NodeExtensions.cs.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://buc28pwwo43g6

0 comments on commit 12cd0aa

Please sign in to comment.