using UnityEngine;
using System.Collections;
public class Weapon : MonoBehaviour {
public string Name;
public int RateOfFire;
int ROF;
public int Accuracy;
public int Ammo;
public Bullet Amunition;
public PCP shootingPoint;
[HideInInspector]
public bool IsActive = false;
void Start ()
{
ROF = 0;
}
// Update is called once per frame
public void WeaponUpdate ()
{
if(ROF != 0)
{
ROF --;
}
}
public void Shoot()
{
if(Ammo > 0 && ROF == 0)
{
shootingPoint.SendMessage("Create",Amunition);
Ammo --;
ROF = RateOfFire;
}
}
}
"Note : PCP is shortcut to Prefab Shooting Point".
I got this error in the shooting method in the line "shootingPoint.SendMessage" I just dont understand why ? and I have the Components at the objects I placed in the shootingPoint and the Ammunation , so what is wrong ??
Here is an image to prove I attached objects :