using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class L10 : MonoBehaviour
{
// Start is called before the first frame update
private Light myLight;
void Start()
{
myLight = GetComponent <Light>();
}
// Update is called once per frame
void Update()
{
if(Input.GetKeyUp(KeyCode.Space))
{
//游戏中脚本开关切换
myLight.enabled = false;
myLight.enabled = !myLight.enabled;
}
}
}