#pragma strict
var TheDamage : int 50;
var Distance : float;
Function Uptade () '
{
if (Input.GetMouseButtonDown("Fire1"))
{
var hit : RaycastHit;
if (Physics.Raycast Transform.position, Transform.TransformDirection(Vector3.forward), hit))
{
Distance = hit.distance;
hit.transform.SendMessage("ApplyDamage"), TheDamage, SendMessageOptions.DontRequireReceiver);
}
}
}
I get 2 errors that says expecting semicolon at the end and expecting found /n PLEASE HELP!
↧