protected override void Start() { doors = GetComponentsInChildren <Door>(); puzzles = GetComponents <Puzzle>(); CombinationLeverPuzzle comboLeverPuzzle = GetComponent <CombinationLeverPuzzle>(); RockPuzzle rockPuzzle = GetComponent <RockPuzzle>(); // Set and return a colour combination for levers CharacterColour[] combination = comboLeverPuzzle.SetColourCombination(); // Set colours of all interactables in the task based on combination for (int i = 0; i < combination.Length; i++) { rockPuzzle.rocks[i].colour = combination[i]; rockPuzzle.platforms[i].colour = combination[i]; rockPuzzle.rocks[i].SetMaterialColour(combination[i]); rockPuzzle.platforms[i].SetMaterial(combination[i]); } introDialogueTrigger.TriggerDialogue(); }
protected override void Start() { CombinationLeverPuzzle combinationPuzzle = GetComponent <CombinationLeverPuzzle>(); EnemyPuzzle enemyPuzzle = GetComponent <EnemyPuzzle>(); // Set colours of all enemies in the task based on combination CharacterColour[] combination = combinationPuzzle.SetColourCombination(); for (int i = 0; i < combination.Length; i++) { EnemyStatsController enemy = enemyPuzzle.enemyPrefabs[i].GetComponent <EnemyStatsController>(); enemy.AssignEnemyColour(combination[i]); } // Hide all platforms RockPuzzle rockPuzzle = GetComponent <RockPuzzle>(); foreach (Platform platform in rockPuzzle.platforms) { platform.Hide(); } }