Example #1
0
    void Start()
    {
        player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> ();
        agent = GetComponent<NavMeshAgent> ();
        animator = GetComponent<Animator> ();
        ui_enemy = GameObject.FindGameObjectWithTag ("Enemy UI").GetComponent<UIEnemy> ();
        target = null;
        StartCoroutine (SearchPlayer ());

        level = player.level;
        IncStats ();
        CalculateStats ();
        hp = hp_max;
    }
Example #2
0
 void Start()
 {
     agent = GetComponent<NavMeshAgent> ();
     animator = GetComponent<Animator> ();
     target_enemy = null;
     target_equip = null;
     equipped = null;
     ui_maya = GameObject.FindGameObjectWithTag ("Maya UI").GetComponent<UIMaya> ();
     ui_enemy = GameObject.FindGameObjectWithTag ("Enemy UI").GetComponent<UIEnemy> ();
     weapon_holder = GameObject.FindGameObjectWithTag ("WeaponHolder").transform;
     ui_enemy.Enable (false);
     StartCoroutine (UIUpdate ());
     StartCoroutine (RegenHP ());
     StartCoroutine (RegenMana ());
     skills = GameObject.FindGameObjectWithTag ("Skill").GetComponent<PlayerSkills> ();
     life_steal = skills.transform.GetChild (4);
     level_up_particles = transform.GetChild (7).GetComponent<ParticleSystem> ();;
 }