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