void Start()
    {
        //coroutine for character
        coroutine = WaitAndStart(0.5f);
        StartCoroutine(coroutine);
        Transform  soldier = transform.Find("soldier");
        GameObject drg     = GameObject.Find("Main Camera");

        dragBuilding = (PickObjects)drg.GetComponent(typeof(PickObjects));
    }
    // Use this for initialization
    void Start()
    {
        Jogador         = GameObject.FindGameObjectWithTag("Player");
        o_camera        = Jogador.transform.Find("Main Camera").gameObject;
        ScriptMovimento = Jogador.GetComponent <Movimento>();
        Pegador         = Jogador.transform.Find("Main Camera").transform.Find("PickUpArea").GetComponent <PickObjects>();
        controlador     = Jogador.GetComponent <CharacterController>();

        GravidadePadrao = ScriptMovimento.gravidadePadrao;
    }
 void Start()
 {
     imagem_brinquedo = GameObject.Find("BrinquedoPego").GetComponent <Image>();
     imagem_brinquedo.gameObject.SetActive(false);
     controle        = Resources.Load <Sprite>("controle");
     bolinhaazul     = Resources.Load <Sprite>("bolinhaazul");
     bolinhavermelha = Resources.Load <Sprite>("bolinhavermelha");
     aviao           = Resources.Load <Sprite>("aviao");
     pickobjects     = GameObject.Find("PickUpArea").GetComponent <PickObjects>();
 }
 void atualizarDados()
 {
     scritMovimento = GameObject.FindGameObjectWithTag("Player").GetComponent <Movimento>();
     controlador    = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterController>();
     // pegador = AreaPickUp.GetComponent<PickObjects>();
     pegador = GameObject.FindWithTag("AreaPickUp").GetComponent <PickObjects>();
     if (pegador == null)
     {
         print(GameObject.FindGameObjectWithTag("AreaPickUp").name);
     }
 }
Beispiel #5
0
    void Start()
    {
        cam_tr = Camera.main.transform;

        cont = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterController>();

        pegador = GameObject.FindWithTag("AreaPickUp").GetComponent <PickObjects>();
        if (pegador == null)
        {
            print("Player não encontrado");
        }
    }
Beispiel #6
0
    void Start()
    {
        pegador = GameObject.FindWithTag("AreaPickUp").GetComponent <PickObjects>();
        if (pegador == null)
        {
            print("Player não encontrado");
        }

        movimentoPlayer = Player.GetComponent <Movimento>();
        movimentoRobo   = BrinquedoRobo.GetComponent <Movimento>();

        movimentoCameraPlayer = BrinquedoRobo.GetComponentInChildren <Camera>().gameObject.GetComponent <CameraScript>();
        movimentoCameraRobo   = Player.GetComponentInChildren <Camera>().gameObject.GetComponent <CameraScript>();

        emissor = GameObject.FindGameObjectWithTag("DialogueManager").GetComponent <AudioManager>();
    }
Beispiel #7
0
    void Start()
    {
        Button quit_button = GameObject.Find("Quit Button").GetComponent <Button>();

        camerascript = GameObject.Find("Player").transform.Find("Main Camera").GetComponent <CameraScript>();

        /* if(GameObject.Find("BrinquedoRobo") != null)
         * {
         *   camerascript_clone = GameObject.Find("BrinquedoRobo").transform.Find("CameraRobo").GetComponent<CameraScript>();
         * }
         * else
         * {
         *   camerascript_clone = null;
         * }*/
        pickobjects = GameObject.FindWithTag("AreaPickUp").GetComponent <PickObjects>();
        pausemenu   = GameObject.Find("Pause Menu");
        quit_button.onClick.AddListener(QuitGame);

        pausemenu.SetActive(false);
    }
Beispiel #8
0
 void Start()
 {
     controller = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterController>();
     pc         = AreaPickUp.GetComponent <PickObjects>();
     mira.SetActive(false);
 }