mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-23 23:55:38 +03:00
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ButtonClick : MonoBehaviour
|
|
{
|
|
//Button load; // Что за Button ?
|
|
Manager mgr;
|
|
|
|
//int state = 0;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
GameObject manager = GameObject.Find("Manager");
|
|
mgr = manager.GetComponent<Manager>();
|
|
// load = GameObject.Find("Button");
|
|
Debug.Log(mgr);
|
|
}
|
|
|
|
|
|
private void OnMouseDown()
|
|
{
|
|
//Debug.Log("clickPanel button");
|
|
//Debug.Log(mgr.stepPanels["Panel0506"].GetComponent<panel>().switchesList["toggle4_0506"].GetComponent<Switch>());
|
|
//GameObject manager = GameObject.Find("Manager");
|
|
//manager.GetComponent<Manager>().SwitchTo2D();
|
|
/*if(state == 1)
|
|
{
|
|
state = 0;
|
|
}
|
|
else
|
|
{
|
|
state = 1;
|
|
}*/
|
|
//mgr.stepPanels["Panel0506"].GetComponent<panel>().switchesList["toggle4_0506"].GetComponent<Switch>().setState((int)state);
|
|
//mgr.stepPanels["Panel0506"].GetComponent<panel>().switchesList["toggle4_0506"].GetComponent<Switch>().setState(0);
|
|
|
|
}
|
|
}
|