25 lines
612 B
C#
25 lines
612 B
C#
|
|
using System;
|
||
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
/*******************************************************************************
|
||
|
|
*Create By CG
|
||
|
|
*Function
|
||
|
|
*******************************************************************************/
|
||
|
|
namespace ZXK.LouDiXvMuNiu
|
||
|
|
{
|
||
|
|
public class ColCtrl : MonoBehaviour
|
||
|
|
{
|
||
|
|
private void OnEnable()
|
||
|
|
{
|
||
|
|
if (GameManager.Instance._StateContext.GetState().Name.Equals("ExamState"))
|
||
|
|
{
|
||
|
|
transform.GetComponent<BoxCollider>().enabled = false;
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
transform.GetComponent<BoxCollider>().enabled = true;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|