Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
        /// <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;
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     instance   = this;
     totalLevel = levels.Count + 1;
 }
Ejemplo n.º 5
0
    static void Init()
    {
        LevelCreation window = (LevelCreation)GetWindow(typeof(LevelCreation));

        window.Show();
    }
Ejemplo n.º 6
0
    //GameObject levelCreated,Reload;

    private void Awake()
    {
        instance = this;
    }
Ejemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     levelCreation = level.GetComponent<LevelCreation> ();
     pv = levelCreation.GetComponent<PlayVoices> ();
 }