示例#1
0
 public void AddToList(GameObject gameObjectToAdd)
 {
     if (!objectsToDestory.Contains(gameObjectToAdd))
     {
         if (objectsToDestory.Count > 0 && !gameObjectToAdd.CompareTag(objectsToDestory[0].gameObject.tag))
         {
             CompareObjecInList(gameObjectToAdd, objectsToDestory);
         }
         else
         {
             objectsToDestory.Add(gameObjectToAdd);
         }
     }
     if (objectsToDestory.Count == 3)
     {
         DeactivateAllObjects(objectsToDestory);
         ClearList(objectsToDestory);
         GetScoreSystem.AddMultiplier(gameObjectToAdd.tag);
         GetScoreSystem.AddScore();
     }
 }