// 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;
    }