public Transform colliderChecked(ATTACK_TYPE attackType) { Collider2D hittedCollider = Physics2D.OverlapBox(attackRangeCenter.position, colliderSize, obstacleLayer); if (hittedCollider.CompareTag("Monster")) { MonsterController monster = hittedCollider.GetComponent <MonsterController>(); GameManager.Instance.currentScore += monster.score; Debug.Log(GameManager.Instance.currentScore); monster.DestroyItself(); if (attackType == ATTACK_TYPE.NORMAL) { manaGained += 1; } } return(null); }