Skip to content

Commit ae2f475

Browse files
fixing loading screen; testing online image sources; remove savegame from old JSON version; cleanup pt3
1 parent 7043164 commit ae2f475

File tree

247 files changed

+16372
-7488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+16372
-7488
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"AspectRatio": "16:9",
3-
"VideoSourceType": "INTERNAL",
3+
"VideoSourceType": "ONLINE",
44
"ImageSourceType": "INTERNAL",
55
"LocalFilePath": "C:\\Data\\UnityProjects\\FmvMakerFiles\\"
66
}

Assets/FmvMaker/Scenes/CircleFmv.unity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ MonoBehaviour:
352352
m_Script: {fileID: 11500000, guid: e7d63537cad47a3499e1c4ff3a386b10, type: 3}
353353
m_Name:
354354
m_EditorClassIdentifier:
355+
loadDebugData: 1
355356
videoModelData: {fileID: 4900000, guid: ddc9a741957565f4abad98b63e6ce320, type: 3}
356357
clickableModelData: {fileID: 4900000, guid: 07d218926a1846b4c9cabfcf2a981c10, type: 3}
357358
onlineVideoSourceMappingData: {fileID: 4900000, guid: fb5e19b8cc5eb6a4db068565a0ad4927,
358359
type: 3}
359-
saveGameData: {fileID: 0}
360360
--- !u!1 &736910559
361361
GameObject:
362362
m_ObjectHideFlags: 0

Assets/FmvMaker/Scenes/DialogFmv.unity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ MonoBehaviour:
352352
m_Script: {fileID: 11500000, guid: e7d63537cad47a3499e1c4ff3a386b10, type: 3}
353353
m_Name:
354354
m_EditorClassIdentifier:
355+
loadDebugData: 1
355356
videoModelData: {fileID: 4900000, guid: 5cfcbc7340e76584e9629f8bac576a40, type: 3}
356357
clickableModelData: {fileID: 4900000, guid: 089dfb8dced05fd4c8f843f43d00d8cd, type: 3}
357358
onlineVideoSourceMappingData: {fileID: 4900000, guid: 0d14c44b8f85d9644a7acd8ff9829ef0,
358359
type: 3}
359-
saveGameData: {fileID: 0}
360360
--- !u!1 &736910559
361361
GameObject:
362362
m_ObjectHideFlags: 0

Assets/FmvMaker/Scenes/GraphCircleFmv.unity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ MonoBehaviour:
170170
m_Script: {fileID: 11500000, guid: e7d63537cad47a3499e1c4ff3a386b10, type: 3}
171171
m_Name:
172172
m_EditorClassIdentifier:
173-
loadDebugData: 1
173+
loadDebugData: 0
174174
videoModelData: {fileID: 0}
175175
clickableModelData: {fileID: 0}
176176
onlineVideoSourceMappingData: {fileID: 4900000, guid: fb5e19b8cc5eb6a4db068565a0ad4927,

Assets/FmvMaker/Scenes/GraphDialogFmv.unity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ MonoBehaviour:
170170
m_Script: {fileID: 11500000, guid: e7d63537cad47a3499e1c4ff3a386b10, type: 3}
171171
m_Name:
172172
m_EditorClassIdentifier:
173-
loadDebugData: 1
173+
loadDebugData: 0
174174
videoModelData: {fileID: 0}
175175
clickableModelData: {fileID: 0}
176176
onlineVideoSourceMappingData: {fileID: 4900000, guid: fb5e19b8cc5eb6a4db068565a0ad4927,

Assets/FmvMaker/Scripts/Core/Provider/FmvData.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,12 @@ private void Awake() {
3030
videoModelData = Resources.Load<TextAsset>("DemoVideoData");
3131
clickableModelData = Resources.Load<TextAsset>("DemoClickableData");
3232
}
33-
if (loadDebugData) {
33+
if (!loadDebugData) {
3434
LoadGameDataFromLocalFile();
3535
}
3636
}
3737

38-
public void ExportVideoData() {
39-
//ExportGameDatatoLocalFile();
40-
}
41-
42-
public void ExportGraphVideoData() {
38+
public void ExportGraphGameData() {
4339
ExportGraphGameDatatoLocalFile();
4440
}
4541

Assets/FmvMaker/Scripts/Core/Provider/FmvVideos.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public class FmvVideos : MonoBehaviour {
2020
[SerializeField]
2121
private KeyCode PauseVideoKey = KeyCode.P;
2222
[SerializeField]
23-
private KeyCode SaveGameKey = KeyCode.S;
24-
[SerializeField]
2523
private KeyCode QuitGameKey = KeyCode.Q;
2624
[SerializeField]
2725
private KeyCode ShowAllAvailableClickablesKey = KeyCode.Space;
@@ -77,7 +75,6 @@ private async void Start() {
7775
private void Update() {
7876
SkipVideo();
7977
PauseVideo();
80-
SaveGame();
8178
QuitGame();
8279
ToggleAllAvailableClickables();
8380
}
@@ -204,12 +201,6 @@ private void PauseVideo() {
204201
}
205202
}
206203

207-
private void SaveGame() {
208-
if (Input.GetKeyUp(SaveGameKey)) {
209-
data.ExportVideoData();
210-
}
211-
}
212-
213204
private void QuitGame() {
214205
if (Input.GetKeyUp(QuitGameKey)) {
215206
Application.Quit();

Assets/FmvMaker/Scripts/Graph/Nodes/FmvExitState.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ public class FmvExitState : Unit {
1515
private FmvGraphVideos fmvGraphVideos;
1616

1717
private GameObject fmvVideoElementsPanel;
18-
private GameObject inputValueVideoView;
1918

2019
protected override void Definition() {
2120
InputTrigger = ControlInput(nameof(InputTrigger), CleanUpStateData);
@@ -26,7 +25,6 @@ protected override void Definition() {
2625

2726
private ControlOutput CleanUpStateData(Flow flow) {
2827
GetSceneVariables();
29-
GetGraphVideosObject();
3028
DestroyGameObjectsExceptInventory();
3129
RemoveClickListeners();
3230

@@ -35,13 +33,7 @@ private ControlOutput CleanUpStateData(Flow flow) {
3533

3634
private void GetSceneVariables() {
3735
fmvVideoElementsPanel = FmvSceneVariables.VideoElementsPanel;
38-
inputValueVideoView = FmvSceneVariables.VideoView;
39-
}
40-
41-
private void GetGraphVideosObject() {
42-
if (inputValueVideoView) {
43-
fmvGraphVideos = inputValueVideoView.GetComponent<FmvGraphVideos>();
44-
}
36+
fmvGraphVideos = FmvSceneVariables.VideoView.GetComponent<FmvGraphVideos>();
4537
}
4638

4739
private void DestroyGameObjectsExceptInventory() {

Assets/FmvMaker/Scripts/Graph/Provider/FmvGraphVideos.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public class FmvGraphVideos : MonoBehaviour {
2626
[SerializeField]
2727
private KeyCode ShowAllAvailableClickablesKey = KeyCode.Space;
2828

29+
[Header("Settings")]
30+
[SerializeField]
31+
private bool useLoadingScreen = true;
32+
2933
[Header("Internal references")]
3034
[SerializeField]
3135
private FmvVideoView videoView = null;
@@ -34,8 +38,6 @@ public class FmvGraphVideos : MonoBehaviour {
3438
[SerializeField]
3539
private GameObject loadingSceen = null;
3640

37-
private bool alreadyLoaded = false;
38-
private bool useLoadingSceen = false;
3941
private bool isCurrentlyPaused = false;
4042

4143
private VideoModel currentVideoElement;
@@ -88,29 +90,26 @@ private void DisposeVideoEventTrigger() {
8890

8991
private void StopLoadingScreen(VideoModel video) {
9092
loadingSceen.SetActive(false);
91-
alreadyLoaded = false;
9293
}
9394

9495
private void ConfigureLoadingScreen() {
9596
loadingSceen.SetActive(false);
9697

97-
if (LoadFmvConfig.Config.VideoSourceType != "INTERNAL") {
98-
useLoadingSceen = true;
98+
if (LoadFmvConfig.Config.VideoSourceType != "INTERNAL" && useLoadingScreen) {
9999
loadingSceen.SetActive(true);
100-
OnVideoStarted.AddListener(StopLoadingScreen);
101-
StartLoadingScreen();
102100
}
103101
}
104102

105103
private void StartLoadingScreen() {
106-
if (useLoadingSceen && !alreadyLoaded) {
104+
if (useLoadingScreen) {
107105
loadingSceen.SetActive(true);
108-
alreadyLoaded = true;
109106
}
110107
}
111108

112109
public void PlayVideo(VideoModel video) {
113110
currentVideoElement = video;
111+
OnVideoStarted.AddListener(StopLoadingScreen);
112+
StartLoadingScreen();
114113
videoView.PrepareAndPlay(video);
115114
}
116115

@@ -144,7 +143,7 @@ private void ResumeVideo() {
144143

145144
private void SaveGame() {
146145
if (Input.GetKeyUp(SaveGameKey)) {
147-
data.ExportGraphVideoData();
146+
data.ExportGraphGameData();
148147
}
149148
}
150149

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
using UnityEngine;
22
using UnityEngine.EventSystems;
33

4-
public class CustomMouseCursor : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler {
4+
namespace FmvMaker.Utilities {
5+
public class CustomMouseCursor : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler {
56

6-
[SerializeField]
7-
private Texture2D cursorTexture;
7+
[SerializeField]
8+
private Texture2D cursorTexture;
89

9-
public void OnPointerClick(PointerEventData eventData) {
10-
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
11-
}
10+
public void OnPointerClick(PointerEventData eventData) {
11+
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
12+
}
1213

13-
public void OnPointerEnter(PointerEventData eventData) {
14-
Cursor.SetCursor(cursorTexture, Vector2.zero, CursorMode.Auto);
15-
}
14+
public void OnPointerEnter(PointerEventData eventData) {
15+
Cursor.SetCursor(cursorTexture, Vector2.zero, CursorMode.Auto);
16+
}
1617

17-
public void OnPointerExit(PointerEventData eventData) {
18-
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
18+
public void OnPointerExit(PointerEventData eventData) {
19+
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
20+
}
1921
}
20-
}
22+
}

0 commit comments

Comments
 (0)