void Awake() { QualitySettings.vSyncCount = 0; // VSync must be disabled Application.targetFrameRate = 60; rbPlayer = player.GetComponent <Rigidbody>(); rbGalaxy = galaxySphere.GetComponent <Rigidbody>(); // recCrossHair = crossHair.GetComponent<RectTransform>(); // recCrossHairA = crossHairA.GetComponent<RectTransform>(); // recCrossHairB = crossHairB.GetComponent<RectTransform>(); playerControll = player.GetComponent <scrPlayerControll>(); recTargetEnemy = ParentTargetEnemy.GetComponent <RectTransform>(); meteorA.poolMeteor = new List <GameObject>(); meteorSide.poolMeteor = new List <GameObject>(); poolTargetEnemy = new List <GameObject>(); poolExplotionMeteor = new List <GameObject>(); item.poolEnergy = new List <GameObject>(); initialGalaxyDust = galaxyDust.transform.position; initialBoundary = traBoundary.transform.position; mv = SaveLoadXml.LoadVectorsFromResources(pathMeteorLevel01); mhv = SaveLoadXml.LoadVectorsFromResources(pathHealthLevel01); //mv = SaveLoadXml.LoadXml(pathMeteorLevel01 + "/" + FileName); //SaveLoadXml.SaveDialogueXml(pathMeteorLevel01 , new ManualVectors()); //GetVectors(); }
//solo para obtener los vectores de los meteoros seteados void GetVectors() { //crear un lista de los vectores de cada meteoro; foreach (GameObject gm in goGroup) { for (int c = 0; c < gm.transform.childCount - 1; c++) { Vector3 pos = gm.transform.GetChild(c).position; mhv.vectors.Add(pos); } gm.SetActive(false); } SaveLoadXml.SaveDialogueXml(pathHealthLevel01, mhv); }