Пример #1
0
    void Awake()
    {
        managerShapes     = FindObjectOfType <GesturesShapeManager> ();
        results_script    = FindObjectOfType <PutDataResults> ();
        score_script      = FindObjectOfType <ScoreHandlerFM> ();
        txt_scaleMin      = GameObject.Find("txt_scaleMinFM").GetComponent <Text>();
        time_enemies      = GameObject.Find("txt_enemies_timeFM").GetComponent <Text>();
        txt_jugabilidad   = GameObject.Find("txt_jugabilidadFM").GetComponent <Text>();
        bt_play           = GameObject.Find("bt_playFM").GetComponent <Button>();
        results_canvas    = GameObject.Find("results_canvas");
        parameters_canvas = GameObject.Find("Figuras Magicas Parameters Panel");
        tutorial_canvas   = GameObject.Find("tutorial_canvas");
        timeSlider        = GameObject.Find("slideTimeUI").GetComponent <Slider>();
        spawnnerEnemies   = GameObject.Find("Spawnner").GetComponent <SpawnnerFM>();
        txt_time          = GameObject.Find("txt_timer").GetComponent <Text> ();


        results_canvas.transform.localScale  = Vector3.zero;
        tutorial_canvas.transform.localScale = Vector3.zero;
        tutorial_pages_array = new List <GameObject> ();



        int contador = 0;


        do
        {
            contador++;
            tutorial_page_info = GameObject.Find("tutorial_page" + contador);

            if (tutorial_page_info != null)
            {
                tutorial_pages_array.Add(tutorial_page_info);
                tutorial_page_info.SetActive(false);
            }
        } while (tutorial_page_info != null);


        jugabilidad_number  = 1;
        _timeBetweenEnemies = 1;
    }
Пример #2
0
    // Use this for initialization
    void Awake()
    {
        score_script        = FindObjectOfType <ScoreHandlerFM> ();
        effets              = FindObjectOfType <EffectMagicFM> ();
        animator_controller = GetComponent <Animator> ();
        pathfinder          = GetComponent <UnityEngine.AI.NavMeshAgent> ();
        currentState        = State.Chasing;
        target              = GameObject.Find("Player").transform;
        StartCoroutine(UpdatePath());

        myCollisionRadius     = GetComponent <CapsuleCollider> ().radius;
        targetCollisionRadius = target.GetComponent <CapsuleCollider> ().radius;


        manager = GameObject.FindObjectOfType <GesturesShapeManager> ();
        manager.onShapeRecognition += onRecognizeShape;

        array_sprites = new List <Sprite> ();
        array_images  = new List <Image> ();
        index_images  = new List <int> ();
    }