E_ElecCompetition/Electrical_inspectionCompet.../Assets/Script/Playercontrol/door_control.cs

47 lines
1.2 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using MyFrameworkPure;
using CommonScript;
public class door_control : MonoBehaviour
{
[SerializeField] private MouseButton mouseButton = MouseButton.Left;
public bool = false;
public bool = false;
public GameObject ;
public string ;
public string ;
public Animator animator;
// Start is called before the first frame update
void Start()
{
//EventTriggerListener.Get(transform.gameObject).onClick_Data += Onclick;
}
private void OnMouseDown()
{
if (!EventSystem.current.IsPointerOverGameObject())
{
// 是否开门 = !是否开门;
if ( == true)
{//sssssssss
= !;
if ( == true)
{
//是否开门 = false;
animator.Play();
//是否开门 = false;
}
else
{
//是否开门 = true;
animator.Play();
//是否开门 = true;
}
}
}
}
}