public void HurtEnemyMethod(RollyScript objectToHurt, float damageToTake) { if (!isRolling) { objectToHurt.enemyHealth -= damageToTake; } }
// Start is called before the first frame update void Start() { theEnemyMovement = FindObjectOfType <enemyMovement>(); theDemonEnemyScript = FindObjectOfType <DemonEnemyScript>(); theRollyScript = FindObjectOfType <RollyScript>(); theBossSpoooderScript = FindObjectOfType <BossSpoooderScript>(); theBossRollyScript = FindObjectOfType <BossRollyScript>(); pickaxePoint1 = FindObjectOfType <PickaxePointScript>(); theManager = FindObjectOfType <manager>(); theCharacterMovement = FindObjectOfType <characterMovement>(); isOnGroundLeft = false; isOnGroundRight = false; }