浏览代码

Fixing events not being events (#109)

Without event keyword anyone can call such delegates
/main
GitHub 4 年前
当前提交
c7fa7330
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 16
      UOP1_Project/Assets/Scripts/InputReader.cs

16
UOP1_Project/Assets/Scripts/InputReader.cs


[CreateAssetMenu(fileName = "Input Reader", menuName = "Game/Input Reader")]
public class InputReader : ScriptableObject, GameInput.IGameplayActions
{
public UnityAction jumpEvent;
public UnityAction jumpCanceledEvent;
public UnityAction attackEvent;
public UnityAction interactEvent;
public UnityAction extraActionEvent;
public UnityAction pauseEvent;
public UnityAction<Vector2> moveEvent;
public UnityAction<Vector2> cameraMoveEvent;
public event UnityAction jumpEvent;
public event UnityAction jumpCanceledEvent;
public event UnityAction attackEvent;
public event UnityAction interactEvent;
public event UnityAction extraActionEvent;
public event UnityAction pauseEvent;
public event UnityAction<Vector2> moveEvent;
public event UnityAction<Vector2> cameraMoveEvent;
GameInput gameInput;

正在加载...
取消
保存