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:
117
addons/phantom_camera/scripts/resources/Camera3DResource.cs
Normal file
117
addons/phantom_camera/scripts/resources/Camera3DResource.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
using Godot;
|
||||
|
||||
namespace PhantomCamera;
|
||||
|
||||
public enum KeepAspect
|
||||
{
|
||||
KeepWidth,
|
||||
KeepHeight
|
||||
}
|
||||
|
||||
public enum ProjectionType
|
||||
{
|
||||
Perspective,
|
||||
Orthogonal,
|
||||
Frustum
|
||||
}
|
||||
|
||||
public class Camera3DResource(Resource resource)
|
||||
{
|
||||
public readonly Resource Resource = resource;
|
||||
|
||||
public KeepAspect KeepAspect
|
||||
{
|
||||
get => (KeepAspect)(int)Resource.Call(MethodName.GetKeepAspect);
|
||||
set => Resource.Call(MethodName.SetKeepAspect, (int)value);
|
||||
}
|
||||
|
||||
public int CullMask
|
||||
{
|
||||
get => (int)Resource.Call(MethodName.GetCullMask);
|
||||
set => Resource.Call(MethodName.SetCullMask, value);
|
||||
}
|
||||
|
||||
public void SetCullMaskValue(int layer, bool value) => Resource.Call(MethodName.SetCullMaskValue, layer, value);
|
||||
|
||||
public float HOffset
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetHOffset);
|
||||
set => Resource.Call(MethodName.SetHOffset, value);
|
||||
}
|
||||
|
||||
public float VOffset
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetVOffset);
|
||||
set => Resource.Call(MethodName.SetVOffset, value);
|
||||
}
|
||||
|
||||
public ProjectionType Projection
|
||||
{
|
||||
get => (ProjectionType)(int)Resource.Call(MethodName.GetProjection);
|
||||
set => Resource.Call(MethodName.SetProjection, (int)value);
|
||||
}
|
||||
|
||||
public float Fov
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetFov);
|
||||
set => Resource.Call(MethodName.SetFov, Mathf.Clamp(value, 1, 179));
|
||||
}
|
||||
|
||||
public float Size
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetSize);
|
||||
set => Resource.Call(MethodName.SetSize, Mathf.Clamp(value, 0.001f, float.PositiveInfinity));
|
||||
}
|
||||
|
||||
public Vector2 FrustumOffset
|
||||
{
|
||||
get => (Vector2)Resource.Call(MethodName.GetFrustumOffset);
|
||||
set => Resource.Call(MethodName.SetFrustumOffset, value);
|
||||
}
|
||||
|
||||
public float Near
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetNear);
|
||||
set => Resource.Call(MethodName.SetNear, Mathf.Clamp(value, 0.001f, float.PositiveInfinity));
|
||||
}
|
||||
|
||||
public float Far
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetFar);
|
||||
set => Resource.Call(MethodName.SetFar, Mathf.Clamp(value, 0.01f, float.PositiveInfinity));
|
||||
}
|
||||
|
||||
public static class MethodName
|
||||
{
|
||||
public const string GetKeepAspect = "get_keep_aspect";
|
||||
public const string SetKeepAspect = "set_keep_aspect";
|
||||
|
||||
public const string GetCullMask = "get_cull_mask";
|
||||
public const string SetCullMask = "set_cull_mask";
|
||||
public const string SetCullMaskValue = "set_cull_mask_value";
|
||||
|
||||
public const string GetHOffset = "get_h_offset";
|
||||
public const string SetHOffset = "set_h_offset";
|
||||
|
||||
public const string GetVOffset = "get_v_offset";
|
||||
public const string SetVOffset = "set_v_offset";
|
||||
|
||||
public const string GetProjection = "get_projection";
|
||||
public const string SetProjection = "set_projection";
|
||||
|
||||
public const string GetFov = "get_fov";
|
||||
public const string SetFov = "set_fov";
|
||||
|
||||
public const string GetSize = "get_size";
|
||||
public const string SetSize = "set_size";
|
||||
|
||||
public const string GetFrustumOffset = "get_frustum_offset";
|
||||
public const string SetFrustumOffset = "set_frustum_offset";
|
||||
|
||||
public const string GetNear = "get_near";
|
||||
public const string SetNear = "set_near";
|
||||
|
||||
public const string GetFar = "get_far";
|
||||
public const string SetFar = "set_far";
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
uid://jedyxlihuwbj
|
@@ -0,0 +1,92 @@
|
||||
using Godot;
|
||||
|
||||
namespace PhantomCamera.Noise;
|
||||
|
||||
public class PhantomCameraNoise2D(Resource resource)
|
||||
{
|
||||
public readonly Resource Resource = resource;
|
||||
|
||||
public float Amplitude
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetAmplitude);
|
||||
set => Resource.Call(MethodName.SetAmplitude, value);
|
||||
}
|
||||
|
||||
public float Frequency
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetFrequency);
|
||||
set => Resource.Call(MethodName.SetFrequency, value);
|
||||
}
|
||||
|
||||
public bool RandomizeNoiseSeed
|
||||
{
|
||||
get => (bool)Resource.Call(MethodName.GetRandomizeNoiseSeed);
|
||||
set => Resource.Call(MethodName.SetRandomizeNoiseSeed, value);
|
||||
}
|
||||
|
||||
public int NoiseSeed
|
||||
{
|
||||
get => (int)Resource.Call(MethodName.GetNoiseSeed);
|
||||
set => Resource.Call(MethodName.SetNoiseSeed, value);
|
||||
}
|
||||
|
||||
public bool RotationalNoise
|
||||
{
|
||||
get => (bool)Resource.Call(MethodName.GetRotationalNoise);
|
||||
set => Resource.Call(MethodName.SetRotationalNoise, value);
|
||||
}
|
||||
|
||||
public bool PositionalNoise
|
||||
{
|
||||
get => (bool)Resource.Call(MethodName.GetPositionalNoise);
|
||||
set => Resource.Call(MethodName.SetPositionalNoise, value);
|
||||
}
|
||||
|
||||
public float RotationalMultiplier
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetRotationalMultiplier);
|
||||
set => Resource.Call(MethodName.SetRotationalMultiplier, value);
|
||||
}
|
||||
|
||||
public float PositionalMultiplierX
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetPositionalMultiplierX);
|
||||
set => Resource.Call(MethodName.SetPositionalMultiplierX, value);
|
||||
}
|
||||
|
||||
public float PositionalMultiplierY
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetPositionalMultiplierY);
|
||||
set => Resource.Call(MethodName.SetPositionalMultiplierY, value);
|
||||
}
|
||||
|
||||
public static class MethodName
|
||||
{
|
||||
public const string GetAmplitude = "get_amplitude";
|
||||
public const string SetAmplitude = "set_amplitude";
|
||||
|
||||
public const string GetFrequency = "get_frequency";
|
||||
public const string SetFrequency = "set_frequency";
|
||||
|
||||
public const string GetRandomizeNoiseSeed = "get_randomize_noise_seed";
|
||||
public const string SetRandomizeNoiseSeed = "set_randomize_noise_seed";
|
||||
|
||||
public const string GetNoiseSeed = "get_noise_seed";
|
||||
public const string SetNoiseSeed = "set_noise_seed";
|
||||
|
||||
public const string GetRotationalNoise = "get_rotational_noise";
|
||||
public const string SetRotationalNoise = "set_rotational_noise";
|
||||
|
||||
public const string GetPositionalNoise = "get_positional_noise";
|
||||
public const string SetPositionalNoise = "set_positional_noise";
|
||||
|
||||
public const string GetRotationalMultiplier = "get_rotational_multiplier";
|
||||
public const string SetRotationalMultiplier = "set_rotational_multiplier";
|
||||
|
||||
public const string GetPositionalMultiplierX = "get_positional_multiplier_x";
|
||||
public const string SetPositionalMultiplierX = "set_positional_multiplier_x";
|
||||
|
||||
public const string GetPositionalMultiplierY = "get_positional_multiplier_y";
|
||||
public const string SetPositionalMultiplierY = "set_positional_multiplier_y";
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
uid://capjdoxs6gs6r
|
119
addons/phantom_camera/scripts/resources/PhantomCameraNoise3D.cs
Normal file
119
addons/phantom_camera/scripts/resources/PhantomCameraNoise3D.cs
Normal file
@@ -0,0 +1,119 @@
|
||||
using Godot;
|
||||
|
||||
namespace PhantomCamera.Noise;
|
||||
|
||||
public class PhantomCameraNoise3D(Resource resource)
|
||||
{
|
||||
public readonly Resource Resource = resource;
|
||||
|
||||
public float Amplitude
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetAmplitude);
|
||||
set => Resource.Call(MethodName.SetAmplitude, value);
|
||||
}
|
||||
|
||||
public float Frequency
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetFrequency);
|
||||
set => Resource.Call(MethodName.SetFrequency, value);
|
||||
}
|
||||
|
||||
public bool RandomizeNoiseSeed
|
||||
{
|
||||
get => (bool)Resource.Call(MethodName.GetRandomizeNoiseSeed);
|
||||
set => Resource.Call(MethodName.SetRandomizeNoiseSeed, value);
|
||||
}
|
||||
|
||||
public int NoiseSeed
|
||||
{
|
||||
get => (int)Resource.Call(MethodName.GetNoiseSeed);
|
||||
set => Resource.Call(MethodName.SetNoiseSeed, value);
|
||||
}
|
||||
|
||||
public bool RotationalNoise
|
||||
{
|
||||
get => (bool)Resource.Call(MethodName.GetRotationalNoise);
|
||||
set => Resource.Call(MethodName.SetRotationalNoise, value);
|
||||
}
|
||||
|
||||
public bool PositionalNoise
|
||||
{
|
||||
get => (bool)Resource.Call(MethodName.GetPositionalNoise);
|
||||
set => Resource.Call(MethodName.SetPositionalNoise, value);
|
||||
}
|
||||
|
||||
public float RotationalMultiplierX
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetRotationalMultiplierX);
|
||||
set => Resource.Call(MethodName.SetRotationalMultiplierX, value);
|
||||
}
|
||||
|
||||
public float RotationalMultiplierY
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetRotationalMultiplierY);
|
||||
set => Resource.Call(MethodName.SetRotationalMultiplierY, value);
|
||||
}
|
||||
|
||||
public float RotationalMultiplierZ
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetRotationalMultiplierZ);
|
||||
set => Resource.Call(MethodName.SetRotationalMultiplierZ, value);
|
||||
}
|
||||
|
||||
public float PositionalMultiplierX
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetPositionalMultiplierX);
|
||||
set => Resource.Call(MethodName.SetPositionalMultiplierX, value);
|
||||
}
|
||||
|
||||
public float PositionalMultiplierY
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetPositionalMultiplierY);
|
||||
set => Resource.Call(MethodName.SetPositionalMultiplierY, value);
|
||||
}
|
||||
|
||||
public float PositionalMultiplierZ
|
||||
{
|
||||
get => (float)Resource.Call(MethodName.GetPositionalMultiplierZ);
|
||||
set => Resource.Call(MethodName.SetPositionalMultiplierZ, value);
|
||||
}
|
||||
|
||||
public static class MethodName
|
||||
{
|
||||
public const string GetAmplitude = "get_amplitude";
|
||||
public const string SetAmplitude = "set_amplitude";
|
||||
|
||||
public const string GetFrequency = "get_frequency";
|
||||
public const string SetFrequency = "set_frequency";
|
||||
|
||||
public const string GetRandomizeNoiseSeed = "get_randomize_noise_seed";
|
||||
public const string SetRandomizeNoiseSeed = "set_randomize_noise_seed";
|
||||
|
||||
public const string GetNoiseSeed = "get_noise_seed";
|
||||
public const string SetNoiseSeed = "set_noise_seed";
|
||||
|
||||
public const string GetRotationalNoise = "get_rotational_noise";
|
||||
public const string SetRotationalNoise = "set_rotational_noise";
|
||||
|
||||
public const string GetPositionalNoise = "get_positional_noise";
|
||||
public const string SetPositionalNoise = "set_positional_noise";
|
||||
|
||||
public const string GetRotationalMultiplierX = "get_rotational_multiplier_x";
|
||||
public const string SetRotationalMultiplierX = "set_rotational_multiplier_x";
|
||||
|
||||
public const string GetRotationalMultiplierY = "get_rotational_multiplier_y";
|
||||
public const string SetRotationalMultiplierY = "set_rotational_multiplier_y";
|
||||
|
||||
public const string GetRotationalMultiplierZ = "get_rotational_multiplier_z";
|
||||
public const string SetRotationalMultiplierZ = "set_rotational_multiplier_z";
|
||||
|
||||
public const string GetPositionalMultiplierX = "get_positional_multiplier_x";
|
||||
public const string SetPositionalMultiplierX = "set_positional_multiplier_x";
|
||||
|
||||
public const string GetPositionalMultiplierY = "get_positional_multiplier_y";
|
||||
public const string SetPositionalMultiplierY = "set_positional_multiplier_y";
|
||||
|
||||
public const string GetPositionalMultiplierZ = "get_positional_multiplier_z";
|
||||
public const string SetPositionalMultiplierZ = "set_positional_multiplier_z";
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
uid://chk7643ynhe4f
|
@@ -0,0 +1,64 @@
|
||||
using Godot;
|
||||
|
||||
namespace PhantomCamera;
|
||||
|
||||
public enum TransitionType
|
||||
{
|
||||
Linear,
|
||||
Sine,
|
||||
Quint,
|
||||
Quart,
|
||||
Quad,
|
||||
Expo,
|
||||
Elastic,
|
||||
Cubic,
|
||||
Circ,
|
||||
Bounce,
|
||||
Back
|
||||
}
|
||||
|
||||
public enum EaseType
|
||||
{
|
||||
EaseIn,
|
||||
EaseOut,
|
||||
EaseInOut,
|
||||
EaseOutIn
|
||||
}
|
||||
|
||||
public static class PhantomCameraTweenExtensions
|
||||
{
|
||||
public static PhantomCameraTween AsPhantomCameraTween(this Resource resource)
|
||||
{
|
||||
return new PhantomCameraTween(resource);
|
||||
}
|
||||
}
|
||||
|
||||
public class PhantomCameraTween(Resource tweenResource)
|
||||
{
|
||||
public Resource Resource { get; } = tweenResource;
|
||||
|
||||
public float Duration
|
||||
{
|
||||
get => (float)Resource.Get(PropertyName.Duration);
|
||||
set => Resource.Set(PropertyName.Duration, value);
|
||||
}
|
||||
|
||||
public TransitionType Transition
|
||||
{
|
||||
get => (TransitionType)(int)Resource.Get(PropertyName.Transition);
|
||||
set => Resource.Set(PropertyName.Transition, (int)value);
|
||||
}
|
||||
|
||||
public EaseType Ease
|
||||
{
|
||||
get => (EaseType)(int)Resource.Get(PropertyName.Ease);
|
||||
set => Resource.Set(PropertyName.Ease, (int)value);
|
||||
}
|
||||
|
||||
public static class PropertyName
|
||||
{
|
||||
public const string Duration = "duration";
|
||||
public const string Transition = "transition";
|
||||
public const string Ease = "ease";
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
uid://ybr5c2s0tfvx
|
Reference in New Issue
Block a user