void Awake() { _launcher = GetComponent<CommandsLauncher>(); _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>(); _childrenManager = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>(); }
public void SetAsGroupToLink() { ChildrenManager cM = GameObject.Find("ChildrenManager").GetComponent <ChildrenManager>(); cM.EnableAllLinkButtons(); cM.SetGroup(gameObject); cM.DisableGroupLinkButtons(); }
void Awake() { _element = GetComponent<Element>(); _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>(); _children = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>(); _element._noAttractionDuration = _noAttractionDuration; }
void Awake() { _element = GetComponent<Element>(); _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>(); _childrenManager = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>(); _explosionSounds = GetComponent<ExplosionSounds>(); _startPosition = transform.position; }
void Awake() { _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>(); _childrenManager = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>(); _animator = GetComponent<Animator>(); _launcher = GetComponent<CommandsLauncher>(); _elements = 0; _active = true; _level = _elementsNumber / _eyes.Length; _animation = 0; }
//Called when the user clicks the link button. Sets the node as the current node to //link to the next node the user hits the link button on public void SetAsNodeToLink() { ChildrenManager cM = GameObject.Find("ChildrenManager").GetComponent <ChildrenManager>(); if (cM.nodeToLink != null) { if (cM.nodeToLink == gameObject) { cM.nodeToLink = null; cM.EnableAllLinkButtons(); cM.DisableGroupLinkButtons(); return; } } cM.nodeToLink = gameObject; //set all other link buttons to not be interactable cM.DisableAllLinkButtons(); //set this button to be interactable to cancel the action transform.GetChild(7).GetComponent <Button>().interactable = true; cM.EnableGroupLinkButtons(); }
void Awake() { _manager = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>(); _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>(); enabled = false; }