Exemplo n.º 1
0
Arquivo: Box.cs Projeto: bitowl/ld42
 public void PlacedOnShelf(BoxesInShelfManager shelf)
 {
     if (!shelvesThisBoxIsOn.Contains(shelf))
     {
         shelvesThisBoxIsOn.Add(shelf);
         Variable.InShelf = true;
     }
 }
Exemplo n.º 2
0
Arquivo: Box.cs Projeto: 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();
         }
     }
 }
Exemplo n.º 3
0
 public void RegisterShelf(BoxesInShelfManager shelf)
 {
     shelves.Add(shelf);
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     variablesManager    = GameObject.Find("GlobalManagers").GetComponent <VariablesManager>();
     boxesInShelfManager = GetComponent <BoxesInShelfManager>();
 }