Ciro Continisio
3 年前
当前提交
27ebfa55
共有 10 个文件被更改,包括 113 次插入 和 155 次删除
-
5UOP1_Project/Assets/Scripts/Cutscenes/CutsceneSceneLoader.cs
-
15UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs
-
14UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
-
44UOP1_Project/Assets/Scripts/Gameplay/GameManager.cs
-
5UOP1_Project/Assets/Scripts/Gameplay/GameStateSO.cs
-
77UOP1_Project/Assets/Scripts/Quests/QuestManagerSO.cs
-
50UOP1_Project/Assets/Scripts/UI/UICreditsRoller.cs
-
22UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsInSpecificGameStateSO.cs
-
36UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsInParticualGameStateSO.cs
-
0/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsInSpecificGameStateSO.cs.meta
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
|
|||
//Used to load a location from a custscene
|
|||
//Used to load a location or menu from a cutscene
|
|||
public void LoadScene() |
|||
{ |
|||
_sceneLoadChannel.RaiseEvent(_sceneToLoad, false, true); |
|
|||
using UnityEngine; |
|||
using UOP1.StateMachine; |
|||
using UOP1.StateMachine.ScriptableObjects; |
|||
|
|||
[CreateAssetMenu(menuName = "State Machines/Conditions/Is In Particular GameState")] |
|||
public class IsInSpecificGameStateSO : StateConditionSO<IsInSpecificGameStateCondition> |
|||
{ |
|||
[UnityEngine.Serialization.FormerlySerializedAs("_currentGameState")] public GameState gameStateToCheck; |
|||
[UnityEngine.Serialization.FormerlySerializedAs("gameStateManager")] public GameStateSO gameStateSO; |
|||
|
|||
protected override Condition CreateCondition() => new IsInSpecificGameStateCondition(); |
|||
} |
|||
|
|||
public class IsInSpecificGameStateCondition : Condition |
|||
{ |
|||
private IsInSpecificGameStateSO _originSO => (IsInSpecificGameStateSO)base.OriginSO; // The SO this Condition spawned from
|
|||
|
|||
protected override bool Statement() |
|||
{ |
|||
return _originSO.gameStateToCheck == _originSO.gameStateSO.CurrentGameState; |
|||
} |
|||
} |
|
|||
using UnityEngine; |
|||
using UOP1.StateMachine; |
|||
using UOP1.StateMachine.ScriptableObjects; |
|||
|
|||
[CreateAssetMenu(menuName = "State Machines/Conditions/Is In Particular GameState")] |
|||
public class IsInParticualGameStateSO : StateConditionSO<IsInParticualGameStateCondition> |
|||
{ |
|||
public GameState _currentGameState; |
|||
public GameStateSO _gameStateManager; |
|||
|
|||
protected override Condition CreateCondition() => new IsInParticualGameStateCondition(); |
|||
} |
|||
|
|||
public class IsInParticualGameStateCondition : Condition |
|||
{ |
|||
private IsInParticualGameStateSO _originSO => (IsInParticualGameStateSO)base.OriginSO; // The SO this Condition spawned from
|
|||
|
|||
public override void Awake(StateMachine stateMachine) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override bool Statement() |
|||
{ |
|||
return _originSO._currentGameState == _originSO._gameStateManager.CurrentGameState; |
|||
} |
|||
|
|||
private void EventReceived() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public override void OnStateExit() |
|||
{ |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue