Exemple #1
0
    // Remove value from the assigned unlockable object
    public void removeValue(GameObject obj)
    {
        ComboUnlockable script = obj.GetComponent <ComboUnlockable>();

        if (script != null)
        {
            script.Subtract(value);
        }
    }
Exemple #2
0
 // Remove value from all assigned unlockable objects
 public void removeValueToAll()
 {
     for (int i = 0; i < objects.Length; i++)
     {
         ComboUnlockable script = objects[i].GetComponent <ComboUnlockable>();
         if (script != null)
         {
             script.Subtract(value);
         }
     }
 }