Enemy Logik erstellt Weitere Kommentare: Ich werde herausfinden, wer Coroutinen erfunden hat und diese Person auf dieselbe Art knechten, wie ich es in den letzten 5 Stunden wurde. WaitForSeconds(5) aber alles 4000 Mal in 3 Sekunden durchlaufen, mein Arsch.
This commit is contained in:
58
Assets/Scripts/Enemy/LevelBehavior.cs
Normal file
58
Assets/Scripts/Enemy/LevelBehavior.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class LevelBehavior : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject eFie;
|
||||
[SerializeField] GameObject eSilv;
|
||||
[SerializeField] GameObject eHai;
|
||||
|
||||
FieScript fie;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
fie = eFie.GetComponent<FieScript>();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Create a temporary reference to the current scene.
|
||||
Scene currentScene = SceneManager.GetActiveScene();
|
||||
|
||||
// Retrieve the name of this scene.
|
||||
string sceneName = currentScene.name;
|
||||
|
||||
if (sceneName == "Day2")
|
||||
{
|
||||
|
||||
fie.stateTime = 5;
|
||||
// Do something...
|
||||
}
|
||||
else if (sceneName == "Day6")
|
||||
{
|
||||
|
||||
fie.stateTime = 3;
|
||||
// Do something...
|
||||
}
|
||||
|
||||
// Retrieve the index of the scene in the project's build settings.
|
||||
int buildIndex = currentScene.buildIndex;
|
||||
|
||||
//// Check the scene name as a conditional.
|
||||
//switch (buildIndex)
|
||||
//{
|
||||
// case 0:
|
||||
// // Do something...
|
||||
// break;
|
||||
// case 1:
|
||||
// // Do something...
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user