Ejemplo n.º 1
0
 public void Init(AttackingUnit data)
 {
     towerData = data;
     hp        = data.Hp;
     Transform = transform;
     attacker  = new Attacker(transform);
     InvokeRepeating(nameof(TrayAttack), 1, towerData.AttackRate);
 }
Ejemplo n.º 2
0
        public void Init(AttackingUnit data)
        {
            enemyData = data;
            hp        = data.Hp;
            Transform = transform;
            agent     = GetComponent <NavMeshAgent>();
            agent.Warp(transform.position);
            mover.Init(agent, transform);
            attacker = new Attacker(transform);

            InvokeRepeating(nameof(TrayAttack), 1, enemyData.AttackRate);
        }