コード例 #1
0
 public static bool CanMoveAndAttackFromPosition(GameObject self, Transform attackableTarget, float unitAttackDistance, Vector3 position)
 {
     return(IsAllowableDistanceForAttack(position, attackableTarget.position, unitAttackDistance) &&
            IsFreePosition(position, 0.6f, Consts.LayerMasks.Units.AddToMask(Consts.Layers.Obstacle), self) &&
            GameBounds.IsInsidePlayerShootingBounds(position));
 }
コード例 #2
0
 public static bool CanAttackFromPosition(GameObject self, Transform attackableTarget, float unitAttackDistance, Vector3 position)
 {
     return(IsAllowableDistanceForAttack(position, attackableTarget.position, unitAttackDistance) &&
            GameBounds.IsInsidePlayerShootingBounds(position));
 }