private void Start() { AudioSource[] audioSources = GetComponents <AudioSource>(); foreach (AudioSource a in audioSources) { Debug.Log("AudioSource: " + a.clip.name); if (a.clip.name.Contains("coin")) { sfx_crystal = a; } if (a.clip.name.Contains("music")) { music = a; } if (a.clip.name.Contains("over")) { sfx_gameOver = a; } } levelCreation = FindObjectOfType <LevelCreation>(); nextDifficutly = difficutlyIncreaseStep; }
/// <summary> /// Method that runs once on start. /// Creates a new level and adds it to scene handler. /// </summary> public override void Start() { LevelCreation levelCreation = new LevelCreation(keyReader, sceneHandler, random); sceneHandler.AddScene(levelCreation.LevelScene, "LevelScene"); levelCreation.GenerateScene(); }
private void Start() { levelGenerator = GameObject.Find("Generation").GetComponent <LevelCreation>(); challengesCompleted = 0; lastChallenge = null; }
private void Awake() { instance = this; totalLevel = levels.Count + 1; }
static void Init() { LevelCreation window = (LevelCreation)GetWindow(typeof(LevelCreation)); window.Show(); }
//GameObject levelCreated,Reload; private void Awake() { instance = this; }
// Use this for initialization void Start() { levelCreation = level.GetComponent<LevelCreation> (); pv = levelCreation.GetComponent<PlayVoices> (); }