Παρασκευή 8 Ιανουαρίου 2016

Lights off, lights on

Αντί για 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 ;
}
}
}

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου