浏览代码

Adding jump up and down states for bard hare with their conditions and transitions

/main
Amel 4 年前
当前提交
320a8038
共有 16 个文件被更改,包括 208 次插入5 次删除
  1. 33
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/BardHare_TransitionTable.asset
  2. 3
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/States/JumpDown.asset
  3. 3
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/States/JumpUP.asset
  4. 31
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingDownSO.cs
  5. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingDownSO.cs.meta
  6. 31
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingUpSO.cs
  7. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingUpSO.cs.meta
  8. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingDown.asset
  9. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingDown.asset.meta
  10. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingUp.asset
  11. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingUp.asset.meta
  12. 15
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpDownTimeElapsed.asset
  13. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpDownTimeElapsed.asset.meta
  14. 15
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpUpTimeElapsed.asset
  15. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpUpTimeElapsed.asset.meta

33
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/BardHare_TransitionTable.asset


- ExpectedResult: 0
Condition: {fileID: 11400000, guid: f4c89ffbe6ca8fe46ae22ec9d191671a, type: 2}
Operator: 0
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 4f15fe7b4afb565469f360b403d50f64, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 3388e91c73e51e845a78aa522a2f2bda, type: 2}
ToState: {fileID: 11400000, guid: 7aedcd9c179a4824eaf24451ab5689ba, type: 2}
Conditions:

- ExpectedResult: 0
Condition: {fileID: 11400000, guid: f4c89ffbe6ca8fe46ae22ec9d191671a, type: 2}
Operator: 0
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 4f15fe7b4afb565469f360b403d50f64, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 3388e91c73e51e845a78aa522a2f2bda, type: 2}
ToState: {fileID: 11400000, guid: 1aad0cd7a387c6544a113d9fa8df1ce3, type: 2}
Conditions:

- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 5ef92fc56785ca244a1415862e4e8e6e, type: 2}
Operator: 1
- ExpectedResult: 1
Condition: {fileID: 11400000, guid: 4f15fe7b4afb565469f360b403d50f64, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: b815b7da412ff164abfb213e11d27ace, type: 2}
ToState: {fileID: 11400000, guid: 3388e91c73e51e845a78aa522a2f2bda, type: 2}
Conditions:

- ExpectedResult: 1
Condition: {fileID: 11400000, guid: f4c89ffbe6ca8fe46ae22ec9d191671a, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 7aedcd9c179a4824eaf24451ab5689ba, type: 2}
ToState: {fileID: 11400000, guid: 885192acb10cc9d48aef04aa233806b4, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 3094c9e3ec17b014889ac4191094d7dc, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 885192acb10cc9d48aef04aa233806b4, type: 2}
ToState: {fileID: 11400000, guid: 7aedcd9c179a4824eaf24451ab5689ba, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 64ce86d12c76d524e88b4d53913134e8, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 7aedcd9c179a4824eaf24451ab5689ba, type: 2}
ToState: {fileID: 11400000, guid: ebb0392d6a6af934c9a3f7d60d0ea8eb, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 762a454daf6e8be4397f3eab55d93aa6, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: ebb0392d6a6af934c9a3f7d60d0ea8eb, type: 2}
ToState: {fileID: 11400000, guid: 7aedcd9c179a4824eaf24451ab5689ba, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 58ec7032270477d4bb3338e9f990bc46, type: 2}
Operator: 0

3
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/States/JumpDown.asset


m_Script: {fileID: 11500000, guid: 35432205b9a6a374bbbfe6b7cac92179, type: 3}
m_Name: JumpDown
m_EditorClassIdentifier:
_actions: []
_actions:
- {fileID: 11400000, guid: 1d15b7f839827284cbd433483fa1bb36, type: 2}

3
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/States/JumpUP.asset


m_Script: {fileID: 11500000, guid: 35432205b9a6a374bbbfe6b7cac92179, type: 3}
m_Name: JumpUP
m_EditorClassIdentifier:
_actions: []
_actions:
- {fileID: 11400000, guid: 1c9c80c379eac3947814b78c2ed92c13, type: 2}

31
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingDownSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(menuName = "State Machines/Conditions/Is NPC Jumping Down")]
public class IsNPCJumpingDownSO : StateConditionSO<IsNPCJumpingDownCondition> { }
public class IsNPCJumpingDownCondition : Condition
{
//Component references
private NPC _npcScript;
public override void Awake(StateMachine stateMachine)
{
_npcScript = stateMachine.GetComponent<NPC>();
}
protected override bool Statement()
{
if (_npcScript.npcState == NPCState.JumpDown)
{
return true;
}
else
{
return false;
}
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingDownSO.cs.meta


fileFormatVersion: 2
guid: 301c417603e282742b18e2ccf214676f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

31
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingUpSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(menuName = "State Machines/Conditions/Is NPC Jumping Up")]
public class IsNPCJumpingUpSO : StateConditionSO<IsNPCJumpingUpCondition> { }
public class IsNPCJumpingUpCondition : Condition
{
//Component references
private NPC _npcScript;
public override void Awake(StateMachine stateMachine)
{
_npcScript = stateMachine.GetComponent<NPC>();
}
protected override bool Statement()
{
if (_npcScript.npcState == NPCState.JumpUp)
{
return true;
}
else
{
return false;
}
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCJumpingUpSO.cs.meta


fileFormatVersion: 2
guid: 70b5d33c4b4236b4181fe3d04ce9da47
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

14
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingDown.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 301c417603e282742b18e2ccf214676f, type: 3}
m_Name: IsNPCJumpingDown
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingDown.asset.meta


fileFormatVersion: 2
guid: 762a454daf6e8be4397f3eab55d93aa6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

14
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingUp.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70b5d33c4b4236b4181fe3d04ce9da47, type: 3}
m_Name: IsNPCJumpingUp
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/IsNPCJumpingUp.asset.meta


fileFormatVersion: 2
guid: 3094c9e3ec17b014889ac4191094d7dc
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

15
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpDownTimeElapsed.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8139f9f328ed1144690b7a9ffca2d5b4, type: 3}
m_Name: JumpDownTimeElapsed
m_EditorClassIdentifier:
timerLength: 1.2

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpDownTimeElapsed.asset.meta


fileFormatVersion: 2
guid: 58ec7032270477d4bb3338e9f990bc46
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

15
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpUpTimeElapsed.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8139f9f328ed1144690b7a9ffca2d5b4, type: 3}
m_Name: JumpUpTimeElapsed
m_EditorClassIdentifier:
timerLength: 1.5

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/BardHare/Conditions/JumpUpTimeElapsed.asset.meta


fileFormatVersion: 2
guid: 64ce86d12c76d524e88b4d53913134e8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存