protected override void Start() { base.Start(); rwController = GetComponent <RangedWeaponController>(); fow = GetComponent <FieldOfView>(); normalSpeed = GetComponent <NavMeshAgent>().speed; bossSpeed = GetComponent <NavMeshAgent>().speed / 3; if (isBoss) { UpgradeToBoss(); } pathFinder = GetComponent <NavMeshAgent>(); skinMaterial = GetComponent <Renderer>().material; originalColor = skinMaterial.color; player = GameObject.FindGameObjectWithTag("Player"); if (player != null) { currentState = State.Chasing; hasTarget = true; target = player.transform; targetEntity = target.GetComponent <LivingEntity>(); targetEntity.OnDeath += OnTargetDeath; myCollisionRadius = GetComponent <CapsuleCollider>().radius; targetCollisionRadius = target.GetComponent <CapsuleCollider>().radius; StartCoroutine(UpdatePath()); } }
protected override void Start() { base.Start(); controller = GetComponent <PlayerController>(); rwController = GetComponent <RangedWeaponController>(); viewCamera = Camera.main; }
void Start() { animator = GetComponentInChildren <Animator>(); stats = GetComponent <CharacterStats>(); playerMotor = GetComponent <PlayerMotor>(); colliderplayer = GetComponent <CapsuleCollider2D>(); meleeWeapon = GetComponent <MeleeWeaponController>(); rangedWeapon = GetComponent <RangedWeaponController>(); playerAnimatorController = GetComponent <PlayerAnimatorController>(); //currentAttackCycle = weapon1.combatPattern.Length; //cycleLenght = currentAttackCycle; }