void Start() { canShoot = true; canRotate = true; currentHealth = maxHealth; healthBarSystem.SetMaxHelthValue(maxHealth); launchArcRenderer = arcPredictrer.GetComponent <LaunchArcRenderer>(); maxAngle = spine.GetComponent <BowScript>().maxAngle; minAngle = spine.GetComponent <BowScript>().minAngle; }
// Use this for initialization void Start() { agent = GetComponent <NavMeshAgent>(); agent.speed = speed; ogmats = material.GetComponent <SkinnedMeshRenderer>().materials; player = GameManager.instance.player; target = GameManager.instance.towerTarget; agent.SetDestination(target.transform.position); animator.speed = animatorSpeed; if (enemyType != EnemyType.Giant) { animator.SetBool("walking", true); // animator.speed = speed; } healthBarSystem.SetMaxHelthValue(health); }