ShanxiKnowledgeBase/SXElectricalInspection/Assets/GuYuan/GameManager/DoolsPlayer.cs

32 lines
805 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoolsPlayer : MonoBehaviour
{
public door_control mesh;
public MeshCollider _collider;
public bool ison = false;
// Start is called before the first frame update
void Awake()
{
mesh.ÆôÓý»»¥ = false;
_collider = mesh.GetComponent<MeshCollider>();
}
private void OnMouseDown()
{
if (ison)
{
mesh.enabled = true;
//mesh.FengYing = true;
_collider.enabled = true;
gameObject.SetActive(false);
if (GameManager.Instance)
{
GameManager.Instance.interactiveEnum = Interactive.none;
}
GameManager.Instance.YanDian = true;
}
}
}