using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class switchView : MonoBehaviour
{
    // Start is called before the first frame update
    private bool __isOff__ = false;
    public OnEmptyBack onEmptyBack = null;
    public bool isOff
    {
        set
        {
            __isOff__ = value;
            transform.Find("off").gameObject.SetActive(value);
            transform.Find("on").gameObject.SetActive(!value);
        }
        get
        {
            return __isOff__;
        }
    }
    void Start()
    {
        isOff = __isOff__;
    }

    void Update()
    {
    }
    public void onClick()
    {
        isOff = !__isOff__;
        if(onEmptyBack != null)
        {
            onEmptyBack(gameObject);
        }
    }

}
