// Use this for initialization
    void Start()
    {
        parentScript = GetComponentInParent<BlackHoleScript>();

        collider = gameObject.GetComponent<Collider>();

        active = parentScript.IsActive();

        collider.enabled = active;
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        parentScript = GetComponentInParent <BlackHoleScript>();

        collider = gameObject.GetComponent <Collider>();

        active = parentScript.IsActive();

        collider.enabled = active;
    }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        active = parentScript.IsActive();

        collider.enabled = active;
    }