在Unity中,我想用鼠标在屏幕上绘制一个形状(任何物体形状),当绘制的线条碰撞时,我想在其上找到碰撞检测并用颜色填充线条碰撞区域。
代码引自“http://www.theappguruz.com/blog/draw-line-mouse-move-detect-line-collision-unity2d-unity3d”。
到目前为止,这是我的代码:
$db_host = "localhost";
$db_username = "root";
$db_pass = "";
$link= mysqli_connect("$db_host","$db_username","$db_pass", "db") or die ("could not connect to mysql");
//if($link){echo "connect";}
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
//Load Composer's autoloader
require 'vendor/autoload.php';
$mail = new PHPMailer(true); // Passing `true` enables exceptions
try {
$query = "select customer_email from subscribers";
$result = mysqli_query($link, $query) or die("No customer in the table");;
while($values = mysqli_fetch_array($result)){
$toemail = $values['customer_email'];
//Server settings
$mail->SMTPDebug = 1; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = '(myhost)'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '(my email)'; // SMTP username
$mail->Password = '(my password)'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
//Recipients
$mail->setFrom('haris.khan@premier.com.pk', 'Premier');
$mail->addAddress(''.$toemail.'', ''.$name.''); // Add a recipient
$mail->addReplyTo('haris.khan@premier.com.pk', 'Information');
//Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Here is the subject for IT';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
}
} catch (Exception $e) {
echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
}