Complete C# rewrite with working game in Editor (#6)
* Refactor collectable components to C# and update resource scripts for consistency * Update resource paths and refactor properties for consistency * Refactor UI components to inherit from Control and update node paths for consistency * Update node paths and group assignments for consistency across scenes * Refactor GameManager and PlayerDeathComponent for improved state management and logging; update scene connections for player death handling * Add PhantomCamera components and UI elements for improved scene management; refactor existing components for better integration * Refactor skill components and update resource paths for consistency; enhance skill management in scenes * Add new UID files and update scene configurations for dialogue components; refactor skill management and input handling * Add next level command and refactor player retrieval in GameManager; update scene files for consistency * Add skill upgrade system and refactor skill components for enhanced functionality; update resource paths and configurations * Enhance ChargeProgressBar and Marketplace functionality; add owner exit handling and update skill button states * Refactor ChargeProgressBar and SkillManager; update skill handling and improve component interactions * Refactor player and level configurations; streamline FlipPlayerComponent and reposition Spaceship Enter
This commit is contained in:
@@ -4,6 +4,6 @@ namespace Mr.BrickAdventures.scripts.Resources;
|
||||
|
||||
public partial class CollectableResource : Resource
|
||||
{
|
||||
[Export] public Variant Amount { get; set; } = 0.0;
|
||||
[Export] public float Amount { get; set; } = 0.0f;
|
||||
[Export] public CollectableType Type { get; set; }
|
||||
}
|
13
scripts/Resources/LevelResource.cs
Normal file
13
scripts/Resources/LevelResource.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Godot;
|
||||
|
||||
namespace Mr.BrickAdventures.scripts.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class LevelResource : Resource
|
||||
{
|
||||
[Export]
|
||||
public string LevelName { get; set; } = string.Empty;
|
||||
|
||||
[Export]
|
||||
public string ScenePath { get; set; } = string.Empty;
|
||||
}
|
1
scripts/Resources/LevelResource.cs.uid
Normal file
1
scripts/Resources/LevelResource.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c2h0pqhxiqswe
|
@@ -8,12 +8,12 @@ public partial class SkillData : Resource
|
||||
{
|
||||
[Export] public string Name { get; set; } = "New Skill";
|
||||
[Export] public string Description { get; set; } = "New Skill";
|
||||
[Export] public Dictionary<string, Variant> Config { get; set; } = new();
|
||||
[Export] public int Cost { get; set; } = 0;
|
||||
[Export] public Texture2D Icon { get; set; }
|
||||
[Export] public bool IsActive { get; set; } = false;
|
||||
[Export] public int Level { get; set; } = 1;
|
||||
[Export] public int MaxLevel { get; set; } = 1;
|
||||
[Export] public SkillType Type { get; set; } = SkillType.Throw;
|
||||
[Export] public PackedScene Node { get; set; }
|
||||
[Export] public Array<SkillUpgrade> Upgrades { get; set; } = [];
|
||||
|
||||
public int MaxLevel => Upgrades.Count;
|
||||
}
|
12
scripts/Resources/SkillUpgrade.cs
Normal file
12
scripts/Resources/SkillUpgrade.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
namespace Mr.BrickAdventures.scripts.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class SkillUpgrade : Resource
|
||||
{
|
||||
[Export] public int Cost { get; set; } = 50;
|
||||
[Export(PropertyHint.MultilineText)] public string Description { get; set; } = "Upgrade Description";
|
||||
[Export] public Dictionary<string, Variant> Properties { get; set; } = new();
|
||||
}
|
1
scripts/Resources/SkillUpgrade.cs.uid
Normal file
1
scripts/Resources/SkillUpgrade.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dwb0e05pewcsn
|
@@ -1,13 +1,13 @@
|
||||
using Godot;
|
||||
using Mr.BrickAdventures.scripts.interfaces;
|
||||
|
||||
namespace Mr.BrickAdventures.scripts.Resources;
|
||||
|
||||
public partial class TapThrowInputResource : ThrowInputResource
|
||||
{
|
||||
public override void Update(double delta)
|
||||
|
||||
public override void ProcessInput(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionPressed("attack"))
|
||||
if (@event.IsActionPressed("attack"))
|
||||
{
|
||||
EmitSignalThrowRequested(1f);
|
||||
}
|
||||
|
@@ -9,16 +9,14 @@ public abstract partial class ThrowInputResource : Resource, IThrowInput
|
||||
|
||||
public virtual void ProcessInput(InputEvent @event)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual void Update(double delta)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual bool SupportsCharging()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user