Синтаксис:
Используется csharp
using UnityEngine;
using System.Collections;
public class MOney : MonoBehaviour {
public Shooting test;
// Update is called once per frame
void Update ()
{
GameObject player = GameObject.FindGameObjectWithTag("Player");
if(Input.GetButtonDown("Use")&Vector3.Distance(transform.position, player.transform.position)<2)
{
test.CurCatrige += 1;
Destroy(gameObject);
}
}
}
using System.Collections;
public class MOney : MonoBehaviour {
public Shooting test;
// Update is called once per frame
void Update ()
{
GameObject player = GameObject.FindGameObjectWithTag("Player");
if(Input.GetButtonDown("Use")&Vector3.Distance(transform.position, player.transform.position)<2)
{
test.CurCatrige += 1;
Destroy(gameObject);
}
}
}
Есть такой скрипт и тут выдает ошибку...
Синтаксис:
- Assets/c#/MOney.cs(5,8): error CS0246: The type or namespace name `Shooting' could not be found. Are you missing a using directive or an assembly reference?
как это исправить???