GitHub
3 年前
当前提交
b5417125
共有 576 个文件被更改,包括 4567 次插入 和 2111 次删除
-
2UOP1_Project/Assets/AddressableAssetsData/AddressableAssetSettings.asset
-
14UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-AssetTables.asset
-
10UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset
-
7UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-Locales.asset
-
17UOP1_Project/Assets/AddressableAssetsData/AssetGroups/Localization-StringTables.asset
-
142UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef.controller
-
38UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_CaneHit2.fbx.meta
-
7UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Collect.fbx.meta
-
2UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Jump.fbx.meta
-
971UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Walk.fbx
-
13UOP1_Project/Assets/Art/Characters/PlantCritter/Animation/PlantCritter.controller
-
14UOP1_Project/Assets/Art/Characters/SlimeCritter/Animation/Attack.anim
-
2UOP1_Project/Assets/Art/Nature/Flowers.meta
-
114UOP1_Project/Assets/Cutscenes/ExampleCutscene.playable
-
6UOP1_Project/Assets/Inventory/ScriptableObjects/PlayerInventory.asset
-
32UOP1_Project/Assets/Prefabs/Characters/BardHare.prefab
-
618UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
-
761UOP1_Project/Assets/Prefabs/Characters/PlantCritter.prefab
-
164UOP1_Project/Assets/Prefabs/Characters/SlimeCritter_Base.prefab
-
2UOP1_Project/Assets/Prefabs/Effects/DustParticles/LandingParticle.prefab
-
1UOP1_Project/Assets/Prefabs/GameplayEssentials/SceneLoader.prefab
-
41UOP1_Project/Assets/Prefabs/Items/WalkingCane.prefab
-
14UOP1_Project/Assets/Prefabs/Managers/InventoryManager.prefab
-
16UOP1_Project/Assets/Prefabs/Managers/UIManager.prefab
-
2UOP1_Project/Assets/Prefabs/Props/Collectible Item.prefab
-
399UOP1_Project/Assets/Prefabs/UI/DialoguePanel.prefab
-
164UOP1_Project/Assets/Prefabs/UI/Game Screen.prefab
-
5UOP1_Project/Assets/Prefabs/UI/Ingredient Type tab.prefab
-
7UOP1_Project/Assets/Prefabs/UI/IngredientForRecipe.prefab
-
5UOP1_Project/Assets/Prefabs/UI/InteractionItem.prefab
-
16UOP1_Project/Assets/Prefabs/UI/Inventory Item.prefab
-
814UOP1_Project/Assets/Prefabs/UI/InventoryScreen.prefab
-
155UOP1_Project/Assets/Scenes/Examples/CutsceneExample.unity
-
31UOP1_Project/Assets/Scenes/Examples/InteractionExample.unity
-
500UOP1_Project/Assets/Scenes/Gameplay.unity
-
140UOP1_Project/Assets/Scenes/PersistentManagers.unity
-
486UOP1_Project/Assets/Scenes/WIP/TestingGround.unity
-
2UOP1_Project/Assets/Scenes/Whiteboxing/GeneralMapReduced/Materials/WhiteboxingReduced.mat
-
2UOP1_Project/Assets/ScriptableObjects/Events/UI/ChangeTabInventoryUIEvent.asset
-
2UOP1_Project/Assets/ScriptableObjects/Interaction/OnObjectPickup.asset
-
2UOP1_Project/Assets/ScriptableObjects/Interaction/OnObjectPickup.asset.meta
-
2UOP1_Project/Assets/ScriptableObjects/Narrative/Actors/Townsfolk.asset
-
2UOP1_Project/Assets/ScriptableObjects/SceneData.meta
-
2UOP1_Project/Assets/ScriptableObjects/SceneData/Locations.meta
-
2UOP1_Project/Assets/ScriptableObjects/SceneData/Menus.meta
-
21UOP1_Project/Assets/ScriptableObjects/StateMachine/Config/BasicHealth.asset
-
21UOP1_Project/Assets/ScriptableObjects/StateMachine/Config/EliteHealth.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Config/PlayerHealthConfig.asset
-
3UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/Conditions/IsAttackReloaded.asset
-
15UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/PlantCritter/PlantCritter_TransitionTable.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/PlantCritter/States/Killed.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/SlimeRockCritter/Conditions/Timer_SlimeAttackDuration.asset
-
12UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/SlimeRockCritter/SlimeRockCritter_TransitionTable.asset
-
1UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/SlimeRockCritter/States/Idle.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/SlimeRockCritter/States/Killed.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist.meta
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions.meta
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/IsTalking_False_OnExit.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/Rotate.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/PickUpTrigger_OnEnter.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions.meta
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/Timer_AttackAnimation.asset
-
3UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Conditions/IsHoldingAttack.asset
-
54UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/PigChef_TransitionTable.asset
-
2UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States.meta
-
1UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Attack.asset
-
1UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Idle.asset
-
1UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/JumpAscending.asset
-
3UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Walking.asset
-
3UOP1_Project/Assets/Scripts/CameraManager.cs
-
23UOP1_Project/Assets/Scripts/Characters/Attack.cs
-
38UOP1_Project/Assets/Scripts/Characters/Critter.cs
-
49UOP1_Project/Assets/Scripts/Characters/Damageable.cs
-
8UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
-
2UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ClearInputCache_OnEnterSO.cs
-
2UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DropRewardSO.cs
-
2UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ResetGetHitStateSO.cs
-
4UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsAttackReloadedConditionSO.cs
-
2UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsEntityGettingHitSO.cs
-
12UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingAttackActionConditionSO.cs
-
6UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsHoldingExtraActionConditionSO.cs
-
8UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsPickingUpSO.cs
-
6UOP1_Project/Assets/Scripts/Characters/ZoneTriggerController.cs
-
42UOP1_Project/Assets/Scripts/Cutscenes/CutsceneManager.cs
-
9UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs
-
22UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueBehaviour.cs
-
8UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueClip.cs
-
7UOP1_Project/Assets/Scripts/Cutscenes/DialogueControlTrack/DialogueTrack.cs
-
77UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs
-
139UOP1_Project/Assets/Scripts/Dialogues/DialogueManager.cs
-
2UOP1_Project/Assets/Scripts/Effects/DissolveHelper.cs
-
2UOP1_Project/Assets/Scripts/Events/ScriptableObjects/ItemEventChannelSo.cs
-
7UOP1_Project/Assets/Scripts/Events/ScriptableObjects/UI/DialogueLineChannelSO.cs
-
2UOP1_Project/Assets/Scripts/Events/ScriptableObjects/UI/TabEventChannelSo.cs
-
12UOP1_Project/Assets/Scripts/Input/InputReader.cs
-
12UOP1_Project/Assets/Scripts/Interaction/Interaction.cs
-
165UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs
-
2UOP1_Project/Assets/Scripts/Interaction/InteractionManager.cs.meta
-
37UOP1_Project/Assets/Scripts/Inventory/CollectibleItem.cs
-
60UOP1_Project/Assets/Scripts/Inventory/InventoryItemFiller.cs
971
UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef_Walk.fbx
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
814
UOP1_Project/Assets/Prefabs/UI/InventoryScreen.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
486
UOP1_Project/Assets/Scenes/WIP/TestingGround.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using UnityEngine; |
|||
using System; |
|||
using UnityEngine; |
|||
public bool isPlayerInAlertZone { get; set; } |
|||
public bool isPlayerInAttackZone { get; set; } |
|||
[HideInInspector] public bool isPlayerInAlertZone; |
|||
[HideInInspector] public bool isPlayerInAttackZone; |
|||
public Damageable currentTarget; //The StateMachine evaluates its health when needed
|
|||
|
|||
public void OnAlertTriggerChange(bool entered, GameObject who) |
|||
{ |
|||
isPlayerInAlertZone = entered; |
|||
|
|||
if (entered && who.TryGetComponent(out Damageable d)) |
|||
{ |
|||
currentTarget = d; |
|||
currentTarget.OnDie += OnTargetDead; |
|||
} |
|||
else |
|||
{ |
|||
currentTarget = null; |
|||
} |
|||
} |
|||
|
|||
public void OnAttackTriggerChange(bool entered, GameObject who) |
|||
{ |
|||
isPlayerInAttackZone = entered; |
|||
|
|||
//No need to set the target. If we did, we would get currentTarget to null even if
|
|||
//a target exited the Attack zone (inner) but stayed in the Alert zone (outer).
|
|||
} |
|||
|
|||
private void OnTargetDead() |
|||
{ |
|||
currentTarget = null; |
|||
isPlayerInAlertZone = false; |
|||
isPlayerInAttackZone = false; |
|||
} |
|||
} |
|
|||
using UnityEngine; |
|||
using UnityEngine.Localization; |
|||
using UnityEngine.Events; |
|||
[SerializeField] |
|||
private HealthConfigSO _healthConfigSO; |
|||
|
|||
[SerializeField] |
|||
private GetHitEffectConfigSO _getHitEffectSO; |
|||
|
|||
[SerializeField] |
|||
private Renderer _mainMeshRenderer; |
|||
|
|||
[SerializeField] |
|||
private DroppableRewardConfigSO _droppableRewardSO; |
|||
|
|||
[SerializeField] private HealthConfigSO _healthConfigSO; |
|||
[SerializeField] private GetHitEffectConfigSO _getHitEffectSO; |
|||
[SerializeField] private Renderer _mainMeshRenderer; |
|||
[SerializeField] private DroppableRewardConfigSO _droppableRewardSO; |
|||
public bool getHit { get; set; } |
|||
public bool isDead { get; set; } |
|||
public bool GetHit { get; set; } |
|||
public bool IsDead { get; set; } |
|||
public int CurrentHealth => _currentHealth; |
|||
|
|||
public UnityAction OnDie; |
|||
|
|||
private void ReceiveAnAttack(int damange) |
|||
public void ReceiveAnAttack(int damage) |
|||
_currentHealth -= damange; |
|||
getHit = true; |
|||
_currentHealth -= damage; |
|||
GetHit = true; |
|||
isDead = true; |
|||
} |
|||
} |
|||
|
|||
private void OnTriggerEnter(Collider other) |
|||
{ |
|||
// Avoid friendly fire!
|
|||
if (!other.tag.Equals(gameObject.tag)) |
|||
{ |
|||
Attack attack = other.GetComponent<Attack>(); |
|||
if (!getHit && attack != null && attack.Enable) |
|||
{ |
|||
ReceiveAnAttack(attack.AttackConfig.AttackStrength); |
|||
} |
|||
IsDead = true; |
|||
if (OnDie != null) |
|||
OnDie.Invoke(); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections.Generic; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEngine.Localization; |
|||
using UnityEditor.Localization; |
|||
public enum DialogueType |
|||
{ |
|||
startDialogue, |
|||
winDialogue, |
|||
loseDialogue, |
|||
defaultDialogue, |
|||
|
|||
} |
|||
public enum ChoiceActionType |
|||
{ |
|||
doNothing, |
|||
continueWithStep |
|||
|
|||
} |
|||
[CreateAssetMenu(fileName = "newDialogue", menuName = "CutsceneSystem/Dialogue Data")] |
|||
[CreateAssetMenu(fileName = "newDialogue", menuName = "Dialogues/Dialogue Data")] |
|||
public List<DialogueLineSO> dialogueLines; |
|||
|
|||
[SerializeField] private ActorSO _actor = default; |
|||
[SerializeField] private List<LocalizedString> _dialogueLines = default; |
|||
[SerializeField] private List<Choice> _choices = default; |
|||
[SerializeField] private DialogueType _dialogueType = default; |
|||
|
|||
public ActorSO Actor => _actor; |
|||
public List<LocalizedString> DialogueLines => _dialogueLines; |
|||
public List<Choice> Choices => _choices; |
|||
public DialogueType DialogueType => _dialogueType; |
|||
private void OnEnable() |
|||
{ |
|||
SetDialogueLines(); |
|||
} |
|||
void SetDialogueLines() |
|||
{ |
|||
_dialogueLines.Clear(); |
|||
|
|||
StringTableCollection collection = LocalizationEditorSettings.GetStringTableCollection("Questline Dialogue"); |
|||
|
|||
if (collection != null) |
|||
{ |
|||
int index = 0; |
|||
LocalizedString _dialogueLine = null; |
|||
do |
|||
{ |
|||
index++; |
|||
string key = "L" + index + "-" + this.name; |
|||
|
|||
if (collection.SharedData.Contains(key)) |
|||
{ |
|||
_dialogueLine = new LocalizedString() { TableReference = "Questline Dialogue", TableEntryReference = key }; |
|||
_dialogueLines.Add(_dialogueLine); |
|||
} |
|||
else |
|||
{ |
|||
|
|||
_dialogueLine = null; |
|||
} |
|||
|
|||
} while (_dialogueLine != null); |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
[Serializable] |
|||
public class Choice |
|||
{ |
|||
[SerializeField] private LocalizedString _response = default; |
|||
[SerializeField] private DialogueDataSO _nextDialogue = default; |
|||
[SerializeField] private ChoiceActionType _actionType = default; |
|||
public LocalizedString Response => _response; |
|||
public DialogueDataSO NextDialogue => _nextDialogue; |
|||
public ChoiceActionType ActionType => _actionType; |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
[SerializeField] private Item _currentItem; |
|||
[SerializeField] private SpriteRenderer[] _itemImages; |
|||
public Item CurrentItem |
|||
{ |
|||
set => _currentItem = value; |
|||
} |
|||
|
|||
[SerializeField] private Item _currentItem = default; |
|||
[SerializeField] private SpriteRenderer[] _itemImages = default; |
|||
SetItem(); |
|||
if (_itemImages != null) |
|||
SetCubeItem(); |
|||
|
|||
Debug.Log("current item " + _currentItem); |
|||
|
|||
|
|||
public void SetItem(Item item) |
|||
{ |
|||
_currentItem = item; |
|||
// TODO: This function is only for testing
|
|||
public void SetItem() |
|||
} |
|||
//this function is only for testing
|
|||
public void SetCubeItem() |
|||
} |
|||
public void OnTriggerEnter(Collider other) |
|||
{ |
|||
if (other.tag == "Player") |
|||
{ |
|||
if (other.gameObject.TryGetComponent<ItemPicker>(out ItemPicker itemPickerComp)) |
|||
{ |
|||
} |
|||
itemPickerComp.PickItem(_currentItem); |
|||
} |
|||
} |
|||
} |
|||
} |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue