updated map selector

This commit is contained in:
PokingPines
2024-04-25 21:43:53 +02:00
parent 12df19d486
commit 6dd5933873
8 changed files with 2678 additions and 141 deletions

View File

@@ -2,19 +2,56 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using Unity.Mathematics;
public class MapSelectorScript : MonoBehaviour
{
public GameObject[] Maps;
GameObject currentMap;
quaternion currentRotation;
public GameObject CameraRotator;
public int scene;
public void change_to_track2(){
void Start()
{
DisableAllMaps();
SelectMap(0);
}
private void FixedUpdate()
{
CameraRotator.transform.eulerAngles += Vector3.up * 0.7f;
}
void DisableAllMaps()
{
foreach (GameObject map in Maps)
{
map.SetActive(false);
}
}
void SelectMap(int index)
{
DisableAllMaps();
currentMap = Maps[index];
currentMap.SetActive(true);
}
public void ChangeToTrack2()
{
scene = 2;
SelectMap(0);
}
public void change_to_track3(){
public void ChangeToTrack3()
{
scene = 3;
SelectMap(1);
}
public void selectMap(){
public void SelectMapAndLoadScene()
{
SceneManager.LoadScene(scene);
}
}

View File

@@ -0,0 +1,19 @@
using System.Collections;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;
public class VisualizeMap : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ac4187952aaaa8b488bdebaae221db71
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: