brand new start
This commit is contained in:
parent
a41ca5669b
commit
f15f38bfc4
464 changed files with 5 additions and 20007 deletions
|
|
@ -1,20 +0,0 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
[Tool]
|
||||
public partial class MoneyReward : RewardResource
|
||||
{
|
||||
[Export] public int Cost;
|
||||
public override PackedScene GetPreview()
|
||||
{
|
||||
return Scene;
|
||||
}
|
||||
public override bool Redeem()
|
||||
{
|
||||
PlayerProgress.Instance.Money += Cost;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://dtfmy3los1si1
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
[Tool]
|
||||
public partial class PlantReward : RewardResource
|
||||
{
|
||||
[Export]
|
||||
public PlantResource Plant { get; private set; }
|
||||
public override PackedScene GetPreview()
|
||||
{
|
||||
return Plant.Scene;
|
||||
}
|
||||
public override bool Redeem()
|
||||
{
|
||||
if (PlayerProgress.Instance.PlayerPlants.Contains(Plant) == false)
|
||||
{
|
||||
PlayerProgress.Instance.PlayerPlants.Add(Plant);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://c8e40t5nbo83r
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
[Tool]
|
||||
public abstract partial class RewardResource : Resource
|
||||
{
|
||||
[Export]
|
||||
public PackedScene Scene { get; private set; }
|
||||
[Export] public string Name { get; private set; }
|
||||
[Export] public string Description { get; private set; }
|
||||
public abstract PackedScene GetPreview();
|
||||
public abstract bool Redeem();
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://co3cs8suo67gw
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
using Godot;
|
||||
|
||||
[Tool]
|
||||
public partial class EntityResource : Resource
|
||||
{
|
||||
[Export] public string NameKey;
|
||||
[Export] public string DescriptionKey;
|
||||
[Export] public float Cost;
|
||||
[Export] public PackedScene Scene;
|
||||
[Export] public float ReloadTime;
|
||||
[Export(PropertyHint.Range, "0,1,0.01")] public float ReloadProgress;
|
||||
[Export] public Texture2D Preview;
|
||||
[Export] public CustomSeedpacketFrame CustomFrame;
|
||||
[Export] public int Order = 0;
|
||||
public string parsedDescription;
|
||||
public bool isDescriptionParsed;
|
||||
private string internal_id = "";
|
||||
public string GetInternalID()
|
||||
{
|
||||
if (internal_id == "")
|
||||
{
|
||||
string[] splitstr = ResourcePath.Split('/');
|
||||
string file = splitstr[splitstr.Length - 1].ToLower();
|
||||
internal_id = file.TrimSuffix(".tres");
|
||||
}
|
||||
return internal_id;
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://j7wr5mj7j81b
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
[Tool]
|
||||
public partial class GridEntityResource : EntityResource
|
||||
{
|
||||
[Export] public int Layer = 1;
|
||||
[Export] public bool DontRegister = false;
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://bwjyra0xvhde5
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
[Tool]
|
||||
public partial class PlantResource : GridEntityResource
|
||||
{
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://cyenlko1knygw
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
[Tool]
|
||||
public partial class ZombieResource : EntityResource
|
||||
{
|
||||
public GridEntityResource ToGridEntity()
|
||||
{
|
||||
GridEntityResource result = new();
|
||||
|
||||
result.NameKey = NameKey;
|
||||
result.DescriptionKey = DescriptionKey;
|
||||
result.Cost = Cost;
|
||||
result.Scene = Scene;
|
||||
result.ReloadTime = ReloadTime;
|
||||
result.ReloadProgress = ReloadProgress;
|
||||
result.Preview = Preview;
|
||||
result.CustomFrame = CustomFrame;
|
||||
result.Order = Order;
|
||||
|
||||
result.Layer = 1;
|
||||
result.DontRegister = true;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://cqxj7o8hdm82n
|
||||
Loading…
Add table
Add a link
Reference in a new issue