Пример #1
0
        // Referacia Al objeto de status que es enviado a todas las escenas


        void Awake()
        {
            rangoSlider.minValue  = 35;
            rangoSlider.maxValue  = 80;
            tiempoSlider.minValue = 5;
            tiempoSlider.maxValue = 15;
            statusGame            = GameObject.Find("StatusGame").GetComponent <StatusGame> ();
        }
Пример #2
0
        private StatusGame statusGame;   // Referacia Al objeto de status que es enviado a todas las escenas

        void Awake()
        {
            // Set up the references.
            player       = GameObject.FindGameObjectWithTag("Player").transform;
            playerHealth = player.GetComponent <PlayerHealth> ();
            enemyHealth  = GetComponent <EnemyHealth> ();
            nav          = GetComponent <UnityEngine.AI.NavMeshAgent> ();

            statusGame = GameObject.Find("StatusGame").GetComponent <StatusGame> ();
            nav.speed  = statusGame.velocidaEnemigos + nav.speed;            //Relacion de Movimiento de los enemigos
        }
Пример #3
0
        void Awake()
        {
            anim            = GetComponent <Animator> ();
            idleHash        = Animator.StringToHash("Idle_B");
            runStateHash    = Animator.StringToHash("Run");
            playerRigidbody = GetComponent <Rigidbody> ();
            floorMask       = LayerMask.GetMask("Floor");
            statusGame      = GameObject.Find("StatusGame").GetComponent <StatusGame> ();


            //camera_gameplay = GameObject.Find ("Camera").GEt;
        }
Пример #4
0
        // Referacia Al objeto de status que es enviado a todas las escenas.


        void Awake()
        {
            gameScore = ScoreObject.GetComponent <ScoreManager> ();
            //Objeto Indestrutible de Status
            statusGame          = GameObject.Find("StatusGame").GetComponent <StatusGame>();
            this.startingHealth = (int)statusGame.healthPlayer; // Salud Global del Player

            anim           = GetComponent <Animator>();
            playerAudio    = GetComponent <AudioSource>();
            playerMovement = GetComponent <PlayerController>();
            //playerShooting = GetComponentInChildren <PlayerShooting> ();
            currentHealth      = startingHealth;
            healthSlider.value = startingHealth;
        }
Пример #5
0
        void Awake()
        {
            // Set up the reference.
            indicatorNextLevel = GameObject.Find("IndicatorNextLevel").GetComponent <Text> ();
            timeSlider         = GameObject.Find("SliderTime").GetComponent <Slider> ();     //Contador de Tiempo
            text       = GetComponent <Text> ();
            statusGame = GameObject.Find("StatusGame").GetComponent <StatusGame> ();
            timer_game = statusGame.timer_game;         // Tiempo Global
            score      = statusGame.scoreGlobal;        // Puntuacion General del Juego
            Scene scene = SceneManager.GetActiveScene();

            nameScene = scene.name;
            //Busca Jugador
            player       = GameObject.FindGameObjectWithTag("Player");
            playerHealth = player.GetComponent <PlayerHealth> ();
            relationTimeStar();              //Relecion de estrellas con cantidad de tiempo.
        }