Ejemplo n.º 1
0
 protected override void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
     base.Awake();
 }
Ejemplo n.º 2
0
    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);
        }
    }
Ejemplo n.º 3
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);
         }
     }
 }
Ejemplo n.º 4
0
 private void Start()
 {
     pool = GetComponent <PaintPool>();
 }