public override void OnInspectorGUI() { base.OnInspectorGUI(); LifeGridController lifeGridController = (LifeGridController)target; if (GUILayout.Button("Add Life Image")) { lifeGridController.AddLifeImage(); } if (GUILayout.Button("Refresh Life Images")) { lifeGridController.RefreshLifeImages(lifeGridController.NumOfLives); } }
private void Awake() { _playerHealth = GameObject.FindWithTag("Player").GetComponent <PlayerHealthManager>(); _lifeGrid = GameObject.FindWithTag("LifeGrid").GetComponent <LifeGridController>(); }