Esempio n. 1
0
 private void OnTriggerExit(Collider other)
 {
     if (DNA != null && other.gameObject.Equals(DNA.gameObject))
     {
         DNAScript.IsStuck               = false;
         DNAScript.IsInSphere            = false;
         mixingData.IsSphereEmpty[myNum] = true;
         mixingData.NumOfDNA--;
         mixingData.SetMedicineData(myNum);
         DNAScript = null;
         DNA       = null;
         nowInsert = false;
     }
 }
Esempio n. 2
0
    private void SpawnDNAs()
    {
        int i = 0;

        foreach (var item in DNAs)
        {
            DNAObj.Add(Instantiate(DNAPrefabs[item.DNAsize - 1], spawnPoints.GetChild(i).transform));
            DNApart dna = DNAObj[DNAObj.Count - 1].GetComponent <DNApart>();
            DNAObj[DNAObj.Count - 1].transform.parent = spawnPoints.GetChild(i);
            dna.LoadDNA(item.DNAsize, item.criticalAge, item.unknownNum, item.positive, item.negative, mixingPanel);

            i++;
        }
    }
Esempio n. 3
0
 private void OnTriggerEnter(Collider other)
 {
     if (DNA == null && other.tag == "DNA")
     {
         DNAScript = other.GetComponent <DNApart>();
         if (!DNAScript.IsStuck)
         {
             DNAScript.IsStuck               = true;
             DNAScript.IsInSphere            = true;
             mixingData.DNAStructs[myNum]    = DNAScript.DNAStruct;
             mixingData.IsSphereEmpty[myNum] = false;
             mixingData.NumOfDNA++;
             mixingData.SetMedicineData(myNum);
             DNA       = other.transform;
             nowInsert = true;
         }
         else
         {
             DNAScript = null;
         }
     }
 }