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);
        }
    }
Esempio n. 2
0
 private void Awake()
 {
     _playerHealth = GameObject.FindWithTag("Player").GetComponent <PlayerHealthManager>();
     _lifeGrid     = GameObject.FindWithTag("LifeGrid").GetComponent <LifeGridController>();
 }