Ejemplo n.º 1
0
 void Awake()
 {
     Stats             = GetComponent <EnemyStat>();
     anim              = gameObject.GetComponent <Animator>();
     EnMov             = GetComponent <EnhancerMovement> ();
     tempattspeed      = Stats.AttackSpeed;
     Stats.AttackSpeed = 0;
 }
Ejemplo n.º 2
0
 void Awake()
 {
     // Setting up the references.
     //exp = GameObject.FindGameObjectWithTag ("SuicidalExplosion");
     //explosion=exp.GetComponent<ParticleSystem>();
     //audio = explosion.GetComponent<AudioSource> ();
     Stats = GetComponent <EnemyStat>();
 }
Ejemplo n.º 3
0
 void Awake()
 {
     //Debug.Log (difference);
     C     = GameObject.FindGameObjectWithTag("Castle");
     anim  = GetComponent <Animator> ();
     Stats = GetComponent <EnemyStat>();
     MyNextTarget();
     //Debug.Log (difference);
 }
Ejemplo n.º 4
0
 void Awake()
 {
     anim  = GetComponent <Animator> ();
     Stats = GetComponent <EnemyStat>();
     //Stats.Awake.Play ();
     enemyAudio          = GetComponent <AudioSource> ();
     capsuleCollider     = GetComponent <CapsuleCollider> ();
     Stats.CurrentHealth = Stats.StartingHealth;
 }
Ejemplo n.º 5
0
 void Awake()
 {
     Stats             = GetComponentInParent <EnemyStat>();
     anim              = gameObject.GetComponentInParent <Animator>();
     Mov               = gameObject.GetComponentInParent <RangedEnemyMovement>();
     tempattspeed      = Stats.AttackSpeed;
     Stats.AttackSpeed = 0;
     Spawn();
     //Debug.Log (anim.name);
 }
Ejemplo n.º 6
0
 void Awake()
 {
     gunLight          = GetComponent <Light> ();
     gunParticles      = GetComponent <ParticleSystem> ();
     gunAudio          = GetComponent <AudioSource> ();
     Stats             = GetComponentInParent <EnemyStat>();
     anim              = gameObject.GetComponentInParent <Animator>();
     Mov               = gameObject.GetComponentInParent <RangedEnemyMovement>();
     tempattspeed      = Stats.AttackSpeed;
     Stats.AttackSpeed = 0;
     //Debug.Log (anim.name);
 }
Ejemplo n.º 7
0
 void Awake()
 {
     // Set up the references.
     agent       = GetComponent <NavMeshAgent> ();
     Stats       = GetComponent <EnemyStat>();
     agent.speed = Stats.EnemySpeed;
     anim        = GetComponent <Animator> ();
     MyTtowers   = GameObject.FindGameObjectsWithTag("Towers");
     Castle      = GameObject.FindGameObjectWithTag("Castle");
     MyNextTarget();
     Debug.Log(Stats.CurrentHealth);
     transform.LookAt(NextTarget.transform);
 }
Ejemplo n.º 8
0
 void Awake()
 {
     Stats = GetComponent <EnemyStat>();
     anim  = GetComponent <Animator> ();
     if (gameObject.tag == "Dasher")
     {
         dmov = GetComponent <DasherEnemyMovement> ();
     }
     else
     {
         enmov = GetComponent <MeleeEnemyMovement> ();
     }
     tempattspeed      = Stats.AttackSpeed;
     Stats.AttackSpeed = 0;
 }
Ejemplo n.º 9
0
 void Awake()
 {
     // Set up the references.
     //Debug.Log(tag);
     Stats = GetComponent <EnemyStat>();
     if (tag != "SuicidalSoldier")
     {
         agent                  = GetComponent <NavMeshAgent> ();
         agent.speed            = Stats.EnemySpeed;
         agent.stoppingDistance = Stats.Range;
     }
     anim      = GetComponent <Animator> ();
     MyTtowers = GameObject.FindGameObjectsWithTag("Towers");
     Castle    = GameObject.FindGameObjectWithTag("Castle");
     MyNextTarget();
     transform.LookAt(NextTarget.transform);
     //Debug.Log (difference);
     //Stats.effects [0]=true;
     //Debug.Log (NextTarget.transform);
 }