Пример #1
0
Файл: Box.cs Проект: bitowl/ld42
 public void PlacedOnShelf(BoxesInShelfManager shelf)
 {
     if (!shelvesThisBoxIsOn.Contains(shelf))
     {
         shelvesThisBoxIsOn.Add(shelf);
         Variable.InShelf = true;
     }
 }
Пример #2
0
Файл: Box.cs Проект: bitowl/ld42
 public void RemovedFromShelf(BoxesInShelfManager shelf)
 {
     shelvesThisBoxIsOn.Remove(shelf);
     if (shelvesThisBoxIsOn.Count == 0)
     {
         Variable.InShelf = false;
         // We were removed from a shelf
         if (Variable.ReferenceCount > 0)
         {
             Debug.LogWarning("NOO DON'T TAKE MEEE");
             VariableWithReferencesPickedUpEvent.Raise();
         }
     }
 }
Пример #3
0
 public void RegisterShelf(BoxesInShelfManager shelf)
 {
     shelves.Add(shelf);
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     variablesManager    = GameObject.Find("GlobalManagers").GetComponent <VariablesManager>();
     boxesInShelfManager = GetComponent <BoxesInShelfManager>();
 }