Exemplo n.º 1
0
 private void OnleftMouseClickOnPlayer(PlayerControl player)
 {
     if (specialAbilities.isAbilitySelected == true)
     {
         if (Input.GetMouseButtonDown(0))
         {
             specialAbilities.UseAbilityOnSelf(gameObject, weaponSystem.GetWeaponInUse().weaponDamage);
             specialAbilities.isAbilitySelected = false;
         }
     }
 }
Exemplo n.º 2
0
        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;
        }