public void SetLucidityState(GameObject newState) { lucidityState.SetActive(false); newState.SetActive(true); lucidityState = newState; _lucidityStats = lucidityState.GetComponent <LucidityStats>(); }
void Awake() { _lucidityStats = lucidityState.GetComponent <LucidityStats>(); _rb = transform.GetComponent <Rigidbody2D>(); if (Instance != null) { Debug.LogError("More than one player movement in scene!"); return; } Instance = this; }