Exemple #1
0
        public bool HandleRaycast(PlayerController callingController)
        {
            Fighter fighter = callingController.gameObject.GetComponent <Fighter>();

            if (!fighter.CanAttack(gameObject))
            {
                return(false);
            }
            if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonUp(0))
            {
                fighter.Attack(gameObject);
            }
            return(true);
        }