Can anyone help me to have fire event in playmaker.
I just want simple fire action
Something like onEnter and onUpdate fire action.
Fire action come from vp_shooter.cs with "tryfire"function
I am not good at coding so I stuck on almost five they or anyone tell me to what is wrong with my code
using UnityEngine;
using System.Collections;
using HutongGames.PlayMaker;
[ActionCategory("UFPS")]
public class Shoot_target : FsmStateAction
{
[RequireComponent(typeof(vp_Shooter))]
protected vp_Shooter M_Shooter = null;
void Start()
{
m_Shooter = GetComponent<vp_Shooter>();
}
public override void OnEnter()
{
m_Shooter.TryFire();
Finish();
}
}