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

51 lines
1.1 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 string ;
public string ;
public Animator animator;
// Start is called before the first frame update
void Start()
{
EventTriggerListener.Get(transform.gameObject).onClick_Data += Onclick;
}
void Onclick(GameObject go,PointerEventData e) {
if(e.button != (PointerEventData.InputButton)mouseButton)
return;
if ( == true)
{
if ( == true)
{
animator.Play();
= false;
}
if ( == false)
{
animator.Play();
= true;
}
}
return;
}
// Update is called once per frame
void Update()
{
}
}