So I’m a begging to learn C# I’m taking a visual basic class and wanted to jump right into c# because I find the best way to learn is by doing it. Any way I’m having a a problem I’m trying to design an adventure puzzle horror game like amnesia and I’m trying to design a basic key door system I got the error in the key script.
`using UnityEngine;
using System.Collections;
public class Key : MonoBehaviour {
// Use this for initialization
void Start () {
bool Keyget = false;
}
// Update is called once per frame
void Update () {
switch (e.KeyCode)
{
case Keys.Enter:
Keyget = true;
Key.visible = false;
}
}
}
`
What’s going wrong?