示例#1
0
    void Awake()
    {
        _launcher = GetComponent<CommandsLauncher>();

        _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>();
        _childrenManager = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>();
    }
示例#2
0
    public void SetAsGroupToLink()
    {
        ChildrenManager cM = GameObject.Find("ChildrenManager").GetComponent <ChildrenManager>();

        cM.EnableAllLinkButtons();
        cM.SetGroup(gameObject);
        cM.DisableGroupLinkButtons();
    }
示例#3
0
    void Awake()
    {
        _element = GetComponent<Element>();
        _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>();
        _children = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>();

        _element._noAttractionDuration = _noAttractionDuration;
    }
示例#4
0
    void Awake()
    {
        _element = GetComponent<Element>();
        _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>();
        _childrenManager = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>();

        _explosionSounds = GetComponent<ExplosionSounds>();

        _startPosition = transform.position;
    }
示例#5
0
文件: Feed.cs 项目: Rirols/Nebessa
    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;
    }
示例#6
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();
    }
示例#7
0
 void Awake()
 {
     _manager = GameObject.FindGameObjectWithTag("Player").GetComponent<ChildrenManager>();
     _container = GameObject.FindGameObjectWithTag("GameManager").GetComponent<ElementsContainer>();
     enabled = false;
 }