//private Transform _bulletSpawn; // Use this for initialization void Start() { _invincible = false; _mesh = transform.GetChild(MESH); _meshDefaultScale = _mesh.localScale; _gravity = Physics.gravity.y * GravityMod; _controller = GetComponent <CharacterController>(); _groundLayer = 1 << LayerMask.NameToLayer("Ground") | 1 << LayerMask.NameToLayer("Default") & ~(1 << LayerMask.NameToLayer("Player")); _saber = transform.GetChild(LIGHT_SABER); _saberControl = _saber.gameObject.GetComponent <SaberControl>(); _saberAnimator = _saber.GetComponent <Animator>(); }
// Use this for initialization void Start() { vPerception = GetComponentInChildren <vaderPerception>(); agent = GetComponent <NavMeshAgent>(); _saber = transform.GetChild(1); _saberControl = _saber.gameObject.GetComponent <SaberControl>(); _saberAnimator = _saber.GetComponent <Animator>(); _player = GameObject.FindWithTag("Player"); rigbod = GetComponent <Rigidbody> (); _canBlock = true; runSpeed = agent.speed; agent.autoBraking = false; destPoint = 0; aimFuzz = 15.0f; aimRangeTop = 1.5f; aimRangeBottom = -1.5f; saveTime = 0.0f; NextPoint(); }