private void Awake()
    {
        walker    = body.GetComponent <Walker>();
        jumper    = body.GetComponent <Jumper>();
        feet      = body.GetComponent <Feet>();
        propeller = body.GetComponent <Propeller>();
        stick     = body.GetComponent <StickToSurface>();

        playerGO = GameObject.FindWithTag(followTag);
    }
Exemple #2
0
    private void Awake()
    {
        walker  = body.GetComponent <Walker>();
        jumper  = body.GetComponent <Jumper>();
        spinner = body.GetComponent <Spinner>();
        feet    = body.GetComponent <Feet>();
        stick   = body.GetComponent <StickToSurface>();

        GameObject playerGO = GameObject.FindWithTag(followTag);

        if (playerGO != null)
        {
            player = playerGO.GetComponentInChildren <Pilot>(true);
        }
    }