[Player][Interaction][Assets] Add placeholder assets for some more sprites. Move all to External/Placeholder. Add list of assets with attributions. Pulver combines items now

This commit is contained in:
Michal Pikulski
2025-09-04 13:08:14 +02:00
parent 496ef10b8b
commit da5d2f2545
60 changed files with 3245 additions and 15 deletions

View File

@@ -39,6 +39,10 @@ public class FollowerController : MonoBehaviour
public event FollowerPickupHandler OnPickupReturned;
private Coroutine pickupCoroutine;
private bool lastInteractionSuccess = true;
public bool justCombined = false;
void Awake()
{
aiPath = GetComponent<AIPath>();
@@ -242,6 +246,11 @@ public class FollowerController : MonoBehaviour
}
}
public void SetInteractionResult(bool success)
{
lastInteractionSuccess = success;
}
private System.Collections.IEnumerator PickupSequence(Vector2 itemPosition, Transform playerTransform)
{
isManualFollowing = false;
@@ -258,8 +267,8 @@ public class FollowerController : MonoBehaviour
yield return null;
}
OnPickupArrived?.Invoke();
// Swap held item if necessary, then set held item and destroy pickup
if (heldObjectRenderer != null)
// Only perform pickup/swap logic if interaction succeeded
if (lastInteractionSuccess && heldObjectRenderer != null)
{
Collider2D[] hits = Physics2D.OverlapCircleAll(itemPosition, 0.2f);
foreach (var hit in hits)
@@ -267,6 +276,13 @@ public class FollowerController : MonoBehaviour
var pickup = hit.GetComponent<Pickup>();
if (pickup != null)
{
if (justCombined)
{
// Combination: just destroy the pickup, don't spawn anything
GameObject.Destroy(pickup.gameObject);
justCombined = false;
break;
}
// Swap logic: if holding an item, drop it here
if (currentlyHeldItem != null)
{