68 lines
2.5 KiB
C#
68 lines
2.5 KiB
C#
using GazeLab.Entities;
|
|
using UnityEngine;
|
|
|
|
namespace GazeLab.Data
|
|
{
|
|
[CreateAssetMenu(fileName = "ResourcePickupConfig", menuName = "GazeLab/Resource Pickup Config")]
|
|
public sealed class ResourcePickupConfigSO : ScriptableObject
|
|
{
|
|
[Header("Resource World Sizes")]
|
|
[Tooltip("Base visual scale of Scrap pickups in the world.")]
|
|
[Range(0.08f, 1.5f)] public float scrapScale = 0.25f;
|
|
|
|
[Tooltip("Base visual scale of Gold pickups in the world.")]
|
|
[Range(0.08f, 1.5f)] public float goldScale = 0.27f;
|
|
|
|
[Tooltip("Base visual scale of Uranium pickups in the world.")]
|
|
[Range(0.08f, 1.5f)] public float uraniumScale = 0.30f;
|
|
|
|
[Tooltip("Visual scale multiplier applied when a pickup represents a high chunk value (e.g. >= 5).")]
|
|
[Range(1.0f, 2.5f)] public float highValueScaleMultiplier = 1.25f;
|
|
|
|
[Header("Pickup Physics & Suction")]
|
|
[Tooltip("Collision detection radius for pickup collection (multiplied by world scale).")]
|
|
[Range(0.08f, 1.5f)] public float collisionRadius = 0.25f;
|
|
|
|
[Tooltip("Initial tractor suction speed when flying towards the station collector.")]
|
|
[Range(1.0f, 15.0f)] public float baseSuctionSpeed = 5.5f;
|
|
|
|
[Tooltip("Maximum velocity achievable during tractor suction.")]
|
|
[Range(10.0f, 40.0f)] public float maxSuctionSpeed = 22.0f;
|
|
|
|
[Tooltip("Suction speed acceleration per second.")]
|
|
[Range(5.0f, 40.0f)] public float suctionAcceleration = 18.0f;
|
|
|
|
[Tooltip("Duration in seconds before uncollected floating pickups despawn.")]
|
|
[Range(5.0f, 120.0f)] public float lifetime = 28.0f;
|
|
|
|
[Header("Asteroid Scatter Physics")]
|
|
[Tooltip("Minimum scatter ejection speed when popping out of a shattered asteroid.")]
|
|
[Range(0.2f, 5.0f)] public float minScatterSpeed = 0.8f;
|
|
|
|
[Tooltip("Maximum scatter ejection speed when popping out of a shattered asteroid.")]
|
|
[Range(0.5f, 8.0f)] public float maxScatterSpeed = 2.2f;
|
|
|
|
public float GetBaseScale(ResourceType type, int amount)
|
|
{
|
|
float scale = scrapScale;
|
|
switch (type)
|
|
{
|
|
case ResourceType.Gold:
|
|
scale = goldScale;
|
|
break;
|
|
case ResourceType.Uranium:
|
|
scale = uraniumScale;
|
|
break;
|
|
}
|
|
|
|
if (amount >= 5)
|
|
{
|
|
scale *= highValueScaleMultiplier;
|
|
}
|
|
|
|
return scale;
|
|
}
|
|
}
|
|
}
|
|
|