Improvements and touchups to a more event-driven flow and fake physics

This commit is contained in:
Michal Pikulski
2025-09-18 14:14:01 +02:00
parent 44c1e48b82
commit 3f52de9e1e
5 changed files with 56 additions and 110 deletions

View File

@@ -42,12 +42,6 @@ namespace Minigames.DivingForPictures
[Tooltip("Maximum movement speed for spawned obstacles")]
[SerializeField] private float maxMoveSpeed = 4f;
[Tooltip("Minimum damage dealt by obstacles")]
[SerializeField] private float minDamage = 0.5f;
[Tooltip("Maximum damage dealt by obstacles")]
[SerializeField] private float maxDamage = 2f;
[Header("Object Pooling")]
[Tooltip("Whether to use object pooling for obstacles")]
@@ -356,7 +350,6 @@ namespace Minigames.DivingForPictures
// Randomize properties
obstacleComponent.MoveSpeed = Random.Range(minMoveSpeed, maxMoveSpeed);
obstacleComponent.Damage = Random.Range(minDamage, maxDamage);
// Set spawner reference (since FloatingObstacle has this built-in now)
obstacleComponent.SetSpawner(this);
@@ -423,15 +416,6 @@ namespace Minigames.DivingForPictures
maxMoveSpeed = max;
}
/// <summary>
/// Public method to set damage range at runtime
/// </summary>
public void SetDamageRange(float min, float max)
{
minDamage = min;
maxDamage = max;
}
/// <summary>
/// Gets the count of currently active obstacles
/// </summary>