using UnityEngine;
using System.Collections;
public class player : MonoBehaviour
{
public float MineSpeed = 1;
public int Stone;
public int Grass;
public int Wood;
public int Leaf;
public bool MouseDown;
public GameObject ItemHit;
public Item ItemScript;
void Start ()
{
MineSpeed = 1;
Grass = 0;
Stone = 0;
Wood = 0;
Leaf = 0;
ItemScript = ItemHit.GetComponent<"Item">();
}
void Update ()
{
StartCoroutine(playerHit());
}
IEnumerator playerHit()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
ItemHit = hit.transform.gameObject;
if (Physics.Raycast(ray, out hit, 3))
{
if (Input.GetMouseButton(0))
{
yield return new WaitForSeconds(ItemScript.ItemMiningSpeed);
Destroy(ItemHit);
}
}
}
}
Error: Assets/Scripts/Player.cs(29,59): error CS1525: Unexpected symbol `)’