Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        if (GameObject.Find("MusicManager") != null)
        {
            songManager = GameObject.Find("MusicManager").GetComponent <SongManager>();
        }

        _tractorLine                 = transform.FindChild("TractorBeam").GetComponent <LineRenderer>();    //GetComponentInChildren<LineRenderer>();
        _tractorOverlay              = transform.FindChild("TractorOverlay").GetComponent <LineRenderer>(); //GetComponentInChildren<LineRenderer>();
        _tractorLine.sortingOrder    = -1;
        _tractorOverlay.sortingOrder = -1;
        _player = GetComponent <Player>();

        if (joystick == null && GameObject.Find("VirtualJoystickTether") != null)
        {
            joystick = GameObject.Find("VirtualJoystickTether").GetComponentInChildren <VirtualJoystickTether>();
        }
    }