private void ClearRemaingObjects()
    {
        PaintPool paintPool = PaintPool.GetInstance();

        GameObject[] decals = GameObject.FindGameObjectsWithTag("Decal");
        foreach (GameObject decal in decals)
        {
            paintPool.ReturnToPool(decal);
        }

        Head[] heads = FindObjectsOfType <Head>();
        foreach (Head head in heads)
        {
            Destroy(head.gameObject);
        }
    }
Exemple #2
0
 private void MakeUp(bool paintState)
 {
     if (paintState)
     {
         if (treatmentType != TreatmentType.MakeUp)
         {
             treatmentType = TreatmentType.MakeUp;
             ClearPreviousTreatments(treatmentType);
         }
     }
     else
     {
         ObjectPool        pool      = PaintPool.GetInstance();
         List <GameObject> paintList = GetAllDecals();
         foreach (GameObject paint in paintList)
         {
             pool.ReturnToPool(paint);
         }
     }
 }