浏览代码

Small Fixes + Changelog

/main
Thomas ICHÉ 5 年前
当前提交
bbddcf12
共有 4 个文件被更改,包括 26 次插入4 次删除
  1. 2
      CHANGELOG.md
  2. 2
      Runtime/Ingredients/Folder.cs
  3. 5
      Runtime/Ingredients/StateMachine/StateMachine.cs
  4. 21
      Runtime/LevelScripting/Logic/FlipFlopLogic.cs

2
CHANGELOG.md


* Added RigidBody Action : Perform actions on a rigidbody
* Added SetAnimatorParameterAction : Perform parameter setting on Animators
* Added Sacrifice Oldest option to Factory
* Added Folder Cosmetic Behavior (for view in Advanced HIerarchy View)
- State Machine : Setting default state in editor also sets the correct enabled flags for this state.
#### Fixed

2
Runtime/Ingredients/Folder.cs


{
public Color Color = Color.yellow;
#if UNITY_EDITOR
private void Awake()
{
Reset();

Destroy(this);
}
}
#endif
}
}

5
Runtime/Ingredients/StateMachine/StateMachine.cs


SetState(DefaultState);
}
private void OnValidate()
{
SetState(DefaultState);
}
public void SetState(string stateName)
{
State newState = States.FirstOrDefault(o => o.StateName == stateName);

21
Runtime/LevelScripting/Logic/FlipFlopLogic.cs


{
public class FlipFlopLogic : LogicBase
{
public enum State
{
Flip,
Flop
}
public State InitialState = State.Flip;
[ReorderableList]
public Callable[] OnFlip;

private bool condition = true;
private State state;
public void OnEnable()
{
state = InitialState;
}
if (condition)
if (state == State.Flop)
condition = false;
state = State.Flip;
condition = true;
state = State.Flop;
}
}
}
正在加载...
取消
保存