Αντί για gaming, gaming programming (c#)
Lights on, lights off
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public Light myLights;
void Start() {
myLights.enabled=false;
}
void Update () {
if (Input.GetKey ("space")) {
myLights.enabled = !myLights.enabled ;
}
}
}
Lights on, lights off
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public Light myLights;
void Start() {
myLights.enabled=false;
}
void Update () {
if (Input.GetKey ("space")) {
myLights.enabled = !myLights.enabled ;
}
}
}
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου