using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Coin_spawn : MonoBehaviour
{
private GameObject Coin;
private Touch touch;
private Vector2 touchPos;
void Update()
{
if (Input.GetMouseButtonDown(0))
{
touchPos = Camera.main.ScreenToWorldPoint(touch.position);
Instantiate(Coin, touchPos, Quaternion.identity);
}
}