mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 02:35:38 +03:00
04.07.2022
This commit is contained in:
39
Heli_with_panels/Assets/Scripts/ButtonClick.cs
Normal file
39
Heli_with_panels/Assets/Scripts/ButtonClick.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user