Files
EGJ25/addons/godot_state_charts/csharp/ResourceWrapper.cs
minimata 9a79715e47
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 3m16s
feat: made sure the aspect ration fit a pixel art game and added useful addons
2025-06-27 15:19:12 +02:00

40 lines
1.1 KiB
C#

// ReSharper disable once CheckNamespace
namespace GodotStateCharts
{
using Godot;
/// <summary>
/// Base class for all wrapper classes for Godot Resource types. Provides common functionality. Not to be used directly.
/// </summary>
public abstract class ResourceWrapper
{
/// <summary>
/// The wrapped resource. Useful for you need to access the underlying resource directly,
/// e.g. for serialization.
/// </summary>
public readonly Resource Wrapped;
protected ResourceWrapper(Resource wrapped)
{
Wrapped = wrapped;
}
/// <summary>
/// Allows to call methods on the wrapped resource deferred.
/// </summary>
public Variant CallDeferred(string method, params Variant[] args)
{
return Wrapped.CallDeferred(method, args);
}
/// <summary>
/// Allows to call methods on the wrapped resource.
/// </summary>
public Variant Call(string method, params Variant[] args)
{
return Wrapped.Call(method, args);
}
}
}