Question by
CreatorMeta2 · Sep 25, 2015 at 09:43 PM ·
error message
error cs1519 pls need help
using UnityEngine; using System.Collections;
public class ContorleSol : MonoBehaviour
{
public Light Sun;
bool Luz = true;
// Use this for initialization
void Start ()
{
Sun = GetComponent<Light>();
}
// Update is called once per frame
void Update ()
{
if(Input.GetMouseButtonDown(1))
{
if (Light)
Sun.enabled = false;
Luz=false;
}
else
{
Sun.enabled = true;
Luz = true;
}
}
if(Luz)
{
if(Input.GetKey(KeyCode.PageUp))
Sun.intensity += 0.05f;
if(Input.GetKey(KeyCode.PageDown))
Sun.intensity -= 0.05f;
if(Sun.intesity >= 7)
Sun.color = Color.red;
else if(Sun.intesity <= 2)
Sun.color = Color.black;
else
Sun.color = Color.yellow;
}
}
Comment
Your answer
