Пример #1
0
 public void StopActions(NGNEntity _owner)
 {
     for (int i = 0; i < actions.Length; i++)
     {
         actions[i].StopAction(_owner);
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
 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);
     }
 }
Пример #5
0
 protected override void OnExit(NGNEntity _owner)
 {
 }
Пример #6
0
 public void StopAction(NGNEntity _owner)
 {
     UnSubscribeToMono(_owner);
     OnExit(_owner);
 }
Пример #7
0
 public virtual void StartAction(NGNEntity _owner)
 {
     SubscribeToMono(_owner);
 }
Пример #8
0
 protected abstract void OnExit(NGNEntity _owner);
Пример #9
0
 protected abstract void OnEnter(NGNEntity _owner);
Пример #10
0
 public override void Initialize(NGNEntity _owner)
 {
     base.Initialize(_owner);
     RunActions(_owner);
 }
Пример #11
0
 protected virtual void OnEnable()
 {
     source    = (NGNEntity)target;
     sourceRef = serializedObject;
     GetProperties();
 }
Пример #12
0
 public virtual void Initialize(NGNEntity _owner)
 {
     owner = _owner;
 }
Пример #13
0
 public virtual void Initialize(NGNEntity _owner)
 {
     instancedValueCategories = valueCategories.GetInstanceArrayCopy();
     InitializeValues();
 }