using UnityEngine;
using System.Collections;
public class player: MonoBaviour
{
public string name;
public int health;
public int Damage;
public float range;
public static opponent;
void Start ()
{
attack ();
}
void Update ()
{
Attack ();
}
void Attack()
{
if (Input.getKeyUp(KeyCode.Q))
if (opponent != null && Vector3.Distance(opponent.position, transform.position < range)
(opponent.GetComponent().GetHit(damage))
0
Comments