mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 19:25:54 +00:00
New maps and chests
This commit is contained in:
parent
7c7588c1a4
commit
26a0f51168
28 changed files with 645 additions and 233 deletions
31
Scripts/Actors/ChestMarker.cs
Normal file
31
Scripts/Actors/ChestMarker.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
[Tool]
|
||||
public partial class ChestMarker : FeatureMarker
|
||||
{
|
||||
private Texture2D _markerTexture;
|
||||
|
||||
[Export]
|
||||
public Texture2D MarkerTexture
|
||||
{
|
||||
get => _markerTexture;
|
||||
set
|
||||
{
|
||||
_markerTexture = value;
|
||||
if (Engine.IsEditorHint())
|
||||
{
|
||||
QueueRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void _Draw()
|
||||
{
|
||||
if (!Engine.IsEditorHint()) return;
|
||||
if (MarkerTexture is null) return;
|
||||
|
||||
DrawTexture(MarkerTexture, -new Vector2(MarkerTexture.GetWidth() / 2f, MarkerTexture.GetHeight() / 2f));
|
||||
}
|
||||
}
|
||||
1
Scripts/Actors/ChestMarker.cs.uid
Normal file
1
Scripts/Actors/ChestMarker.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://umyqgyxjiaig
|
||||
12
Scripts/Actors/FeatureMarker.cs
Normal file
12
Scripts/Actors/FeatureMarker.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
[Tool]
|
||||
public partial class FeatureMarker : Marker2D
|
||||
{
|
||||
[Export] public bool OverrideChance { get; set; } = false;
|
||||
|
||||
[Export(PropertyHint.None, "suffix:%")]
|
||||
public double SpawnChance { get; set; } = 15d;
|
||||
}
|
||||
1
Scripts/Actors/FeatureMarker.cs.uid
Normal file
1
Scripts/Actors/FeatureMarker.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cutqpv1k3bt2h
|
||||
Loading…
Add table
Add a link
Reference in a new issue