public void PlacedOnShelf(BoxesInShelfManager shelf) { if (!shelvesThisBoxIsOn.Contains(shelf)) { shelvesThisBoxIsOn.Add(shelf); Variable.InShelf = true; } }
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(); } } }
public void RegisterShelf(BoxesInShelfManager shelf) { shelves.Add(shelf); }
// Use this for initialization void Start() { variablesManager = GameObject.Find("GlobalManagers").GetComponent <VariablesManager>(); boxesInShelfManager = GetComponent <BoxesInShelfManager>(); }