浏览代码

minor

/main
DeivSky 4 年前
当前提交
9dba4a4a
共有 13 个文件被更改,包括 21 次插入5 次删除
  1. 17
      UOP1_Project/Assets/Scenes/StateMachines.unity
  2. 2
      UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Conditions/EatDuration.asset
  3. 2
      UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatingToChasing.asset
  4. 3
      UOP1_Project/Assets/Scripts/StateMachine/Scriptables/ScriptableState.cs
  5. 2
      UOP1_Project/Assets/Scripts/StateMachineTest/HungerComponent.cs
  6. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/AttackingToChasing.asset
  7. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/AttackingToChasing.asset.meta
  8. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToAttacking.asset
  9. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToAttacking.asset.meta
  10. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToEating.asset
  11. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToEating.asset.meta
  12. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatingToChasing.asset.meta
  13. 0
      /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatingToChasing.asset

17
UOP1_Project/Assets/Scenes/StateMachines.unity


m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 233317031}
m_LocalRotation: {x: 0.1815913, y: -0.34830034, z: 0.06897038, w: 0.91703576}
m_LocalRotation: {x: 0.18159129, y: -0.3483003, z: 0.068970375, w: 0.91703576}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _maxFullness
value: 50
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _hungerPerSecond
value: 4
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957525, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}
propertyPath: _isHungryThreshold
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8065985805251957531, guid: 2ae670cd29a6f4843aa75201aa44ef31,
type: 3}

2
UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Conditions/EatDuration.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 0}
m_Script: {fileID: 11500000, guid: 9ea14bb700bdcb64e9855f6bd0837d08, type: 3}
m_Name: EatDuration
m_EditorClassIdentifier: Assembly-CSharp::ScriptableTimedCondition
Duration: 2

2
UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatingToChasing.asset


m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9e1893bf30b6f554a9d80007ee336691, type: 3}
m_Name: EatToChase
m_Name: EatingToChasing
m_EditorClassIdentifier:
_targetState: {fileID: 11400000, guid: 4b9ef9df9c479aa469d161e9019b218e, type: 2}
_conditions:

3
UOP1_Project/Assets/Scripts/StateMachine/Scriptables/ScriptableState.cs


[SerializeField] private ScriptableStateAction[] _actions = null;
[SerializeField] private ScriptableStateTransition[] _transitions = null;
public State GetState(StateMachine stateMachine) => GetState(stateMachine, new Dictionary<ScriptableObject, object>());
public State GetState(StateMachine stateMachine)
=> GetState(stateMachine, new Dictionary<ScriptableObject, object>());
internal State GetState(StateMachine stateMachine, Dictionary<ScriptableObject, object> createdInstances)
{

2
UOP1_Project/Assets/Scripts/StateMachineTest/HungerComponent.cs


[SerializeField] private float _hungerPerSecond = 1f;
[SerializeField] [Range(0.01f, 0.99f)] private float _isHungryThreshold = 0.4f;
private bool _getHungry;
public float _currentFullness;
private float _currentFullness;
public bool IsHungry => _currentFullness <= _maxFullness * _isHungryThreshold;
private void Awake() => _currentFullness = _maxFullness;

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/AttackToChase.asset → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/AttackingToChasing.asset

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/AttackToChase.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/AttackingToChasing.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChaseToAttack.asset → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToAttacking.asset

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChaseToAttack.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToAttacking.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChaseToEat.asset → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToEating.asset

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChaseToEat.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/ChasingToEating.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatToChase.asset.meta → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatingToChasing.asset.meta

/UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatToChase.asset → /UOP1_Project/Assets/ScriptableObjects/StateMachinesTest/Transitions/EatingToChasing.asset

正在加载...
取消
保存