Skip to content

Commit

Permalink
Just some project cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nhawdge committed Nov 15, 2023
1 parent a6fb17e commit e048523
Show file tree
Hide file tree
Showing 21 changed files with 15 additions and 29 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed Assets/words1.png
Binary file not shown.
Binary file removed Assets/words2.png
Binary file not shown.
Binary file removed Assets/words3.png
Binary file not shown.
Binary file removed Assets/words4.png
Binary file not shown.
Binary file removed Assets/words5.png
Binary file not shown.
Binary file removed Assets/words6.png
Binary file not shown.
1 change: 0 additions & 1 deletion Scenes/Levels/Systems/EffectsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ internal override void Update(World world)
var rotatedOffset = RayMath.Vector2Rotate(offset, direction);

sprite.Position = truePosition + rotatedOffset;

}
else
{
Expand Down
1 change: 1 addition & 0 deletions Scenes/Levels/Systems/EnemyControlSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ internal override void Update(World world)
ship.Crew = 0;
var percent = (100 + ship.HullHealth) / 100;
sprite.Color.a = (byte)(255 * percent);
ship.HullHealth -= Raylib.GetFrameTime();
}
if (ship.HullHealth <= -100)
{
Expand Down
1 change: 0 additions & 1 deletion Scenes/Levels/Systems/RenderSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ internal override void Update(World world)
}
});


var effectSprites = new QueryDescription().WithAll<Sprite, Effect, LayerWater>().WithNone<MapTile>();
world.Query(in effectSprites, (entity) =>
{
Expand Down
11 changes: 10 additions & 1 deletion Scenes/Menus/MainMenu/CreditsScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@ internal class CreditsScene : BaseScene
public CreditsScene()
{
Systems.Add(new MenuSystem());

World.Create(new UiTitle { Text = @"Credits", Order = 1 });
World.Create(new UiTitle { Text = @"Nhawdge - Code", Order = 2 });
World.Create(new UiTitle { Text = @"Kaitlyn Schmidt - Game Design", Order = 3 });
World.Create(new UiTitle { Text = @"Game Design and Project Management?", Order = 4 });
World.Create(new UiTitle { Text = @"Barun Sinha - Sounds", Order = 5 });
World.Create(new UiTitle { Text = @"UnicornGirlie - Art ", Order = 6 });
World.Create(new UiTitle { Text = @"Kenney.nl - Pirate Asset Pack", Order = 7 });

World.Create(new UiButton
{
Text = "Back",
Action = () =>
{
NovemberPiratesEngine.Instance.ActiveScene = new MainMenuScene();
},
Order = 5
Order = 9
});
}
}
Expand Down
8 changes: 1 addition & 7 deletions Scenes/Menus/MainMenu/MainMenuScene.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Arch.Core.Extensions;
using NovemberPirates.Components;
using NovemberPirates.Components;
using NovemberPirates.Scenes.Levels;
using NovemberPirates.Scenes.Menus.Components;
using NovemberPirates.Scenes.Menus.Systems;
Expand Down Expand Up @@ -38,7 +37,6 @@ public MainMenuScene()
}
});


World.Create(new SpriteButton
{
Text = "HowToPlay",
Expand Down Expand Up @@ -79,7 +77,6 @@ public MainMenuScene()
}
});


World.Create(new UiButton
{
Text = "Exit",
Expand All @@ -89,9 +86,6 @@ public MainMenuScene()
},
Order = 5
});



}
}
}
19 changes: 2 additions & 17 deletions Scenes/Menus/Systems/MenuSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Arch.Core;
using Arch.Core.Extensions;
using NovemberPirates.Components;
using NovemberPirates.Extensions;
using NovemberPirates.Scenes.Menus.Components;
using NovemberPirates.Systems;
Expand All @@ -12,7 +11,6 @@ namespace NovemberPirates.Scenes.Menus.Systems
{
internal class MenuSystem : GameSystem
{

internal override void Update(World world) { }

internal override void UpdateNoCamera(World world)
Expand All @@ -22,7 +20,7 @@ internal override void UpdateNoCamera(World world)

var centerPoint = new Vector2(Raylib.GetScreenWidth() / 2, Raylib.GetScreenHeight() / 2);

var dummyrect = new Rectangle(centerPoint.X - 200, centerPoint.Y - 150, 400, 400);
var dummyrect = new Rectangle(centerPoint.X - 200, centerPoint.Y - 300, 400, 500);
//RayGui.GuiDummyRec(dummyrect, "");
var index = 0;

Expand All @@ -38,11 +36,7 @@ internal override void UpdateNoCamera(World world)
var titleComponent = entity.Get<UiTitle>();

var text = titleComponent.Text;
var rect = new Rectangle(centerPoint.X - 100, 200 + 50 * titleComponent.Order, 200, 100);
//RayGui.GuiTextBox(text, centerPoint.X - 200, centerPoint.Y - 200, 24, Raylib.ORANGE);


// TODO fix font size
var rect = new Rectangle(centerPoint.X - 100, 0 + 50 * titleComponent.Order, 200, 100);

RayGui.GuiLabel(rect, text);
}
Expand All @@ -64,9 +58,6 @@ internal override void UpdateNoCamera(World world)
{
var button = entity.Get<SpriteButton>();

//var rect = dummyrect with { x = dummyrect.x + 100, y = dummyrect.y + (60 * button.Order), width = 200, height = 50 };
//Raylib.DrawTexture(sprite, rect.x, rect.y, Raylib.WHITE);

button.ButtonSprite.Play("Normal");
button.TextSprite.Play(button.Text);
if (Raylib.CheckCollisionPointRec(Raylib.GetMousePosition(), button.ButtonSprite.Destination))
Expand All @@ -80,13 +71,7 @@ internal override void UpdateNoCamera(World world)
}
button.ButtonSprite.Draw();
button.TextSprite.Draw();

//if (RayGui.GuiButton(rect, button.Text))
//{
// button.Action();
//}
}

});
}
}
Expand Down
3 changes: 1 addition & 2 deletions Utilities/TextureManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NovemberPirates.Components;
using Raylib_CsLo;
using Raylib_CsLo;

namespace NovemberPirates.Utilities
{
Expand Down

0 comments on commit e048523

Please sign in to comment.