コード例 #1
0
 protected bool AcquireTarget(out TargetPoint target)
 {
     if (TargetPoint.FillBuffet(transform.localPosition, targetingRange))
     {
         target = TargetPoint.RandomBuffered;
         return(true);
     }
     target = null;
     return(false);
 }
コード例 #2
0
 public void Initialize(
     Vector3 position, float blastRadius, float damage = 0f
     )
 {
     if (damage > 0f)
     {
         TargetPoint.FillBuffet(position, blastRadius);
         for (int i = 0; i < TargetPoint.BufferedCount; i++)
         {
             TargetPoint.GetBuffered(i).Enemy.ApplyDamage(damage);
         }
     }
     transform.localPosition = position;
     scale = 2f * blastRadius;
 }