fixed menu camera movement procGen
This commit is contained in:
parent
783946a48c
commit
efe70f83d9
@ -149,7 +149,7 @@ GameObject:
|
|||||||
- component: {fileID: 77683434}
|
- component: {fileID: 77683434}
|
||||||
- component: {fileID: 77683433}
|
- component: {fileID: 77683433}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Main Camera
|
m_Name: MenuCamera
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
@ -22,6 +22,11 @@ public class UiController : MonoBehaviour
|
|||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
this.player = GameObject.Find("Body");
|
||||||
|
ProceduralGeneration procGenScript = GameObject.Find("Level").GetComponent<ProceduralGeneration>();
|
||||||
|
if (procGenScript == null)Debug.LogError("REEEEeee!!");
|
||||||
|
procGenScript.player = menuCamera;
|
||||||
|
// procGenScript.Player = playerCamera.parent;
|
||||||
startPosition = this.player.transform.position.z;
|
startPosition = this.player.transform.position.z;
|
||||||
Cursor.lockState = CursorLockMode.None;
|
Cursor.lockState = CursorLockMode.None;
|
||||||
Cursor.visible = true;
|
Cursor.visible = true;
|
||||||
@ -30,6 +35,8 @@ public class UiController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
public void OnNewGameBtnClick()
|
public void OnNewGameBtnClick()
|
||||||
{
|
{
|
||||||
|
ProceduralGeneration procGenScript = GameObject.Find("Level").GetComponent<ProceduralGeneration>();
|
||||||
|
procGenScript.player = this.player;
|
||||||
UiController.isInMenu = false;
|
UiController.isInMenu = false;
|
||||||
menuCamera.SetActive(false);
|
menuCamera.SetActive(false);
|
||||||
playerCamera.SetActive(true);
|
playerCamera.SetActive(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user