public Zombie(GameObject character_object) { m_playerobject = character_object; zam = m_playerobject.GetComponentInChildren <ZombieAnimationManager>(); em = m_playerobject.GetComponent <EnemyMovement>(); damage = Random.Range(8, 14); m_char_name = "zombie"; m_health = 100; m_interpspeed = 0.05f; m_isStanding = true; }
void Start() { //anim = GetComponentInChildren<Animator>(); zam = GetComponentInChildren <ZombieAnimationManager>(); cc = GetComponent <CharacterController>(); //wary of deleting //cm = GameObject.Find(Character.PLAYER).GetComponent<CharacterMovement>(); cdc = GetComponent <CharacterDataController>(); player = GameObject.Find(Character.PLAYER).transform.GetChild(0).gameObject; //"player" agent = GetComponent <NavMeshAgent>(); player_char = GameObject.Find(Character.PLAYER).GetComponent <CharacterDataController>().character; shouldAttack = true; shouldMove = true; shouldFollow = true; zam.BeginIdleAnimation(); agent_speed = zam.SetRandomMovementAnim(); }