public void StopActions(NGNEntity _owner) { for (int i = 0; i < actions.Length; i++) { actions[i].StopAction(_owner); } }
protected override void OnEnter(NGNEntity _owner) { var rot = _owner.transform.localEulerAngles; var yRot = rot.y; yRot += speed * Time.deltaTime; _owner.transform.localEulerAngles = new Vector3(rot.x, yRot, rot.z); }
protected override void OnEnter(NGNEntity _owner) { var inputHor = horInput.GetAxis(rawInputValues); var inputVer = verInput.GetAxis(rawInputValues); var move = new Vector3(inputHor, 0, inputVer).normalized; _owner.transform.Translate(move * speed * Time.deltaTime); }
private void UnSubscribeToMono(NGNEntity _owner) { if (updateType == UpdateType.Update) { NGNMonoHandler.UnSubscribeToUpdate(_owner, OnEnter); } else if (updateType == UpdateType.FixedUpdate) { NGNMonoHandler.UnSubscribeToFixedUpdate(_owner, OnEnter); } else if (updateType == UpdateType.LateUpdate) { NGNMonoHandler.UnSubscribeToLateUpdate(_owner, OnEnter); } }
protected override void OnExit(NGNEntity _owner) { }
public void StopAction(NGNEntity _owner) { UnSubscribeToMono(_owner); OnExit(_owner); }
public virtual void StartAction(NGNEntity _owner) { SubscribeToMono(_owner); }
protected abstract void OnExit(NGNEntity _owner);
protected abstract void OnEnter(NGNEntity _owner);
public override void Initialize(NGNEntity _owner) { base.Initialize(_owner); RunActions(_owner); }
protected virtual void OnEnable() { source = (NGNEntity)target; sourceRef = serializedObject; GetProperties(); }
public virtual void Initialize(NGNEntity _owner) { owner = _owner; }
public virtual void Initialize(NGNEntity _owner) { instancedValueCategories = valueCategories.GetInstanceArrayCopy(); InitializeValues(); }