private void Txt_player_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { Button_play.PerformClick(); } }
private void LoadMap() { func = funcs.GetComponent <Inputbuttons>(); button = buttons.GetComponent <Choosebutton>(); input = inputs.GetComponent <Button_play>(); loader = GameObject.Find("Map").GetComponent <MapLoader>(); Map loadedMap = loader.GetMap(); card = MapLoader.OneDToTwoDArray(loadedMap.map, loadedMap.mapWidth); targets = MapLoader.OneDToTwoDArray(loadedMap.targets, 2); startPos = loadedMap.startPos; currentDirection = loadedMap.direction; }