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

public class salaScene_pages : MonoBehaviour, IEventHandler
{
    public void onEventHandler(string eventName, List<UnityEngine.Object> uobjects, List<object> objects){
        if (eventName.Equals("switchPage")) {
            string name = objects[0] as string;
            Boolean isShow = Convert.ToBoolean(objects[1]);
            this.transform.Find(name).gameObject.SetActive(isShow);
        }
    }

    // Start is called before the first frame update
    void Start()
    {
        utilsTools.dynamicMount.Clear();
        utilsTools.onEvent(this, "switchPage");
        var commons = transform.parent.Find("commons").gameObject;
        utilsTools.dynamicMount.Add("commons", commons);
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
