ManiaMap.Unity
Procedural generation of metroidvania style maps for Unity.
CollectableResource.cs
1using UnityEngine;
2
4{
8 [CreateAssetMenu(menuName = "Mania Map/Collectable")]
9 public class CollectableResource : ScriptableObject
10 {
11 [SerializeField]
12 private bool _editId;
16 public bool EditId { get => _editId; set => _editId = value; }
17
18 [SerializeField]
19 private int _id = -1;
23 public int Id { get => _id; set => _id = value; }
24
25 protected virtual void OnValidate()
26 {
28 }
29 }
30}
An object representing a collectable with a unique ID.
bool EditId
If true, the ID can be edited in the inspector.
Contains methods for creating random ID's.
Definition: Rand.cs:9
static int AutoAssignId(int id)
If the specified ID is greater than zero, returns the ID. Otherwise, returns a random positive intege...
Definition: Rand.cs:15