1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Level : MonoBehaviour
- {
- public HeartController HeartController;
- public LevelTargets LevelTargets;
- public List<Transform> ListPlayerSpawnPoints;
- public int Stages;
- public Transform PivotCameraLevel;
- public GameObject ArrowsChangePlayer;
- public Transform SpawnPointPlayer;
- public GameObject Logo;
- public FinishTrigger FinishTrigger;
- public List<PickUp> BaloonsList;
- public List<PickUp> HearthList;
- public List<PickUp> RocksList;
- public List<PickUp> CristalsList;
- public List<PickUp> CandysList;
- public TriggerRollerActive TriggerRollerActive;
- public TriggerRollerDeactive TriggerRollerDeactive;
- public void Init()
- {
- UIManager.Instance.Camera.transform.SetParent(PivotCameraLevel);
- UIManager.Instance.Camera.transform.localPosition = Vector3.zero;
- }
- public void ResetFinishTrigger()
- {
- FinishTrigger.ResetAnimation();
- }
- public void ResetLever()
- {
- ResetFinishTrigger();
- ResetBallons();
- ResetHearth();
- ResetCandy();
- ResetCristals();
- ResetRock();
- TriggerRollerActive.ResetRolley();
- TriggerRollerDeactive.ResetRolley();
- }
- private void ResetBallons()
- {
- for(var i = 0; i< BaloonsList.Count;i++)
- {
- BaloonsList[i].ResetPickUp();
- }
- }
- private void ResetHearth()
- {
- for (var i = 0; i < HearthList.Count; i++)
- {
- HearthList[i].ResetPickUp();
- }
- }
- private void ResetCandy()
- {
- for (var i = 0; i < CandysList.Count; i++)
- {
- CandysList[i].ResetPickUp();
- }
- }
- private void ResetRock()
- {
- for (var i = 0; i < RocksList.Count; i++)
- {
- RocksList[i].ResetPickUp();
- }
- }
- private void ResetCristals()
- {
- for (var i = 0; i < CristalsList.Count; i++)
- {
- CristalsList[i].ResetPickUp();
- }
- }
- }
|