diff --git a/ToyoWorld/Assets/Game/Player/Player.prefab b/ToyoWorld/Assets/Game/Resources/Player.prefab similarity index 99% rename from ToyoWorld/Assets/Game/Player/Player.prefab rename to ToyoWorld/Assets/Game/Resources/Player.prefab index c58acce46..393f87530 100644 --- a/ToyoWorld/Assets/Game/Player/Player.prefab +++ b/ToyoWorld/Assets/Game/Resources/Player.prefab @@ -3770,7 +3770,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7378727750467032339} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 163d7adfbd388ac4eb51c9d4e90d0ee1, type: 3} m_Name: @@ -3780,6 +3780,7 @@ MonoBehaviour: dialogueGUI: {fileID: 0} dialogueBoxGUI: {fileID: 0} character: {fileID: 0} + diaManager: {fileID: 0} letterDelay: 0.1 letterMultiplier: 0.5 DialogueInput: 102 diff --git a/ToyoWorld/Assets/Game/Player/Player.prefab.meta b/ToyoWorld/Assets/Game/Resources/Player.prefab.meta similarity index 100% rename from ToyoWorld/Assets/Game/Player/Player.prefab.meta rename to ToyoWorld/Assets/Game/Resources/Player.prefab.meta diff --git a/ToyoWorld/Assets/Resources/Windows/LoginWindow.prefab b/ToyoWorld/Assets/Resources/Windows/LoginWindow.prefab index 686522857..70e58a57d 100644 --- a/ToyoWorld/Assets/Resources/Windows/LoginWindow.prefab +++ b/ToyoWorld/Assets/Resources/Windows/LoginWindow.prefab @@ -479,7 +479,7 @@ MonoBehaviour: m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine m_IntArgument: 0 m_FloatArgument: 0 - m_StringArgument: MainBattle + m_StringArgument: PlayerScene m_BoolArgument: 0 m_CallState: 2 --- !u!1 &470613945293397725 diff --git a/ToyoWorld/Assets/Scenes/MainBattle.unity b/ToyoWorld/Assets/Scenes/MainBattle.unity index cfea59491..55320a87d 100644 --- a/ToyoWorld/Assets/Scenes/MainBattle.unity +++ b/ToyoWorld/Assets/Scenes/MainBattle.unity @@ -11165,7 +11165,7 @@ AudioSource: OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 8300000, guid: 48f59bfcc6765d043afa327436b3cd01, type: 3} m_PlayOnAwake: 1 - m_Volume: 0 + m_Volume: 0.3 m_Pitch: 1 Loop: 1 Mute: 0 diff --git a/ToyoWorld/Assets/Scenes/PlayerScene.unity b/ToyoWorld/Assets/Scenes/PlayerScene.unity index 7d6beecfb..c2662c012 100644 --- a/ToyoWorld/Assets/Scenes/PlayerScene.unity +++ b/ToyoWorld/Assets/Scenes/PlayerScene.unity @@ -1099,7 +1099,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_BindingMode: 4 - m_FollowOffset: {x: 0, y: 0.8038982, z: -6.959702} + m_FollowOffset: {x: 0, y: 6, z: -3} m_XDamping: 1 m_YDamping: 1 m_ZDamping: 1 @@ -1226,7 +1226,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_BindingMode: 4 - m_FollowOffset: {x: 0, y: 0.8038982, z: -6.959702} + m_FollowOffset: {x: 0, y: 6, z: -3} m_XDamping: 1 m_YDamping: 1 m_ZDamping: 1 @@ -1916,6 +1916,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1413962507} m_Modifications: + - target: {fileID: 1585356682828404593, guid: 4f405a8b39d408543b777537134440bd, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6957890892541525328, guid: 4f405a8b39d408543b777537134440bd, type: 3} propertyPath: m_Name value: ChatBubble @@ -2302,7 +2306,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 688731503} - m_LocalRotation: {x: 0.4834514, y: -0.000000026536691, z: 0.0000000146557255, w: 0.8753712} + m_LocalRotation: {x: 0.48345143, y: 0.000000021300846, z: -0.000000011764065, w: 0.8753712} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -2670,7 +2674,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_BindingMode: 4 - m_FollowOffset: {x: 0, y: 0.8038982, z: -6.959702} + m_FollowOffset: {x: 0, y: 6, z: -3} m_XDamping: 1 m_YDamping: 1 m_ZDamping: 1 @@ -3220,7 +3224,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 837303047} - m_LocalRotation: {x: 0.48345137, y: -0.00000004544638, z: 0.0000000250992, w: 0.8753712} + m_LocalRotation: {x: 0.48345143, y: 0.00000003367959, z: -0.00000001860062, w: 0.8753712} m_LocalPosition: {x: 4.983409, y: 41.924, z: -18.356527} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -3395,13 +3399,14 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 919116554} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 6a627f16cd9a62d4bbe8fcefbdb724d8, type: 3} m_Name: m_EditorClassIdentifier: - dialoguePanel: {fileID: 1913774586629484095, guid: bb9f8adb2b341954693739377a605239, type: 3} - panelText: {fileID: 0} + dialoguePanel: {fileID: 2023583160} + panelText: {fileID: 1291809471} + nameText: {fileID: 2142331186} --- !u!4 &919116556 Transform: m_ObjectHideFlags: 0 @@ -3735,7 +3740,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1016719601} - m_LocalRotation: {x: 0.41313744, y: -0.000000038381813, z: 0.00000001741244, w: 0.91066873} + m_LocalRotation: {x: 0.41313747, y: -0.00000001566935, z: 0.0000000071086173, w: 0.91066873} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -4375,6 +4380,17 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 50d4f5fbddcdbcb47a03cfa3de86b121, type: 3} +--- !u!114 &1291809471 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2871230111851729414, guid: 4f405a8b39d408543b777537134440bd, type: 3} + m_PrefabInstance: {fileID: 552684167} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &1325820252 PrefabInstance: m_ObjectHideFlags: 0 @@ -6096,8 +6112,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1962508989} - m_LocalRotation: {x: 0.3263303, y: 0.000000027539746, z: -0.000000009507537, w: 0.9452558} - m_LocalPosition: {x: 0, y: -0.743412, z: -1.25284} + m_LocalRotation: {x: 0.4422421, y: -0.000000016021092, z: 0.000000007899694, w: 0.89689577} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -6234,6 +6250,11 @@ Transform: m_CorrespondingSourceObject: {fileID: 4013860934539580, guid: 50d4f5fbddcdbcb47a03cfa3de86b121, type: 3} m_PrefabInstance: {fileID: 1196502566} m_PrefabAsset: {fileID: 0} +--- !u!1 &2023583160 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6957890892541525328, guid: 4f405a8b39d408543b777537134440bd, type: 3} + m_PrefabInstance: {fileID: 552684167} + m_PrefabAsset: {fileID: 0} --- !u!4 &2033440094 stripped Transform: m_CorrespondingSourceObject: {fileID: 4000010392036792, guid: 7ae254bddcf0def478298b88c82e882a, type: 3} @@ -11029,6 +11050,7 @@ MonoBehaviour: dialogueGUI: {fileID: 0} dialogueBoxGUI: {fileID: 0} character: {fileID: 0} + diaManager: {fileID: 0} letterDelay: 0.1 letterMultiplier: 0.5 DialogueInput: 102 diff --git a/ToyoWorld/Assets/Scripts/Battle/BattleDialogBox.cs b/ToyoWorld/Assets/Scripts/Battle/BattleDialogBox.cs index 4e5a21b92..0573e3e65 100644 --- a/ToyoWorld/Assets/Scripts/Battle/BattleDialogBox.cs +++ b/ToyoWorld/Assets/Scripts/Battle/BattleDialogBox.cs @@ -104,6 +104,7 @@ private void SetCurrentAction() public void SetMoveNames(List moves) { + Debug.Log("Setting moves"); for(int i = 0; i < moveTexts.Count; i++) { if(i < moves.Count) diff --git a/ToyoWorld/Assets/Scripts/Battle/BattleSystem.cs b/ToyoWorld/Assets/Scripts/Battle/BattleSystem.cs index f98a1abf0..6be386d0b 100644 --- a/ToyoWorld/Assets/Scripts/Battle/BattleSystem.cs +++ b/ToyoWorld/Assets/Scripts/Battle/BattleSystem.cs @@ -69,6 +69,7 @@ public void Update() public IEnumerator SetupBattle() { + playerUnit.Setup(playerParty.GetHealthyToyo()); playerHUD.SetData(playerUnit.Toyo); diff --git a/ToyoWorld/Assets/Scripts/DialogueManager.cs b/ToyoWorld/Assets/Scripts/DialogueManager.cs index 371d95cac..18ae73eca 100644 --- a/ToyoWorld/Assets/Scripts/DialogueManager.cs +++ b/ToyoWorld/Assets/Scripts/DialogueManager.cs @@ -7,6 +7,8 @@ public class DialogueManager : MonoBehaviour { [SerializeField] public GameObject dialoguePanel; [SerializeField] public TextMeshProUGUI panelText; + [SerializeField] public TextMeshProUGUI nameText; + // Start is called before the first frame update void Start() diff --git a/ToyoWorld/Assets/Scripts/DialogueSystem.cs b/ToyoWorld/Assets/Scripts/DialogueSystem.cs index ee3610626..ffdb0e5be 100644 --- a/ToyoWorld/Assets/Scripts/DialogueSystem.cs +++ b/ToyoWorld/Assets/Scripts/DialogueSystem.cs @@ -14,6 +14,8 @@ public class DialogueSystem : MonoBehaviour public Transform dialogueBoxGUI; public NPC character; + public DialogueManager diaManager; + public float letterDelay = 0.1f; public float letterMultiplier = 0.5f; @@ -39,11 +41,25 @@ void Start() dialogueText.text = ""; } + void Awake() + { + SetDialogueRefs(); + } + void Update() { } + void SetDialogueRefs() + { + diaManager = FindAnyObjectByType(); + nameText = diaManager.nameText; + dialogueText = diaManager.panelText; + dialogueGUI = diaManager.dialoguePanel; + dialogueBoxGUI = diaManager.dialoguePanel.transform; + } + public void NPCName() { outOfRange = false; diff --git a/ToyoWorld/Assets/Scripts/NPC.cs b/ToyoWorld/Assets/Scripts/NPC.cs index 7b5a85105..347feaa86 100644 --- a/ToyoWorld/Assets/Scripts/NPC.cs +++ b/ToyoWorld/Assets/Scripts/NPC.cs @@ -26,10 +26,14 @@ void Start() void Update() { - //Vector3 npcPos = gameObject.transform.position; - //Vector3 delta = new Vector3(playerPos.position.x - npcPos.x, 0.0f, playerPos.position.z - npcPos.z); - //Quaternion rotation = Quaternion.LookRotation(delta); - //gameObject.transform.rotation = rotation; + if(playerPos == null) + { + playerPos = FindObjectOfType().transform; + } + Vector3 npcPos = gameObject.transform.position; + Vector3 delta = new Vector3(playerPos.position.x - npcPos.x, 0.0f, playerPos.position.z - npcPos.z); + Quaternion rotation = Quaternion.LookRotation(delta); + gameObject.transform.rotation = rotation; } public void OnTriggerStay(Collider other) diff --git a/ToyoWorld/Assets/Scripts/Toyos/Toyo.cs b/ToyoWorld/Assets/Scripts/Toyos/Toyo.cs index 9a4c89af3..25c6cd7a1 100644 --- a/ToyoWorld/Assets/Scripts/Toyos/Toyo.cs +++ b/ToyoWorld/Assets/Scripts/Toyos/Toyo.cs @@ -42,6 +42,16 @@ public void Init() } } + /* + public void FullRestore() + { + HP = MaxHP; + foreach(var move in Moves) + { + move.PP = move.Base.Pp; + } + }*/ + public int Attack { get { return Mathf.FloorToInt((Base.Attack * Level) / 100f) + 5; } diff --git a/ToyoWorld/ProjectSettings/EditorBuildSettings.asset b/ToyoWorld/ProjectSettings/EditorBuildSettings.asset index 995134eb3..59a6f707e 100644 --- a/ToyoWorld/ProjectSettings/EditorBuildSettings.asset +++ b/ToyoWorld/ProjectSettings/EditorBuildSettings.asset @@ -8,6 +8,9 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/MainScene.unity guid: 9fc0d4010bbf28b4594072e72b8655ab + - enabled: 1 + path: Assets/Scenes/PlayerScene.unity + guid: bf9ed643a8b9d9d45b3f8a2ac95fb431 - enabled: 1 path: Assets/Scenes/MainBattle.unity guid: 2cda34965e592d243bfd3d7913a37901 diff --git a/ToyoWorld/ProjectSettings/QualitySettings.asset b/ToyoWorld/ProjectSettings/QualitySettings.asset index b38e404e4..cf34a4cab 100644 --- a/ToyoWorld/ProjectSettings/QualitySettings.asset +++ b/ToyoWorld/ProjectSettings/QualitySettings.asset @@ -229,6 +229,7 @@ QualitySettings: Nintendo Switch: 5 PS4: 5 PSP2: 2 + Server: 0 Stadia: 5 Standalone: 5 WebGL: 3