public void AddLifeImage()
    {
        LifeImage lifeImageClone = Instantiate(LifeImagePrefab, transform);

        lifeImageClone.SetActive(true);
        _lifeImages.Add(lifeImageClone);
    }
Esempio n. 2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        LifeImage lifeImage = (LifeImage)target;

        if (GUILayout.Button("Active"))
        {
            lifeImage.SetActive(true);
        }

        if (GUILayout.Button("Deactivate"))
        {
            lifeImage.SetActive(false);
        }
    }