浏览代码

Merge remote-tracking branch '_tech-mkt/main' into main

/UI
Ciro Continisio 4 年前
当前提交
38827f46
共有 7 个文件被更改,包括 68 次插入1 次删除
  1. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Idle.asset
  2. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Walking.asset
  3. 2
      UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs
  4. 14
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ClearInputCache_OnEnter.asset
  5. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ClearInputCache_OnEnter.asset.meta
  6. 32
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs
  7. 11
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs.meta

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Idle.asset


- {fileID: 11400000, guid: bcf4edc006209d54da9cd4c18329bb43, type: 2}
- {fileID: 11400000, guid: bd85c54d16eb60c4c99504f1679af851, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2}

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Walking.asset


- {fileID: 11400000, guid: fa0ce5b895dcf17499819f0d6f2dce96, type: 2}
- {fileID: 11400000, guid: 5aac41c53e47f1040a52303b2000ceb5, type: 2}
- {fileID: 11400000, guid: 74800142628360a42bb516b1e5c630e1, type: 2}
- {fileID: 11400000, guid: 23e8862a3aca1b6439bda3bf27d03897, type: 2}

2
UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs


using UnityEngine;
using UnityEngine;
public enum InteractionType { None = 0, PickUp, Cook, Talk };

14
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ClearInputCache_OnEnter.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: f766c9f4e1f285f4ca8b67a035c3df70, type: 3}
m_Name: ClearInputCache_OnEnter
m_EditorClassIdentifier:

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ClearInputCache_OnEnter.asset.meta


fileFormatVersion: 2
guid: 23e8862a3aca1b6439bda3bf27d03897
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

32
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs


using UnityEngine;
using UOP1.StateMachine;
using UOP1.StateMachine.ScriptableObjects;
[CreateAssetMenu(fileName = "ClearInputCache_OnEnter", menuName = "State Machines/Actions/Clear Input Cache On Enter")]
public class ClearInputCache_OnEnterSO : StateActionSO
{
protected override StateAction CreateAction() => new ClearInputCache_OnEnter();
}
public class ClearInputCache_OnEnter : StateAction
{
private Protagonist _protagonist;
private InteractionManager _interactionManager;
public override void Awake(StateMachine stateMachine)
{
_protagonist = stateMachine.GetComponent<Protagonist>();
_interactionManager = stateMachine.GetComponentInChildren<InteractionManager>();
}
public override void OnUpdate()
{
}
public override void OnStateEnter()
{
_protagonist.jumpInput = false;
_protagonist.attackInput = false;
_interactionManager.currentInteraction = InteractionType.None;
}
}

11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs.meta


fileFormatVersion: 2
guid: f766c9f4e1f285f4ca8b67a035c3df70
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存