Add poor menu

This commit is contained in:
haitem
2021-01-30 21:23:55 +01:00
parent 227096d3b5
commit 80b64561f7
8 changed files with 1532 additions and 4 deletions

View File

@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class CanvasManager : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void Exit()
{
Application.Quit();
}
public void Scene(int sceneNumber)
{
SceneManager.LoadScene(sceneNumber);
}
public void Scene(string sceneName)
{
SceneManager.LoadScene(sceneName);
}
}

View File

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

View File

@@ -245,7 +245,6 @@ public class PlayerManager : MonoBehaviour
public void ActivePowerCube(float power, float powerTime, PowerCubeManager.PowerType powerType, string nextSceneName = "")
{
Debug.Log((powerType.GetHashCode() - 1));
if ((powerType.GetHashCode() - 1) == 3)
{
SceneManager.LoadScene(nextSceneName);

View File

@@ -9,7 +9,6 @@ public class PowerCubeManager : MonoBehaviour
public PowerType powerType = PowerType.Nothing;
public float powerTime = 5f;
public float powerUnit = 10f;
private bool interact = false;
public string nextSceneName;
private MeshRenderer meshRenderer;
@@ -45,7 +44,6 @@ public class PowerCubeManager : MonoBehaviour
if (other.gameObject.tag == "Player")
{
meshRenderer.materials[1].SetFloat("_Outline", 0.4f);
interact = true;
}
}
private void OnTriggerExit(Collider other)
@@ -53,7 +51,6 @@ public class PowerCubeManager : MonoBehaviour
if (other.gameObject.tag == "Player")
{
meshRenderer.materials[1].SetFloat("_Outline", 0.0f);
interact = false;
}
}
}