public void AttackBomb() { if (ActorProxy.isPlayingAI == false) { return; } if (Random.value < 0.05f) { Vector3 pos = transform.position; ActorProxy.PlayEffectWithRelay("Effect_FireBomb", pos); var cols = Physics.OverlapSphere(pos, (ActorProxy as DiceActorProxy).diceInfo.effectRangeValue, targetLayer); foreach (var col in cols) { var bs = col.GetComponentInParent <BaseEntity>(); if (bs != null && bs.CanBeTarget()) { bs.ActorProxy?.HitDamage(ActorProxy.effect, DamageType.Fire); } } } }