Hello all,
I am trying to use the UFPS event handler to make my player enter a car when he presses the “F” key.
I get this error:
Assets/Cars/VehicleEnter.cs(37,52): error CS1501: No overload for method Invoke' takes 3’ arguments
Here is my code:
using UnityEngine;
using System.Collections;
public class VehicleEnter : MonoBehaviour {
public Transform Vehicle;
public BoxCollider DoorCollider;
public Transform Seat;
public Transform ExitPoint;
vp_FPPlayerEventHandler m_Player;
void Awake()
{
m_Player = transform.GetComponent<vp_FPPlayerEventHandler>();
}
// Use this for initialization
void Start () {
//default values
}
// Entering ther Vehicle
void Entering () {
Debug.Log ("Entering Vehicle");
}
// Update is called once per frame
void Update () {
if (Input.GetKeyUp("VehicleEnter"))
{
m_Player.VehicleEnter.Send.Invoke("Entering", true, 0);
}
}
}