private void OnleftMouseClickOnPlayer(PlayerControl player) { if (specialAbilities.isAbilitySelected == true) { if (Input.GetMouseButtonDown(0)) { specialAbilities.UseAbilityOnSelf(gameObject, weaponSystem.GetWeaponInUse().weaponDamage); specialAbilities.isAbilitySelected = false; } } }
void Start() { weaponSystem = GetComponent <WeaponSystem>(); npcMovement = GetComponent <NPCMovement>(); healthSystem = GetComponent <HealthSystem>(); player = FindObjectOfType <PlayerControl>(); playerObj = player.gameObject; if (weaponSystem != null) { attackRadius = weaponSystem.GetWeaponInUse().GetWeaponAttackRange(); } returningPosition = transform.position; }