refactor modules
This commit is contained in:
26
Assets/Station46/Modules/Dispenser/Scripts/DispenserOrb.cs
Normal file
26
Assets/Station46/Modules/Dispenser/Scripts/DispenserOrb.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Station46.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Station46.Dispenser.Scripts
|
||||
{
|
||||
[RequireComponent(typeof(Rigidbody), typeof(Collider), typeof(Emission))]
|
||||
public class DispenserOrb : MonoBehaviour
|
||||
{
|
||||
public Color Color
|
||||
{
|
||||
set => _emission.color = value;
|
||||
}
|
||||
|
||||
private Emission _emission;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_emission = GetComponent<Emission>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_emission.active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user