Hi all,
i am trying to do something like picking the coins with sound when the character collides the coin using the you tube tutorials
“Unity 3D - Pick Up Item Tutorial - Part 1 - YouTube”
“Unity 3D - Pick Up Item Tutorial - Part 2 - YouTube”
i am using the exact things and scripts that is shown in the tutorial but for me the pick up script its not working. i am getting an error saying
"Assets/Scripts/GameManager.cs(14,115): error CS1525: Unexpected symbol `PickupCount’
Here is my script
using UnityEngine;
using System.Collections;
public class Pickup : MonoBehaviour
{
public int CoinValue;
public AudioSource _audioSource;
void Awake()
{
CoinValue =1;
_audioSource = gameObject.GetComponent<AudioSource>();
}
// Update is called once per frame
void Update () {
if (_triggered && !_audioSource.isPlaying)
Destroy(gameObject);
}
void OnTriggerEnter()
{
_triggered = true;
-AudioSource.enabled = true;
GameManager.PickUpCount += CoinValue;
GameObject.GetComponent<MeshRenderer>().enabled = false;
Instantiate(PickupParticleEffect, gameObject.transform.position, Quaternion.LookRotation(Vector3));
}
}
Can someone help me please
Regards
Suresh Jallipalli