Added Decorations

This commit is contained in:
2025-10-10 16:25:03 +02:00
parent 1fe48c995b
commit 9359c47499
41 changed files with 46343 additions and 63 deletions

View File

@@ -0,0 +1,39 @@
using UnityEngine;
public class TrashSpawner : MonoBehaviour
{
// Assign in inspector: the pool of sprites to choose from
public Sprite[] spritePool;
[Tooltip("Visual radius for spawn point in editor")]
public float gizmoRadius = 0.5f;
// Visual indicator for editor only
private void OnDrawGizmos()
{
Gizmos.color = Color.cadetBlue;
Gizmos.DrawWireSphere(transform.position, gizmoRadius);
// Draw a cross in the center for better visibility
Gizmos.DrawLine(
transform.position + Vector3.left * gizmoRadius * 0.5f,
transform.position + Vector3.right * gizmoRadius * 0.5f);
Gizmos.DrawLine(
transform.position + Vector3.up * gizmoRadius * 0.5f,
transform.position + Vector3.down * gizmoRadius * 0.5f);
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
var sr = GetComponent<SpriteRenderer>();
if (spritePool != null && spritePool.Length > 0 && sr != null)
{
sr.sprite = spritePool[Random.Range(0, spritePool.Length)];
}
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: edd79c7026d196b49867a3ed7e7828b3

View File

@@ -1,16 +0,0 @@
using UnityEngine;
public class decorationSpawner : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 711fdad9f8a4ece45aeed22006b3e4f4