From 627e167f886fc4c31e2cdf837f0483f5daab478d Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 13 Sep 2016 16:28:08 +0100 Subject: [PATCH 01/32] Moved all scripts into a unified script folder (except Flowchart yet) --- Assets/Fungus/Animation.meta | 5 - Assets/Fungus/Animation/Scripts.meta | 5 - Assets/Fungus/Animation/Scripts/Commands.meta | 5 - Assets/Fungus/Audio/Editor.meta | 5 - Assets/Fungus/Audio/Scripts.meta | 5 - Assets/Fungus/Audio/Scripts/Commands.meta | 5 - Assets/Fungus/Camera/Editor.meta | 5 - Assets/Fungus/Camera/Scripts.meta | 5 - Assets/Fungus/Camera/Scripts/Commands.meta | 5 - Assets/Fungus/Lua/Scripts.meta | 9 -- Assets/Fungus/Lua/Scripts/LuaExtensions.cs | 101 ------------------ .../Fungus/Lua/Scripts/LuaExtensions.cs.meta | 12 --- Assets/Fungus/Narrative/Editor.meta | 5 - Assets/Fungus/Narrative/Scripts.meta | 5 - Assets/Fungus/Narrative/Scripts/Commands.meta | 5 - .../Fungus/Narrative/Scripts/Interfaces.meta | 9 -- Assets/Fungus/{UI => }/Scripts.meta | 4 +- Assets/Fungus/{Lua => }/Scripts/Commands.meta | 4 +- .../Scripts/Commands/ClearMenu.cs | 0 .../Scripts/Commands/ClearMenu.cs.meta | 0 .../Scripts/Commands/ControlAudio.cs | 0 .../Scripts/Commands/ControlAudio.cs.meta | 0 .../Scripts/Commands/ControlStage.cs | 0 .../Scripts/Commands/ControlStage.cs.meta | 0 .../Scripts/Commands/ControlWithDisplay.cs | 0 .../Commands/ControlWithDisplay.cs.meta | 0 .../Scripts/Commands/Conversation.cs | 0 .../Scripts/Commands/Conversation.cs.meta | 0 .../{Lua => }/Scripts/Commands/ExecuteLua.cs | 0 .../Scripts/Commands/ExecuteLua.cs.meta | 0 .../Scripts/Commands/FadeScreen.cs | 0 .../Scripts/Commands/FadeScreen.cs.meta | 0 .../Scripts/Commands/FadeSprite.cs | 0 .../Scripts/Commands/FadeSprite.cs.meta | 0 .../Scripts/Commands/FadeToView.cs | 0 .../Scripts/Commands/FadeToView.cs.meta | 0 .../{UI => }/Scripts/Commands/FadeUI.cs | 0 .../{UI => }/Scripts/Commands/FadeUI.cs.meta | 0 .../Scripts/Commands/Fullscreen.cs | 0 .../Scripts/Commands/Fullscreen.cs.meta | 0 .../{UI => }/Scripts/Commands/GetText.cs | 0 .../{UI => }/Scripts/Commands/GetText.cs.meta | 0 .../{iTween => }/Scripts/Commands/LookFrom.cs | 0 .../Scripts/Commands/LookFrom.cs.meta | 0 .../{iTween => }/Scripts/Commands/LookTo.cs | 0 .../Scripts/Commands/LookTo.cs.meta | 0 .../{Narrative => }/Scripts/Commands/Menu.cs | 0 .../Scripts/Commands/Menu.cs.meta | 0 .../Scripts/Commands/MenuTimer.cs | 0 .../Scripts/Commands/MenuTimer.cs.meta | 0 .../{iTween => }/Scripts/Commands/MoveAdd.cs | 0 .../Scripts/Commands/MoveAdd.cs.meta | 0 .../{iTween => }/Scripts/Commands/MoveFrom.cs | 0 .../Scripts/Commands/MoveFrom.cs.meta | 0 .../{iTween => }/Scripts/Commands/MoveTo.cs | 0 .../Scripts/Commands/MoveTo.cs.meta | 0 .../Scripts/Commands/MoveToView.cs | 0 .../Scripts/Commands/MoveToView.cs.meta | 0 .../Scripts/Commands/PlayAnimState.cs | 0 .../Scripts/Commands/PlayAnimState.cs.meta | 0 .../{Audio => }/Scripts/Commands/PlayMusic.cs | 0 .../Scripts/Commands/PlayMusic.cs.meta | 0 .../{Audio => }/Scripts/Commands/PlaySound.cs | 0 .../Scripts/Commands/PlaySound.cs.meta | 0 .../Scripts/Commands/PlayUsfxrSound.cs | 0 .../Scripts/Commands/PlayUsfxrSound.cs.meta | 0 .../Scripts/Commands/Portrait.cs | 0 .../Scripts/Commands/Portrait.cs.meta | 0 .../Scripts/Commands/PunchPosition.cs | 0 .../Scripts/Commands/PunchPosition.cs.meta | 0 .../Scripts/Commands/PunchRotation.cs | 0 .../Scripts/Commands/PunchRotation.cs.meta | 0 .../Scripts/Commands/PunchScale.cs | 0 .../Scripts/Commands/PunchScale.cs.meta | 0 .../Scripts/Commands/ResetAnimTrigger.cs | 0 .../Scripts/Commands/ResetAnimTrigger.cs.meta | 0 .../Scripts/Commands/RotateAdd.cs | 0 .../Scripts/Commands/RotateAdd.cs.meta | 0 .../Scripts/Commands/RotateFrom.cs | 0 .../Scripts/Commands/RotateFrom.cs.meta | 0 .../{iTween => }/Scripts/Commands/RotateTo.cs | 0 .../Scripts/Commands/RotateTo.cs.meta | 0 .../{Narrative => }/Scripts/Commands/Say.cs | 0 .../Scripts/Commands/Say.cs.meta | 0 .../{iTween => }/Scripts/Commands/ScaleAdd.cs | 0 .../Scripts/Commands/ScaleAdd.cs.meta | 0 .../Scripts/Commands/ScaleFrom.cs | 0 .../Scripts/Commands/ScaleFrom.cs.meta | 0 .../{iTween => }/Scripts/Commands/ScaleTo.cs | 0 .../Scripts/Commands/ScaleTo.cs.meta | 0 .../Scripts/Commands/SetAnimBool.cs | 0 .../Scripts/Commands/SetAnimBool.cs.meta | 0 .../Scripts/Commands/SetAnimFloat.cs | 0 .../Scripts/Commands/SetAnimFloat.cs.meta | 0 .../Scripts/Commands/SetAnimInteger.cs | 0 .../Scripts/Commands/SetAnimInteger.cs.meta | 0 .../Scripts/Commands/SetAnimTrigger.cs | 0 .../Scripts/Commands/SetAnimTrigger.cs.meta | 0 .../Scripts/Commands/SetAudioPitch.cs | 0 .../Scripts/Commands/SetAudioPitch.cs.meta | 0 .../Scripts/Commands/SetAudioVolume.cs | 0 .../Scripts/Commands/SetAudioVolume.cs.meta | 0 .../Scripts/Commands/SetClickable2D.cs | 0 .../Scripts/Commands/SetClickable2D.cs.meta | 0 .../Scripts/Commands/SetCollider.cs | 0 .../Scripts/Commands/SetCollider.cs.meta | 0 .../Scripts/Commands/SetDraggable2D.cs | 0 .../Scripts/Commands/SetDraggable2D.cs.meta | 0 .../Scripts/Commands/SetInteractable.cs | 0 .../Scripts/Commands/SetInteractable.cs.meta | 0 .../Scripts/Commands/SetLanguage.cs | 0 .../Scripts/Commands/SetLanguage.cs.meta | 0 .../Scripts/Commands/SetLayerOrder.cs | 0 .../Scripts/Commands/SetLayerOrder.cs.meta | 0 .../Scripts/Commands/SetMenuDialog.cs | 0 .../Scripts/Commands/SetMenuDialog.cs.meta | 0 .../Scripts/Commands/SetMouseCursor.cs | 0 .../Scripts/Commands/SetMouseCursor.cs.meta | 0 .../Scripts/Commands/SetSayDialog.cs | 0 .../Scripts/Commands/SetSayDialog.cs.meta | 0 .../Scripts/Commands/SetSliderValue.cs | 0 .../Scripts/Commands/SetSliderValue.cs.meta | 0 .../Scripts/Commands/SetSpriteOrder.cs | 0 .../Scripts/Commands/SetSpriteOrder.cs.meta | 0 .../{UI => }/Scripts/Commands/SetText.cs | 0 .../{UI => }/Scripts/Commands/SetText.cs.meta | 0 .../Scripts/Commands/ShakeCamera.cs | 0 .../Scripts/Commands/ShakeCamera.cs.meta | 0 .../Scripts/Commands/ShakePosition.cs | 0 .../Scripts/Commands/ShakePosition.cs.meta | 0 .../Scripts/Commands/ShakeRotation.cs | 0 .../Scripts/Commands/ShakeRotation.cs.meta | 0 .../Scripts/Commands/ShakeScale.cs | 0 .../Scripts/Commands/ShakeScale.cs.meta | 0 .../Scripts/Commands/ShowSprite.cs | 0 .../Scripts/Commands/ShowSprite.cs.meta | 0 .../Scripts/Commands/StartSwipe.cs | 0 .../Scripts/Commands/StartSwipe.cs.meta | 0 .../{Audio => }/Scripts/Commands/StopMusic.cs | 0 .../Scripts/Commands/StopMusic.cs.meta | 0 .../Scripts/Commands/StopSwipe.cs | 0 .../Scripts/Commands/StopSwipe.cs.meta | 0 .../Scripts/Commands/StopTween.cs | 0 .../Scripts/Commands/StopTween.cs.meta | 0 .../Scripts/Commands/StopTweens.cs | 0 .../Scripts/Commands/StopTweens.cs.meta | 0 .../{UI => }/Scripts/Commands/TweenUI.cs | 0 .../{UI => }/Scripts/Commands/TweenUI.cs.meta | 0 .../Fungus/{UI => }/Scripts/Commands/Write.cs | 0 .../{UI => }/Scripts/Commands/Write.cs.meta | 0 .../Scripts/Commands/iTweenCommand.cs | 0 .../Scripts/Commands/iTweenCommand.cs.meta | 0 .../Components.meta} | 4 +- .../Components}/CameraController.cs | 0 .../Components}/CameraController.cs.meta | 0 .../Components}/Character.cs | 0 .../Components}/Character.cs.meta | 0 .../Components}/Clickable2D.cs | 0 .../Components}/Clickable2D.cs.meta | 0 .../Components}/CustomTag.cs | 0 .../Components}/CustomTag.cs.meta | 0 .../Components}/DialogInput.cs | 0 .../Components}/DialogInput.cs.meta | 0 .../Components}/Draggable2D.cs | 0 .../Components}/Draggable2D.cs.meta | 0 .../Components}/Localization.cs | 0 .../Components}/Localization.cs.meta | 0 .../Components}/MenuDialog.cs | 0 .../Components}/MenuDialog.cs.meta | 0 .../Components}/MusicController.cs | 0 .../Components}/MusicController.cs.meta | 0 .../Components}/Parallax.cs | 0 .../Components}/Parallax.cs.meta | 0 .../Components}/PortraitController.cs | 0 .../Components}/PortraitController.cs.meta | 0 .../Components}/SayDialog.cs | 0 .../Components}/SayDialog.cs.meta | 0 .../Components}/SelectOnEnable.cs | 0 .../Components}/SelectOnEnable.cs.meta | 0 .../Components}/SpriteFader.cs | 0 .../Components}/SpriteFader.cs.meta | 0 .../Scripts => Scripts/Components}/Stage.cs | 0 .../Components}/Stage.cs.meta | 0 .../Scripts => Scripts/Components}/View.cs | 0 .../Components}/View.cs.meta | 0 .../Scripts => Scripts/Components}/Writer.cs | 0 .../Components}/Writer.cs.meta | 0 .../Components}/WriterAudio.cs | 0 .../Components}/WriterAudio.cs.meta | 0 Assets/Fungus/{UI => Scripts}/Editor.meta | 4 +- .../Editor/CameraMenuItems.cs | 0 .../Editor/CameraMenuItems.cs.meta | 0 .../Editor/CharacterEditor.cs | 0 .../Editor/CharacterEditor.cs.meta | 0 .../Editor/ControlAudioEditor.cs | 0 .../Editor/ControlAudioEditor.cs.meta | 0 .../Editor/DialogInputEditor.cs | 0 .../Editor/DialogInputEditor.cs.meta | 0 .../Editor/LocalizationEditor.cs | 0 .../Editor/LocalizationEditor.cs.meta | 0 .../Editor/MenuEditor.cs | 0 .../Editor/MenuEditor.cs.meta | 0 .../Editor/MenuTimerEditor.cs | 0 .../Editor/MenuTimerEditor.cs.meta | 0 .../Editor/NarrativeMenuItems.cs | 0 .../Editor/NarrativeMenuItems.cs.meta | 0 .../Editor/PortraitEditor.cs | 0 .../Editor/PortraitEditor.cs.meta | 0 .../Editor/SayEditor.cs | 0 .../Editor/SayEditor.cs.meta | 0 .../Editor/SetColliderEditor.cs | 0 .../Editor/SetColliderEditor.cs.meta | 0 .../Editor/SpriteMenuItems.cs | 0 .../Editor/SpriteMenuItems.cs.meta | 0 .../Editor/StageEditor.cs | 0 .../Editor/StageEditor.cs.meta | 0 .../{Camera => Scripts}/Editor/ViewEditor.cs | 0 .../Editor/ViewEditor.cs.meta | 0 .../{UI => Scripts}/Editor/WriteEditor.cs | 0 .../Editor/WriteEditor.cs.meta | 0 .../Editor/WriterAudioEditor.cs | 0 .../Editor/WriterAudioEditor.cs.meta | 0 .../{UI => }/Scripts/EventHandlers.meta | 4 +- .../Scripts/EventHandlers/ButtonClicked.cs | 0 .../EventHandlers/ButtonClicked.cs.meta | 0 .../Scripts/EventHandlers/DragCancelled.cs | 0 .../EventHandlers/DragCancelled.cs.meta | 0 .../Scripts/EventHandlers/DragCompleted.cs | 0 .../EventHandlers/DragCompleted.cs.meta | 0 .../Scripts/EventHandlers/DragEntered.cs | 0 .../Scripts/EventHandlers/DragEntered.cs.meta | 0 .../Scripts/EventHandlers/DragExited.cs | 0 .../Scripts/EventHandlers/DragExited.cs.meta | 0 .../Scripts/EventHandlers/DragStarted.cs | 0 .../Scripts/EventHandlers/DragStarted.cs.meta | 0 .../{UI => }/Scripts/EventHandlers/EndEdit.cs | 0 .../Scripts/EventHandlers/EndEdit.cs.meta | 0 .../Scripts/EventHandlers/ObjectClicked.cs | 0 .../EventHandlers/ObjectClicked.cs.meta | 0 .../{Audio => }/Scripts/Interfaces.meta | 4 +- .../Scripts/Interfaces/ICameraController.cs | 0 .../Interfaces/ICameraController.cs.meta | 0 .../Scripts/Interfaces/ICharacter.cs | 0 .../Scripts/Interfaces/ICharacter.cs.meta | 0 .../Scripts/Interfaces/IClickable2D.cs | 0 .../Scripts/Interfaces/IClickable2D.cs.meta | 0 .../Interfaces/IConversationManager.cs | 0 .../Interfaces/IConversationManager.cs.meta | 0 .../Scripts/Interfaces/ICustomTag.cs | 0 .../Scripts/Interfaces/ICustomTag.cs.meta | 0 .../Scripts/Interfaces/IDialogInput.cs | 0 .../Scripts/Interfaces/IDialogInput.cs.meta | 0 .../Scripts/Interfaces/IDraggable2D.cs | 0 .../Scripts/Interfaces/IDraggable2D.cs.meta | 0 .../Scripts/Interfaces/ILocalization.cs | 0 .../Scripts/Interfaces/ILocalization.cs.meta | 0 .../Scripts/Interfaces/IMenuDialog.cs | 0 .../Scripts/Interfaces/IMenuDialog.cs.meta | 0 .../Scripts/Interfaces/IMusicController.cs | 0 .../Interfaces/IMusicController.cs.meta | 0 .../Scripts/Interfaces/IPortraitController.cs | 0 .../Interfaces/IPortraitController.cs.meta | 0 .../Scripts/Interfaces/ISayDialog.cs | 0 .../Scripts/Interfaces/ISayDialog.cs.meta | 0 .../Scripts/Interfaces/IStage.cs | 0 .../Scripts/Interfaces/IStage.cs.meta | 0 .../Scripts/Interfaces/ITextTagParser.cs | 0 .../Scripts/Interfaces/ITextTagParser.cs.meta | 0 .../{Camera => }/Scripts/Interfaces/IView.cs | 0 .../Scripts/Interfaces/IView.cs.meta | 0 .../{UI => }/Scripts/Interfaces/IWriter.cs | 0 .../Scripts/Interfaces/IWriter.cs.meta | 0 .../Fungus/{Lua.meta => Scripts/Utils.meta} | 4 +- .../Utils}/ConversationManager.cs | 0 .../Utils}/ConversationManager.cs.meta | 0 .../Utils}/PortraitUtils.cs | 0 .../Utils}/PortraitUtils.cs.meta | 0 .../Utils}/TextTagParser.cs | 0 .../Utils}/TextTagParser.cs.meta | 0 .../Scripts => Scripts/Utils}/TextTagToken.cs | 0 .../Utils}/TextTagToken.cs.meta | 0 Assets/Fungus/Sprite/Editor.meta | 5 - Assets/Fungus/Sprite/Scripts.meta | 5 - Assets/Fungus/Sprite/Scripts/Commands.meta | 5 - .../Fungus/Sprite/Scripts/EventHandlers.meta | 5 - Assets/Fungus/Sprite/Scripts/Interfaces.meta | 9 -- Assets/Fungus/UI.meta | 9 -- Assets/Fungus/UI/Scripts/Commands.meta | 9 -- Assets/Fungus/UI/Scripts/Interfaces.meta | 9 -- Assets/Fungus/iTween.meta | 5 - Assets/Fungus/iTween/Scripts.meta | 5 - Assets/Fungus/iTween/Scripts/Commands.meta | 5 - 292 files changed, 14 insertions(+), 276 deletions(-) delete mode 100644 Assets/Fungus/Animation.meta delete mode 100644 Assets/Fungus/Animation/Scripts.meta delete mode 100644 Assets/Fungus/Animation/Scripts/Commands.meta delete mode 100644 Assets/Fungus/Audio/Editor.meta delete mode 100644 Assets/Fungus/Audio/Scripts.meta delete mode 100644 Assets/Fungus/Audio/Scripts/Commands.meta delete mode 100644 Assets/Fungus/Camera/Editor.meta delete mode 100644 Assets/Fungus/Camera/Scripts.meta delete mode 100644 Assets/Fungus/Camera/Scripts/Commands.meta delete mode 100644 Assets/Fungus/Lua/Scripts.meta delete mode 100644 Assets/Fungus/Lua/Scripts/LuaExtensions.cs delete mode 100644 Assets/Fungus/Lua/Scripts/LuaExtensions.cs.meta delete mode 100644 Assets/Fungus/Narrative/Editor.meta delete mode 100644 Assets/Fungus/Narrative/Scripts.meta delete mode 100644 Assets/Fungus/Narrative/Scripts/Commands.meta delete mode 100644 Assets/Fungus/Narrative/Scripts/Interfaces.meta rename Assets/Fungus/{UI => }/Scripts.meta (67%) rename Assets/Fungus/{Lua => }/Scripts/Commands.meta (67%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/ClearMenu.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/ClearMenu.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/ControlAudio.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/ControlAudio.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/ControlStage.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/ControlStage.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/ControlWithDisplay.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/ControlWithDisplay.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Conversation.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Conversation.cs.meta (100%) rename Assets/Fungus/{Lua => }/Scripts/Commands/ExecuteLua.cs (100%) rename Assets/Fungus/{Lua => }/Scripts/Commands/ExecuteLua.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/FadeScreen.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/FadeScreen.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/FadeSprite.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/FadeSprite.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/FadeToView.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/FadeToView.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/FadeUI.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/FadeUI.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/Fullscreen.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/Fullscreen.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/GetText.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/GetText.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/LookFrom.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/LookFrom.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/LookTo.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/LookTo.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Menu.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Menu.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/MenuTimer.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/MenuTimer.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/MoveAdd.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/MoveAdd.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/MoveFrom.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/MoveFrom.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/MoveTo.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/MoveTo.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/MoveToView.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/MoveToView.cs.meta (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/PlayAnimState.cs (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/PlayAnimState.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/PlayMusic.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/PlayMusic.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/PlaySound.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/PlaySound.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/PlayUsfxrSound.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/PlayUsfxrSound.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Portrait.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Portrait.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/PunchPosition.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/PunchPosition.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/PunchRotation.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/PunchRotation.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/PunchScale.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/PunchScale.cs.meta (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/ResetAnimTrigger.cs (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/ResetAnimTrigger.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/RotateAdd.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/RotateAdd.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/RotateFrom.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/RotateFrom.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/RotateTo.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/RotateTo.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Say.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/Say.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ScaleAdd.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ScaleAdd.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ScaleFrom.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ScaleFrom.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ScaleTo.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ScaleTo.cs.meta (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimBool.cs (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimBool.cs.meta (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimFloat.cs (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimFloat.cs.meta (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimInteger.cs (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimInteger.cs.meta (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimTrigger.cs (100%) rename Assets/Fungus/{Animation => }/Scripts/Commands/SetAnimTrigger.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/SetAudioPitch.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/SetAudioPitch.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/SetAudioVolume.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/SetAudioVolume.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetClickable2D.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetClickable2D.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetCollider.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetCollider.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetDraggable2D.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetDraggable2D.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/SetInteractable.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/SetInteractable.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/SetLanguage.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/SetLanguage.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetLayerOrder.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetLayerOrder.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/SetMenuDialog.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/SetMenuDialog.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetMouseCursor.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetMouseCursor.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/SetSayDialog.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Commands/SetSayDialog.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/SetSliderValue.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/SetSliderValue.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetSpriteOrder.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/SetSpriteOrder.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/SetText.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/SetText.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/ShakeCamera.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/ShakeCamera.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ShakePosition.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ShakePosition.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ShakeRotation.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ShakeRotation.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ShakeScale.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/ShakeScale.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/ShowSprite.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Commands/ShowSprite.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/StartSwipe.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/StartSwipe.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/StopMusic.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Commands/StopMusic.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/StopSwipe.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Commands/StopSwipe.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/StopTween.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/StopTween.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/StopTweens.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/StopTweens.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/TweenUI.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/TweenUI.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/Write.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Commands/Write.cs.meta (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/iTweenCommand.cs (100%) rename Assets/Fungus/{iTween => }/Scripts/Commands/iTweenCommand.cs.meta (100%) rename Assets/Fungus/{Camera/Scripts/Interfaces.meta => Scripts/Components.meta} (67%) rename Assets/Fungus/{Camera/Scripts => Scripts/Components}/CameraController.cs (100%) rename Assets/Fungus/{Camera/Scripts => Scripts/Components}/CameraController.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/Character.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/Character.cs.meta (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/Clickable2D.cs (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/Clickable2D.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/CustomTag.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/CustomTag.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/DialogInput.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/DialogInput.cs.meta (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/Draggable2D.cs (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/Draggable2D.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/Localization.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/Localization.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/MenuDialog.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/MenuDialog.cs.meta (100%) rename Assets/Fungus/{Audio/Scripts => Scripts/Components}/MusicController.cs (100%) rename Assets/Fungus/{Audio/Scripts => Scripts/Components}/MusicController.cs.meta (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/Parallax.cs (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/Parallax.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/PortraitController.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/PortraitController.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/SayDialog.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/SayDialog.cs.meta (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Components}/SelectOnEnable.cs (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Components}/SelectOnEnable.cs.meta (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/SpriteFader.cs (100%) rename Assets/Fungus/{Sprite/Scripts => Scripts/Components}/SpriteFader.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/Stage.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Components}/Stage.cs.meta (100%) rename Assets/Fungus/{Camera/Scripts => Scripts/Components}/View.cs (100%) rename Assets/Fungus/{Camera/Scripts => Scripts/Components}/View.cs.meta (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Components}/Writer.cs (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Components}/Writer.cs.meta (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Components}/WriterAudio.cs (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Components}/WriterAudio.cs.meta (100%) rename Assets/Fungus/{UI => Scripts}/Editor.meta (67%) rename Assets/Fungus/{Camera => Scripts}/Editor/CameraMenuItems.cs (100%) rename Assets/Fungus/{Camera => Scripts}/Editor/CameraMenuItems.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/CharacterEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/CharacterEditor.cs.meta (100%) rename Assets/Fungus/{Audio => Scripts}/Editor/ControlAudioEditor.cs (100%) rename Assets/Fungus/{Audio => Scripts}/Editor/ControlAudioEditor.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/DialogInputEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/DialogInputEditor.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/LocalizationEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/LocalizationEditor.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/MenuEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/MenuEditor.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/MenuTimerEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/MenuTimerEditor.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/NarrativeMenuItems.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/NarrativeMenuItems.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/PortraitEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/PortraitEditor.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/SayEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/SayEditor.cs.meta (100%) rename Assets/Fungus/{Sprite => Scripts}/Editor/SetColliderEditor.cs (100%) rename Assets/Fungus/{Sprite => Scripts}/Editor/SetColliderEditor.cs.meta (100%) rename Assets/Fungus/{Sprite => Scripts}/Editor/SpriteMenuItems.cs (100%) rename Assets/Fungus/{Sprite => Scripts}/Editor/SpriteMenuItems.cs.meta (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/StageEditor.cs (100%) rename Assets/Fungus/{Narrative => Scripts}/Editor/StageEditor.cs.meta (100%) rename Assets/Fungus/{Camera => Scripts}/Editor/ViewEditor.cs (100%) rename Assets/Fungus/{Camera => Scripts}/Editor/ViewEditor.cs.meta (100%) rename Assets/Fungus/{UI => Scripts}/Editor/WriteEditor.cs (100%) rename Assets/Fungus/{UI => Scripts}/Editor/WriteEditor.cs.meta (100%) rename Assets/Fungus/{UI => Scripts}/Editor/WriterAudioEditor.cs (100%) rename Assets/Fungus/{UI => Scripts}/Editor/WriterAudioEditor.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/EventHandlers.meta (67%) rename Assets/Fungus/{UI => }/Scripts/EventHandlers/ButtonClicked.cs (100%) rename Assets/Fungus/{UI => }/Scripts/EventHandlers/ButtonClicked.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragCancelled.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragCancelled.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragCompleted.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragCompleted.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragEntered.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragEntered.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragExited.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragExited.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragStarted.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/DragStarted.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/EventHandlers/EndEdit.cs (100%) rename Assets/Fungus/{UI => }/Scripts/EventHandlers/EndEdit.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/ObjectClicked.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/EventHandlers/ObjectClicked.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Interfaces.meta (67%) rename Assets/Fungus/{Camera => }/Scripts/Interfaces/ICameraController.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Interfaces/ICameraController.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ICharacter.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ICharacter.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Interfaces/IClickable2D.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Interfaces/IClickable2D.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IConversationManager.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IConversationManager.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ICustomTag.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ICustomTag.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IDialogInput.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IDialogInput.cs.meta (100%) rename Assets/Fungus/{Sprite => }/Scripts/Interfaces/IDraggable2D.cs (100%) rename Assets/Fungus/{Sprite => }/Scripts/Interfaces/IDraggable2D.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ILocalization.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ILocalization.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IMenuDialog.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IMenuDialog.cs.meta (100%) rename Assets/Fungus/{Audio => }/Scripts/Interfaces/IMusicController.cs (100%) rename Assets/Fungus/{Audio => }/Scripts/Interfaces/IMusicController.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IPortraitController.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IPortraitController.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ISayDialog.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/ISayDialog.cs.meta (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IStage.cs (100%) rename Assets/Fungus/{Narrative => }/Scripts/Interfaces/IStage.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Interfaces/ITextTagParser.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Interfaces/ITextTagParser.cs.meta (100%) rename Assets/Fungus/{Camera => }/Scripts/Interfaces/IView.cs (100%) rename Assets/Fungus/{Camera => }/Scripts/Interfaces/IView.cs.meta (100%) rename Assets/Fungus/{UI => }/Scripts/Interfaces/IWriter.cs (100%) rename Assets/Fungus/{UI => }/Scripts/Interfaces/IWriter.cs.meta (100%) rename Assets/Fungus/{Lua.meta => Scripts/Utils.meta} (67%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Utils}/ConversationManager.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Utils}/ConversationManager.cs.meta (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Utils}/PortraitUtils.cs (100%) rename Assets/Fungus/{Narrative/Scripts => Scripts/Utils}/PortraitUtils.cs.meta (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Utils}/TextTagParser.cs (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Utils}/TextTagParser.cs.meta (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Utils}/TextTagToken.cs (100%) rename Assets/Fungus/{UI/Scripts => Scripts/Utils}/TextTagToken.cs.meta (100%) delete mode 100644 Assets/Fungus/Sprite/Editor.meta delete mode 100644 Assets/Fungus/Sprite/Scripts.meta delete mode 100644 Assets/Fungus/Sprite/Scripts/Commands.meta delete mode 100644 Assets/Fungus/Sprite/Scripts/EventHandlers.meta delete mode 100644 Assets/Fungus/Sprite/Scripts/Interfaces.meta delete mode 100644 Assets/Fungus/UI.meta delete mode 100644 Assets/Fungus/UI/Scripts/Commands.meta delete mode 100644 Assets/Fungus/UI/Scripts/Interfaces.meta delete mode 100644 Assets/Fungus/iTween.meta delete mode 100644 Assets/Fungus/iTween/Scripts.meta delete mode 100644 Assets/Fungus/iTween/Scripts/Commands.meta diff --git a/Assets/Fungus/Animation.meta b/Assets/Fungus/Animation.meta deleted file mode 100644 index 6a585646..00000000 --- a/Assets/Fungus/Animation.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 623a31d1ed64f48c18a2941fb2e6bb4b -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Animation/Scripts.meta b/Assets/Fungus/Animation/Scripts.meta deleted file mode 100644 index 2f5cef8f..00000000 --- a/Assets/Fungus/Animation/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: c464247e0cb064d63ba47e22509fc0b0 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Animation/Scripts/Commands.meta b/Assets/Fungus/Animation/Scripts/Commands.meta deleted file mode 100644 index 17b1b807..00000000 --- a/Assets/Fungus/Animation/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 3e8003ca74cfb4a99983b0084a826c72 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Audio/Editor.meta b/Assets/Fungus/Audio/Editor.meta deleted file mode 100644 index ab75c12a..00000000 --- a/Assets/Fungus/Audio/Editor.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 5a4fe51b67cee49b28f6a0231dae2352 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Audio/Scripts.meta b/Assets/Fungus/Audio/Scripts.meta deleted file mode 100644 index 6faf3c67..00000000 --- a/Assets/Fungus/Audio/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 3dd9a7f66888345859cf2db40ceee354 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Audio/Scripts/Commands.meta b/Assets/Fungus/Audio/Scripts/Commands.meta deleted file mode 100644 index 74aea98a..00000000 --- a/Assets/Fungus/Audio/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: d4ee6befb080e414984229c6b24358ae -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Camera/Editor.meta b/Assets/Fungus/Camera/Editor.meta deleted file mode 100644 index d57a3c7e..00000000 --- a/Assets/Fungus/Camera/Editor.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 3d2b8d81dbfb54c02a92a0966802a55a -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Camera/Scripts.meta b/Assets/Fungus/Camera/Scripts.meta deleted file mode 100644 index 737e540f..00000000 --- a/Assets/Fungus/Camera/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: e3391e010f66a4399adbe2bd0de43a83 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Camera/Scripts/Commands.meta b/Assets/Fungus/Camera/Scripts/Commands.meta deleted file mode 100644 index 8c5117e8..00000000 --- a/Assets/Fungus/Camera/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 42741b4e7e5d44f8b8268e93d23ee33e -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Lua/Scripts.meta b/Assets/Fungus/Lua/Scripts.meta deleted file mode 100644 index dbc4914e..00000000 --- a/Assets/Fungus/Lua/Scripts.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 927b2ce96300f4cb093db15b56750d0c -folderAsset: yes -timeCreated: 1459937186 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/Lua/Scripts/LuaExtensions.cs b/Assets/Fungus/Lua/Scripts/LuaExtensions.cs deleted file mode 100644 index 61feba49..00000000 --- a/Assets/Fungus/Lua/Scripts/LuaExtensions.cs +++ /dev/null @@ -1,101 +0,0 @@ -// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). -// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) - -using UnityEngine; -using UnityEngine.UI; -using System.Collections; -using Fungus; -using MoonSharp.Interpreter; - -namespace Fungus -{ - - public static class LuaExtensions - { - - /// - /// Extension for MenuDialog that allows AddOption to call a Lua function when an option is selected. - /// - public static bool AddOption(this MenuDialog menuDialog, string text, bool interactable, ILuaEnvironment luaEnv, Closure callBack) - { - if (!menuDialog.gameObject.activeSelf) - { - menuDialog.gameObject.SetActive(true); - } - - bool addedOption = false; - foreach (Button button in menuDialog.CachedButtons) - { - if (!button.gameObject.activeSelf) - { - button.gameObject.SetActive(true); - - button.interactable = interactable; - - Text textComponent = button.GetComponentInChildren(); - if (textComponent != null) - { - textComponent.text = text; - } - - button.onClick.AddListener(delegate { - - menuDialog.StopAllCoroutines(); // Stop timeout - menuDialog.Clear(); - menuDialog.HideSayDialog(); - - if (callBack != null) - { - luaEnv.RunLuaFunction(callBack, true); - } - }); - - addedOption = true; - break; - } - } - - return addedOption; - } - - /// - /// Extension for MenuDialog that allows ShowTimer to call a Lua function when the timer expires. - /// - public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, ILuaEnvironment luaEnv, Closure callBack) - { - if (menuDialog.CachedSlider == null || - duration <= 0f) - { - yield break; - } - - menuDialog.CachedSlider.gameObject.SetActive(true); - menuDialog.StopAllCoroutines(); - - float elapsedTime = 0; - Slider timeoutSlider = menuDialog.GetComponentInChildren(); - - while (elapsedTime < duration) - { - if (timeoutSlider != null) - { - float t = 1f - elapsedTime / duration; - timeoutSlider.value = t; - } - - elapsedTime += Time.deltaTime; - - yield return null; - } - - menuDialog.Clear(); - menuDialog.gameObject.SetActive(false); - menuDialog.HideSayDialog(); - - if (callBack != null) - { - luaEnv.RunLuaFunction(callBack, true); - } - } - } -} \ No newline at end of file diff --git a/Assets/Fungus/Lua/Scripts/LuaExtensions.cs.meta b/Assets/Fungus/Lua/Scripts/LuaExtensions.cs.meta deleted file mode 100644 index 4b49cb96..00000000 --- a/Assets/Fungus/Lua/Scripts/LuaExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 998f811805a17465ba6720248632ec01 -timeCreated: 1459502744 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/Narrative/Editor.meta b/Assets/Fungus/Narrative/Editor.meta deleted file mode 100644 index d054a054..00000000 --- a/Assets/Fungus/Narrative/Editor.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 805471f08101f4ad8a705fc863435758 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Scripts.meta b/Assets/Fungus/Narrative/Scripts.meta deleted file mode 100644 index 8b8aebec..00000000 --- a/Assets/Fungus/Narrative/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 04b9ccf7cc1a64058ad9340ed03b4a8b -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Scripts/Commands.meta b/Assets/Fungus/Narrative/Scripts/Commands.meta deleted file mode 100644 index 9e87cc9a..00000000 --- a/Assets/Fungus/Narrative/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 0bb03bbaacb014e7399075a2d6ecad3f -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces.meta b/Assets/Fungus/Narrative/Scripts/Interfaces.meta deleted file mode 100644 index 3fdb49b4..00000000 --- a/Assets/Fungus/Narrative/Scripts/Interfaces.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 84aaac902c28b47f89fefe8205397661 -folderAsset: yes -timeCreated: 1473756719 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/UI/Scripts.meta b/Assets/Fungus/Scripts.meta similarity index 67% rename from Assets/Fungus/UI/Scripts.meta rename to Assets/Fungus/Scripts.meta index 040442e5..1013c7c2 100644 --- a/Assets/Fungus/UI/Scripts.meta +++ b/Assets/Fungus/Scripts.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 26c5ee956235e48f18c9a7d6ad86a3eb +guid: fa184a0dd8f1c46cbb12b7fcf9b1b06a folderAsset: yes -timeCreated: 1435851000 +timeCreated: 1473770354 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/Lua/Scripts/Commands.meta b/Assets/Fungus/Scripts/Commands.meta similarity index 67% rename from Assets/Fungus/Lua/Scripts/Commands.meta rename to Assets/Fungus/Scripts/Commands.meta index 47fb285d..c2b6da9e 100644 --- a/Assets/Fungus/Lua/Scripts/Commands.meta +++ b/Assets/Fungus/Scripts/Commands.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 70f0d2a285cfc4e5594117997814560d +guid: d957a50af081d49998801a81811881fe folderAsset: yes -timeCreated: 1459523691 +timeCreated: 1473770383 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs b/Assets/Fungus/Scripts/Commands/ClearMenu.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs rename to Assets/Fungus/Scripts/Commands/ClearMenu.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs.meta b/Assets/Fungus/Scripts/Commands/ClearMenu.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs.meta rename to Assets/Fungus/Scripts/Commands/ClearMenu.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs b/Assets/Fungus/Scripts/Commands/ControlAudio.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs rename to Assets/Fungus/Scripts/Commands/ControlAudio.cs diff --git a/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs.meta b/Assets/Fungus/Scripts/Commands/ControlAudio.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs.meta rename to Assets/Fungus/Scripts/Commands/ControlAudio.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs b/Assets/Fungus/Scripts/Commands/ControlStage.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs rename to Assets/Fungus/Scripts/Commands/ControlStage.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs.meta b/Assets/Fungus/Scripts/Commands/ControlStage.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs.meta rename to Assets/Fungus/Scripts/Commands/ControlStage.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs b/Assets/Fungus/Scripts/Commands/ControlWithDisplay.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs rename to Assets/Fungus/Scripts/Commands/ControlWithDisplay.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs.meta b/Assets/Fungus/Scripts/Commands/ControlWithDisplay.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs.meta rename to Assets/Fungus/Scripts/Commands/ControlWithDisplay.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs b/Assets/Fungus/Scripts/Commands/Conversation.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs rename to Assets/Fungus/Scripts/Commands/Conversation.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs.meta b/Assets/Fungus/Scripts/Commands/Conversation.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs.meta rename to Assets/Fungus/Scripts/Commands/Conversation.cs.meta diff --git a/Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs b/Assets/Fungus/Scripts/Commands/ExecuteLua.cs similarity index 100% rename from Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs rename to Assets/Fungus/Scripts/Commands/ExecuteLua.cs diff --git a/Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs.meta b/Assets/Fungus/Scripts/Commands/ExecuteLua.cs.meta similarity index 100% rename from Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs.meta rename to Assets/Fungus/Scripts/Commands/ExecuteLua.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs b/Assets/Fungus/Scripts/Commands/FadeScreen.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs rename to Assets/Fungus/Scripts/Commands/FadeScreen.cs diff --git a/Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs.meta b/Assets/Fungus/Scripts/Commands/FadeScreen.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs.meta rename to Assets/Fungus/Scripts/Commands/FadeScreen.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs b/Assets/Fungus/Scripts/Commands/FadeSprite.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs rename to Assets/Fungus/Scripts/Commands/FadeSprite.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs.meta b/Assets/Fungus/Scripts/Commands/FadeSprite.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs.meta rename to Assets/Fungus/Scripts/Commands/FadeSprite.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs b/Assets/Fungus/Scripts/Commands/FadeToView.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs rename to Assets/Fungus/Scripts/Commands/FadeToView.cs diff --git a/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs.meta b/Assets/Fungus/Scripts/Commands/FadeToView.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs.meta rename to Assets/Fungus/Scripts/Commands/FadeToView.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs b/Assets/Fungus/Scripts/Commands/FadeUI.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/FadeUI.cs rename to Assets/Fungus/Scripts/Commands/FadeUI.cs diff --git a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs.meta b/Assets/Fungus/Scripts/Commands/FadeUI.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/FadeUI.cs.meta rename to Assets/Fungus/Scripts/Commands/FadeUI.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs b/Assets/Fungus/Scripts/Commands/Fullscreen.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs rename to Assets/Fungus/Scripts/Commands/Fullscreen.cs diff --git a/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs.meta b/Assets/Fungus/Scripts/Commands/Fullscreen.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs.meta rename to Assets/Fungus/Scripts/Commands/Fullscreen.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Commands/GetText.cs b/Assets/Fungus/Scripts/Commands/GetText.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/GetText.cs rename to Assets/Fungus/Scripts/Commands/GetText.cs diff --git a/Assets/Fungus/UI/Scripts/Commands/GetText.cs.meta b/Assets/Fungus/Scripts/Commands/GetText.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/GetText.cs.meta rename to Assets/Fungus/Scripts/Commands/GetText.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs b/Assets/Fungus/Scripts/Commands/LookFrom.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs rename to Assets/Fungus/Scripts/Commands/LookFrom.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs.meta b/Assets/Fungus/Scripts/Commands/LookFrom.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs.meta rename to Assets/Fungus/Scripts/Commands/LookFrom.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/LookTo.cs b/Assets/Fungus/Scripts/Commands/LookTo.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/LookTo.cs rename to Assets/Fungus/Scripts/Commands/LookTo.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/LookTo.cs.meta b/Assets/Fungus/Scripts/Commands/LookTo.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/LookTo.cs.meta rename to Assets/Fungus/Scripts/Commands/LookTo.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs b/Assets/Fungus/Scripts/Commands/Menu.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Menu.cs rename to Assets/Fungus/Scripts/Commands/Menu.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs.meta b/Assets/Fungus/Scripts/Commands/Menu.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Menu.cs.meta rename to Assets/Fungus/Scripts/Commands/Menu.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs b/Assets/Fungus/Scripts/Commands/MenuTimer.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs rename to Assets/Fungus/Scripts/Commands/MenuTimer.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs.meta b/Assets/Fungus/Scripts/Commands/MenuTimer.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs.meta rename to Assets/Fungus/Scripts/Commands/MenuTimer.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs b/Assets/Fungus/Scripts/Commands/MoveAdd.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs rename to Assets/Fungus/Scripts/Commands/MoveAdd.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs.meta b/Assets/Fungus/Scripts/Commands/MoveAdd.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs.meta rename to Assets/Fungus/Scripts/Commands/MoveAdd.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs b/Assets/Fungus/Scripts/Commands/MoveFrom.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs rename to Assets/Fungus/Scripts/Commands/MoveFrom.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs.meta b/Assets/Fungus/Scripts/Commands/MoveFrom.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs.meta rename to Assets/Fungus/Scripts/Commands/MoveFrom.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs b/Assets/Fungus/Scripts/Commands/MoveTo.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs rename to Assets/Fungus/Scripts/Commands/MoveTo.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs.meta b/Assets/Fungus/Scripts/Commands/MoveTo.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs.meta rename to Assets/Fungus/Scripts/Commands/MoveTo.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs b/Assets/Fungus/Scripts/Commands/MoveToView.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs rename to Assets/Fungus/Scripts/Commands/MoveToView.cs diff --git a/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs.meta b/Assets/Fungus/Scripts/Commands/MoveToView.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs.meta rename to Assets/Fungus/Scripts/Commands/MoveToView.cs.meta diff --git a/Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs b/Assets/Fungus/Scripts/Commands/PlayAnimState.cs similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs rename to Assets/Fungus/Scripts/Commands/PlayAnimState.cs diff --git a/Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs.meta b/Assets/Fungus/Scripts/Commands/PlayAnimState.cs.meta similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs.meta rename to Assets/Fungus/Scripts/Commands/PlayAnimState.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs b/Assets/Fungus/Scripts/Commands/PlayMusic.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs rename to Assets/Fungus/Scripts/Commands/PlayMusic.cs diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs.meta b/Assets/Fungus/Scripts/Commands/PlayMusic.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs.meta rename to Assets/Fungus/Scripts/Commands/PlayMusic.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs b/Assets/Fungus/Scripts/Commands/PlaySound.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs rename to Assets/Fungus/Scripts/Commands/PlaySound.cs diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs.meta b/Assets/Fungus/Scripts/Commands/PlaySound.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs.meta rename to Assets/Fungus/Scripts/Commands/PlaySound.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs b/Assets/Fungus/Scripts/Commands/PlayUsfxrSound.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs rename to Assets/Fungus/Scripts/Commands/PlayUsfxrSound.cs diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs.meta b/Assets/Fungus/Scripts/Commands/PlayUsfxrSound.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs.meta rename to Assets/Fungus/Scripts/Commands/PlayUsfxrSound.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs b/Assets/Fungus/Scripts/Commands/Portrait.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs rename to Assets/Fungus/Scripts/Commands/Portrait.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs.meta b/Assets/Fungus/Scripts/Commands/Portrait.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs.meta rename to Assets/Fungus/Scripts/Commands/Portrait.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs b/Assets/Fungus/Scripts/Commands/PunchPosition.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs rename to Assets/Fungus/Scripts/Commands/PunchPosition.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs.meta b/Assets/Fungus/Scripts/Commands/PunchPosition.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs.meta rename to Assets/Fungus/Scripts/Commands/PunchPosition.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs b/Assets/Fungus/Scripts/Commands/PunchRotation.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs rename to Assets/Fungus/Scripts/Commands/PunchRotation.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs.meta b/Assets/Fungus/Scripts/Commands/PunchRotation.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs.meta rename to Assets/Fungus/Scripts/Commands/PunchRotation.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs b/Assets/Fungus/Scripts/Commands/PunchScale.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs rename to Assets/Fungus/Scripts/Commands/PunchScale.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs.meta b/Assets/Fungus/Scripts/Commands/PunchScale.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs.meta rename to Assets/Fungus/Scripts/Commands/PunchScale.cs.meta diff --git a/Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs b/Assets/Fungus/Scripts/Commands/ResetAnimTrigger.cs similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs rename to Assets/Fungus/Scripts/Commands/ResetAnimTrigger.cs diff --git a/Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs.meta b/Assets/Fungus/Scripts/Commands/ResetAnimTrigger.cs.meta similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs.meta rename to Assets/Fungus/Scripts/Commands/ResetAnimTrigger.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs b/Assets/Fungus/Scripts/Commands/RotateAdd.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs rename to Assets/Fungus/Scripts/Commands/RotateAdd.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs.meta b/Assets/Fungus/Scripts/Commands/RotateAdd.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs.meta rename to Assets/Fungus/Scripts/Commands/RotateAdd.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs b/Assets/Fungus/Scripts/Commands/RotateFrom.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs rename to Assets/Fungus/Scripts/Commands/RotateFrom.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs.meta b/Assets/Fungus/Scripts/Commands/RotateFrom.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs.meta rename to Assets/Fungus/Scripts/Commands/RotateFrom.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs b/Assets/Fungus/Scripts/Commands/RotateTo.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs rename to Assets/Fungus/Scripts/Commands/RotateTo.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs.meta b/Assets/Fungus/Scripts/Commands/RotateTo.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs.meta rename to Assets/Fungus/Scripts/Commands/RotateTo.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Say.cs b/Assets/Fungus/Scripts/Commands/Say.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Say.cs rename to Assets/Fungus/Scripts/Commands/Say.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Say.cs.meta b/Assets/Fungus/Scripts/Commands/Say.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/Say.cs.meta rename to Assets/Fungus/Scripts/Commands/Say.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs b/Assets/Fungus/Scripts/Commands/ScaleAdd.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs rename to Assets/Fungus/Scripts/Commands/ScaleAdd.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs.meta b/Assets/Fungus/Scripts/Commands/ScaleAdd.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs.meta rename to Assets/Fungus/Scripts/Commands/ScaleAdd.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs b/Assets/Fungus/Scripts/Commands/ScaleFrom.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs rename to Assets/Fungus/Scripts/Commands/ScaleFrom.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs.meta b/Assets/Fungus/Scripts/Commands/ScaleFrom.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs.meta rename to Assets/Fungus/Scripts/Commands/ScaleFrom.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs b/Assets/Fungus/Scripts/Commands/ScaleTo.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs rename to Assets/Fungus/Scripts/Commands/ScaleTo.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs.meta b/Assets/Fungus/Scripts/Commands/ScaleTo.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs.meta rename to Assets/Fungus/Scripts/Commands/ScaleTo.cs.meta diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs b/Assets/Fungus/Scripts/Commands/SetAnimBool.cs similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs rename to Assets/Fungus/Scripts/Commands/SetAnimBool.cs diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs.meta b/Assets/Fungus/Scripts/Commands/SetAnimBool.cs.meta similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs.meta rename to Assets/Fungus/Scripts/Commands/SetAnimBool.cs.meta diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs b/Assets/Fungus/Scripts/Commands/SetAnimFloat.cs similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs rename to Assets/Fungus/Scripts/Commands/SetAnimFloat.cs diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs.meta b/Assets/Fungus/Scripts/Commands/SetAnimFloat.cs.meta similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs.meta rename to Assets/Fungus/Scripts/Commands/SetAnimFloat.cs.meta diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs b/Assets/Fungus/Scripts/Commands/SetAnimInteger.cs similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs rename to Assets/Fungus/Scripts/Commands/SetAnimInteger.cs diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs.meta b/Assets/Fungus/Scripts/Commands/SetAnimInteger.cs.meta similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs.meta rename to Assets/Fungus/Scripts/Commands/SetAnimInteger.cs.meta diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs b/Assets/Fungus/Scripts/Commands/SetAnimTrigger.cs similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs rename to Assets/Fungus/Scripts/Commands/SetAnimTrigger.cs diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs.meta b/Assets/Fungus/Scripts/Commands/SetAnimTrigger.cs.meta similarity index 100% rename from Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs.meta rename to Assets/Fungus/Scripts/Commands/SetAnimTrigger.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs b/Assets/Fungus/Scripts/Commands/SetAudioPitch.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs rename to Assets/Fungus/Scripts/Commands/SetAudioPitch.cs diff --git a/Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs.meta b/Assets/Fungus/Scripts/Commands/SetAudioPitch.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs.meta rename to Assets/Fungus/Scripts/Commands/SetAudioPitch.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs b/Assets/Fungus/Scripts/Commands/SetAudioVolume.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs rename to Assets/Fungus/Scripts/Commands/SetAudioVolume.cs diff --git a/Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs.meta b/Assets/Fungus/Scripts/Commands/SetAudioVolume.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs.meta rename to Assets/Fungus/Scripts/Commands/SetAudioVolume.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs b/Assets/Fungus/Scripts/Commands/SetClickable2D.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs rename to Assets/Fungus/Scripts/Commands/SetClickable2D.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs.meta b/Assets/Fungus/Scripts/Commands/SetClickable2D.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs.meta rename to Assets/Fungus/Scripts/Commands/SetClickable2D.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs b/Assets/Fungus/Scripts/Commands/SetCollider.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs rename to Assets/Fungus/Scripts/Commands/SetCollider.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs.meta b/Assets/Fungus/Scripts/Commands/SetCollider.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs.meta rename to Assets/Fungus/Scripts/Commands/SetCollider.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs b/Assets/Fungus/Scripts/Commands/SetDraggable2D.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs rename to Assets/Fungus/Scripts/Commands/SetDraggable2D.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs.meta b/Assets/Fungus/Scripts/Commands/SetDraggable2D.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs.meta rename to Assets/Fungus/Scripts/Commands/SetDraggable2D.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs b/Assets/Fungus/Scripts/Commands/SetInteractable.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs rename to Assets/Fungus/Scripts/Commands/SetInteractable.cs diff --git a/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs.meta b/Assets/Fungus/Scripts/Commands/SetInteractable.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs.meta rename to Assets/Fungus/Scripts/Commands/SetInteractable.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs b/Assets/Fungus/Scripts/Commands/SetLanguage.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs rename to Assets/Fungus/Scripts/Commands/SetLanguage.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs.meta b/Assets/Fungus/Scripts/Commands/SetLanguage.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs.meta rename to Assets/Fungus/Scripts/Commands/SetLanguage.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs b/Assets/Fungus/Scripts/Commands/SetLayerOrder.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs rename to Assets/Fungus/Scripts/Commands/SetLayerOrder.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs.meta b/Assets/Fungus/Scripts/Commands/SetLayerOrder.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs.meta rename to Assets/Fungus/Scripts/Commands/SetLayerOrder.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs b/Assets/Fungus/Scripts/Commands/SetMenuDialog.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs rename to Assets/Fungus/Scripts/Commands/SetMenuDialog.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs.meta b/Assets/Fungus/Scripts/Commands/SetMenuDialog.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs.meta rename to Assets/Fungus/Scripts/Commands/SetMenuDialog.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs b/Assets/Fungus/Scripts/Commands/SetMouseCursor.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs rename to Assets/Fungus/Scripts/Commands/SetMouseCursor.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs.meta b/Assets/Fungus/Scripts/Commands/SetMouseCursor.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs.meta rename to Assets/Fungus/Scripts/Commands/SetMouseCursor.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs b/Assets/Fungus/Scripts/Commands/SetSayDialog.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs rename to Assets/Fungus/Scripts/Commands/SetSayDialog.cs diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs.meta b/Assets/Fungus/Scripts/Commands/SetSayDialog.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs.meta rename to Assets/Fungus/Scripts/Commands/SetSayDialog.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs b/Assets/Fungus/Scripts/Commands/SetSliderValue.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs rename to Assets/Fungus/Scripts/Commands/SetSliderValue.cs diff --git a/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs.meta b/Assets/Fungus/Scripts/Commands/SetSliderValue.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs.meta rename to Assets/Fungus/Scripts/Commands/SetSliderValue.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs b/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs rename to Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs.meta b/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs.meta rename to Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Commands/SetText.cs b/Assets/Fungus/Scripts/Commands/SetText.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/SetText.cs rename to Assets/Fungus/Scripts/Commands/SetText.cs diff --git a/Assets/Fungus/UI/Scripts/Commands/SetText.cs.meta b/Assets/Fungus/Scripts/Commands/SetText.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/SetText.cs.meta rename to Assets/Fungus/Scripts/Commands/SetText.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs b/Assets/Fungus/Scripts/Commands/ShakeCamera.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs rename to Assets/Fungus/Scripts/Commands/ShakeCamera.cs diff --git a/Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs.meta b/Assets/Fungus/Scripts/Commands/ShakeCamera.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs.meta rename to Assets/Fungus/Scripts/Commands/ShakeCamera.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs b/Assets/Fungus/Scripts/Commands/ShakePosition.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs rename to Assets/Fungus/Scripts/Commands/ShakePosition.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs.meta b/Assets/Fungus/Scripts/Commands/ShakePosition.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs.meta rename to Assets/Fungus/Scripts/Commands/ShakePosition.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs b/Assets/Fungus/Scripts/Commands/ShakeRotation.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs rename to Assets/Fungus/Scripts/Commands/ShakeRotation.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs.meta b/Assets/Fungus/Scripts/Commands/ShakeRotation.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs.meta rename to Assets/Fungus/Scripts/Commands/ShakeRotation.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs b/Assets/Fungus/Scripts/Commands/ShakeScale.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs rename to Assets/Fungus/Scripts/Commands/ShakeScale.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs.meta b/Assets/Fungus/Scripts/Commands/ShakeScale.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs.meta rename to Assets/Fungus/Scripts/Commands/ShakeScale.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs b/Assets/Fungus/Scripts/Commands/ShowSprite.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs rename to Assets/Fungus/Scripts/Commands/ShowSprite.cs diff --git a/Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs.meta b/Assets/Fungus/Scripts/Commands/ShowSprite.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs.meta rename to Assets/Fungus/Scripts/Commands/ShowSprite.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs b/Assets/Fungus/Scripts/Commands/StartSwipe.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs rename to Assets/Fungus/Scripts/Commands/StartSwipe.cs diff --git a/Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs.meta b/Assets/Fungus/Scripts/Commands/StartSwipe.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs.meta rename to Assets/Fungus/Scripts/Commands/StartSwipe.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs b/Assets/Fungus/Scripts/Commands/StopMusic.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs rename to Assets/Fungus/Scripts/Commands/StopMusic.cs diff --git a/Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs.meta b/Assets/Fungus/Scripts/Commands/StopMusic.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs.meta rename to Assets/Fungus/Scripts/Commands/StopMusic.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs b/Assets/Fungus/Scripts/Commands/StopSwipe.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs rename to Assets/Fungus/Scripts/Commands/StopSwipe.cs diff --git a/Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs.meta b/Assets/Fungus/Scripts/Commands/StopSwipe.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs.meta rename to Assets/Fungus/Scripts/Commands/StopSwipe.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/StopTween.cs b/Assets/Fungus/Scripts/Commands/StopTween.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/StopTween.cs rename to Assets/Fungus/Scripts/Commands/StopTween.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/StopTween.cs.meta b/Assets/Fungus/Scripts/Commands/StopTween.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/StopTween.cs.meta rename to Assets/Fungus/Scripts/Commands/StopTween.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs b/Assets/Fungus/Scripts/Commands/StopTweens.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs rename to Assets/Fungus/Scripts/Commands/StopTweens.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs.meta b/Assets/Fungus/Scripts/Commands/StopTweens.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs.meta rename to Assets/Fungus/Scripts/Commands/StopTweens.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs b/Assets/Fungus/Scripts/Commands/TweenUI.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/TweenUI.cs rename to Assets/Fungus/Scripts/Commands/TweenUI.cs diff --git a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs.meta b/Assets/Fungus/Scripts/Commands/TweenUI.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/TweenUI.cs.meta rename to Assets/Fungus/Scripts/Commands/TweenUI.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Commands/Write.cs b/Assets/Fungus/Scripts/Commands/Write.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/Write.cs rename to Assets/Fungus/Scripts/Commands/Write.cs diff --git a/Assets/Fungus/UI/Scripts/Commands/Write.cs.meta b/Assets/Fungus/Scripts/Commands/Write.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Commands/Write.cs.meta rename to Assets/Fungus/Scripts/Commands/Write.cs.meta diff --git a/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs b/Assets/Fungus/Scripts/Commands/iTweenCommand.cs similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs rename to Assets/Fungus/Scripts/Commands/iTweenCommand.cs diff --git a/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs.meta b/Assets/Fungus/Scripts/Commands/iTweenCommand.cs.meta similarity index 100% rename from Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs.meta rename to Assets/Fungus/Scripts/Commands/iTweenCommand.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Interfaces.meta b/Assets/Fungus/Scripts/Components.meta similarity index 67% rename from Assets/Fungus/Camera/Scripts/Interfaces.meta rename to Assets/Fungus/Scripts/Components.meta index 6b94198b..1458923a 100644 --- a/Assets/Fungus/Camera/Scripts/Interfaces.meta +++ b/Assets/Fungus/Scripts/Components.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 02938c86564af4507b9db82f939ff484 +guid: cd598e3b678e74763876d546c8b0fd9f folderAsset: yes -timeCreated: 1473756679 +timeCreated: 1473770363 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/Camera/Scripts/CameraController.cs b/Assets/Fungus/Scripts/Components/CameraController.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/CameraController.cs rename to Assets/Fungus/Scripts/Components/CameraController.cs diff --git a/Assets/Fungus/Camera/Scripts/CameraController.cs.meta b/Assets/Fungus/Scripts/Components/CameraController.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/CameraController.cs.meta rename to Assets/Fungus/Scripts/Components/CameraController.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Character.cs b/Assets/Fungus/Scripts/Components/Character.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Character.cs rename to Assets/Fungus/Scripts/Components/Character.cs diff --git a/Assets/Fungus/Narrative/Scripts/Character.cs.meta b/Assets/Fungus/Scripts/Components/Character.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Character.cs.meta rename to Assets/Fungus/Scripts/Components/Character.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Clickable2D.cs b/Assets/Fungus/Scripts/Components/Clickable2D.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Clickable2D.cs rename to Assets/Fungus/Scripts/Components/Clickable2D.cs diff --git a/Assets/Fungus/Sprite/Scripts/Clickable2D.cs.meta b/Assets/Fungus/Scripts/Components/Clickable2D.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Clickable2D.cs.meta rename to Assets/Fungus/Scripts/Components/Clickable2D.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/CustomTag.cs b/Assets/Fungus/Scripts/Components/CustomTag.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/CustomTag.cs rename to Assets/Fungus/Scripts/Components/CustomTag.cs diff --git a/Assets/Fungus/Narrative/Scripts/CustomTag.cs.meta b/Assets/Fungus/Scripts/Components/CustomTag.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/CustomTag.cs.meta rename to Assets/Fungus/Scripts/Components/CustomTag.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/DialogInput.cs b/Assets/Fungus/Scripts/Components/DialogInput.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/DialogInput.cs rename to Assets/Fungus/Scripts/Components/DialogInput.cs diff --git a/Assets/Fungus/Narrative/Scripts/DialogInput.cs.meta b/Assets/Fungus/Scripts/Components/DialogInput.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/DialogInput.cs.meta rename to Assets/Fungus/Scripts/Components/DialogInput.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Draggable2D.cs b/Assets/Fungus/Scripts/Components/Draggable2D.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Draggable2D.cs rename to Assets/Fungus/Scripts/Components/Draggable2D.cs diff --git a/Assets/Fungus/Sprite/Scripts/Draggable2D.cs.meta b/Assets/Fungus/Scripts/Components/Draggable2D.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Draggable2D.cs.meta rename to Assets/Fungus/Scripts/Components/Draggable2D.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Localization.cs b/Assets/Fungus/Scripts/Components/Localization.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Localization.cs rename to Assets/Fungus/Scripts/Components/Localization.cs diff --git a/Assets/Fungus/Narrative/Scripts/Localization.cs.meta b/Assets/Fungus/Scripts/Components/Localization.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Localization.cs.meta rename to Assets/Fungus/Scripts/Components/Localization.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/MenuDialog.cs b/Assets/Fungus/Scripts/Components/MenuDialog.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/MenuDialog.cs rename to Assets/Fungus/Scripts/Components/MenuDialog.cs diff --git a/Assets/Fungus/Narrative/Scripts/MenuDialog.cs.meta b/Assets/Fungus/Scripts/Components/MenuDialog.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/MenuDialog.cs.meta rename to Assets/Fungus/Scripts/Components/MenuDialog.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/MusicController.cs b/Assets/Fungus/Scripts/Components/MusicController.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/MusicController.cs rename to Assets/Fungus/Scripts/Components/MusicController.cs diff --git a/Assets/Fungus/Audio/Scripts/MusicController.cs.meta b/Assets/Fungus/Scripts/Components/MusicController.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/MusicController.cs.meta rename to Assets/Fungus/Scripts/Components/MusicController.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Parallax.cs b/Assets/Fungus/Scripts/Components/Parallax.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Parallax.cs rename to Assets/Fungus/Scripts/Components/Parallax.cs diff --git a/Assets/Fungus/Sprite/Scripts/Parallax.cs.meta b/Assets/Fungus/Scripts/Components/Parallax.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Parallax.cs.meta rename to Assets/Fungus/Scripts/Components/Parallax.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/PortraitController.cs b/Assets/Fungus/Scripts/Components/PortraitController.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/PortraitController.cs rename to Assets/Fungus/Scripts/Components/PortraitController.cs diff --git a/Assets/Fungus/Narrative/Scripts/PortraitController.cs.meta b/Assets/Fungus/Scripts/Components/PortraitController.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/PortraitController.cs.meta rename to Assets/Fungus/Scripts/Components/PortraitController.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/SayDialog.cs b/Assets/Fungus/Scripts/Components/SayDialog.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/SayDialog.cs rename to Assets/Fungus/Scripts/Components/SayDialog.cs diff --git a/Assets/Fungus/Narrative/Scripts/SayDialog.cs.meta b/Assets/Fungus/Scripts/Components/SayDialog.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/SayDialog.cs.meta rename to Assets/Fungus/Scripts/Components/SayDialog.cs.meta diff --git a/Assets/Fungus/UI/Scripts/SelectOnEnable.cs b/Assets/Fungus/Scripts/Components/SelectOnEnable.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/SelectOnEnable.cs rename to Assets/Fungus/Scripts/Components/SelectOnEnable.cs diff --git a/Assets/Fungus/UI/Scripts/SelectOnEnable.cs.meta b/Assets/Fungus/Scripts/Components/SelectOnEnable.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/SelectOnEnable.cs.meta rename to Assets/Fungus/Scripts/Components/SelectOnEnable.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/SpriteFader.cs b/Assets/Fungus/Scripts/Components/SpriteFader.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/SpriteFader.cs rename to Assets/Fungus/Scripts/Components/SpriteFader.cs diff --git a/Assets/Fungus/Sprite/Scripts/SpriteFader.cs.meta b/Assets/Fungus/Scripts/Components/SpriteFader.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/SpriteFader.cs.meta rename to Assets/Fungus/Scripts/Components/SpriteFader.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Stage.cs b/Assets/Fungus/Scripts/Components/Stage.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Stage.cs rename to Assets/Fungus/Scripts/Components/Stage.cs diff --git a/Assets/Fungus/Narrative/Scripts/Stage.cs.meta b/Assets/Fungus/Scripts/Components/Stage.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Stage.cs.meta rename to Assets/Fungus/Scripts/Components/Stage.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/View.cs b/Assets/Fungus/Scripts/Components/View.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/View.cs rename to Assets/Fungus/Scripts/Components/View.cs diff --git a/Assets/Fungus/Camera/Scripts/View.cs.meta b/Assets/Fungus/Scripts/Components/View.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/View.cs.meta rename to Assets/Fungus/Scripts/Components/View.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Writer.cs b/Assets/Fungus/Scripts/Components/Writer.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Writer.cs rename to Assets/Fungus/Scripts/Components/Writer.cs diff --git a/Assets/Fungus/UI/Scripts/Writer.cs.meta b/Assets/Fungus/Scripts/Components/Writer.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Writer.cs.meta rename to Assets/Fungus/Scripts/Components/Writer.cs.meta diff --git a/Assets/Fungus/UI/Scripts/WriterAudio.cs b/Assets/Fungus/Scripts/Components/WriterAudio.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/WriterAudio.cs rename to Assets/Fungus/Scripts/Components/WriterAudio.cs diff --git a/Assets/Fungus/UI/Scripts/WriterAudio.cs.meta b/Assets/Fungus/Scripts/Components/WriterAudio.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/WriterAudio.cs.meta rename to Assets/Fungus/Scripts/Components/WriterAudio.cs.meta diff --git a/Assets/Fungus/UI/Editor.meta b/Assets/Fungus/Scripts/Editor.meta similarity index 67% rename from Assets/Fungus/UI/Editor.meta rename to Assets/Fungus/Scripts/Editor.meta index 0f6bb93d..e91e4413 100644 --- a/Assets/Fungus/UI/Editor.meta +++ b/Assets/Fungus/Scripts/Editor.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 7ebd428fad0b74343aa1bf752f8f05a1 +guid: 6d1425e0149d44734bf9c05ee7b9465f folderAsset: yes -timeCreated: 1438002256 +timeCreated: 1473770450 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/Camera/Editor/CameraMenuItems.cs b/Assets/Fungus/Scripts/Editor/CameraMenuItems.cs similarity index 100% rename from Assets/Fungus/Camera/Editor/CameraMenuItems.cs rename to Assets/Fungus/Scripts/Editor/CameraMenuItems.cs diff --git a/Assets/Fungus/Camera/Editor/CameraMenuItems.cs.meta b/Assets/Fungus/Scripts/Editor/CameraMenuItems.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Editor/CameraMenuItems.cs.meta rename to Assets/Fungus/Scripts/Editor/CameraMenuItems.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/CharacterEditor.cs b/Assets/Fungus/Scripts/Editor/CharacterEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/CharacterEditor.cs rename to Assets/Fungus/Scripts/Editor/CharacterEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/CharacterEditor.cs.meta b/Assets/Fungus/Scripts/Editor/CharacterEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/CharacterEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/CharacterEditor.cs.meta diff --git a/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs b/Assets/Fungus/Scripts/Editor/ControlAudioEditor.cs similarity index 100% rename from Assets/Fungus/Audio/Editor/ControlAudioEditor.cs rename to Assets/Fungus/Scripts/Editor/ControlAudioEditor.cs diff --git a/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs.meta b/Assets/Fungus/Scripts/Editor/ControlAudioEditor.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Editor/ControlAudioEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/ControlAudioEditor.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/DialogInputEditor.cs b/Assets/Fungus/Scripts/Editor/DialogInputEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/DialogInputEditor.cs rename to Assets/Fungus/Scripts/Editor/DialogInputEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/DialogInputEditor.cs.meta b/Assets/Fungus/Scripts/Editor/DialogInputEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/DialogInputEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/DialogInputEditor.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs b/Assets/Fungus/Scripts/Editor/LocalizationEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/LocalizationEditor.cs rename to Assets/Fungus/Scripts/Editor/LocalizationEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs.meta b/Assets/Fungus/Scripts/Editor/LocalizationEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/LocalizationEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/LocalizationEditor.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/MenuEditor.cs b/Assets/Fungus/Scripts/Editor/MenuEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/MenuEditor.cs rename to Assets/Fungus/Scripts/Editor/MenuEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/MenuEditor.cs.meta b/Assets/Fungus/Scripts/Editor/MenuEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/MenuEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/MenuEditor.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs b/Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs rename to Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs.meta b/Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs b/Assets/Fungus/Scripts/Editor/NarrativeMenuItems.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs rename to Assets/Fungus/Scripts/Editor/NarrativeMenuItems.cs diff --git a/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs.meta b/Assets/Fungus/Scripts/Editor/NarrativeMenuItems.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs.meta rename to Assets/Fungus/Scripts/Editor/NarrativeMenuItems.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/PortraitEditor.cs b/Assets/Fungus/Scripts/Editor/PortraitEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/PortraitEditor.cs rename to Assets/Fungus/Scripts/Editor/PortraitEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/PortraitEditor.cs.meta b/Assets/Fungus/Scripts/Editor/PortraitEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/PortraitEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/PortraitEditor.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/SayEditor.cs b/Assets/Fungus/Scripts/Editor/SayEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/SayEditor.cs rename to Assets/Fungus/Scripts/Editor/SayEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/SayEditor.cs.meta b/Assets/Fungus/Scripts/Editor/SayEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/SayEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/SayEditor.cs.meta diff --git a/Assets/Fungus/Sprite/Editor/SetColliderEditor.cs b/Assets/Fungus/Scripts/Editor/SetColliderEditor.cs similarity index 100% rename from Assets/Fungus/Sprite/Editor/SetColliderEditor.cs rename to Assets/Fungus/Scripts/Editor/SetColliderEditor.cs diff --git a/Assets/Fungus/Sprite/Editor/SetColliderEditor.cs.meta b/Assets/Fungus/Scripts/Editor/SetColliderEditor.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Editor/SetColliderEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/SetColliderEditor.cs.meta diff --git a/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs b/Assets/Fungus/Scripts/Editor/SpriteMenuItems.cs similarity index 100% rename from Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs rename to Assets/Fungus/Scripts/Editor/SpriteMenuItems.cs diff --git a/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs.meta b/Assets/Fungus/Scripts/Editor/SpriteMenuItems.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs.meta rename to Assets/Fungus/Scripts/Editor/SpriteMenuItems.cs.meta diff --git a/Assets/Fungus/Narrative/Editor/StageEditor.cs b/Assets/Fungus/Scripts/Editor/StageEditor.cs similarity index 100% rename from Assets/Fungus/Narrative/Editor/StageEditor.cs rename to Assets/Fungus/Scripts/Editor/StageEditor.cs diff --git a/Assets/Fungus/Narrative/Editor/StageEditor.cs.meta b/Assets/Fungus/Scripts/Editor/StageEditor.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Editor/StageEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/StageEditor.cs.meta diff --git a/Assets/Fungus/Camera/Editor/ViewEditor.cs b/Assets/Fungus/Scripts/Editor/ViewEditor.cs similarity index 100% rename from Assets/Fungus/Camera/Editor/ViewEditor.cs rename to Assets/Fungus/Scripts/Editor/ViewEditor.cs diff --git a/Assets/Fungus/Camera/Editor/ViewEditor.cs.meta b/Assets/Fungus/Scripts/Editor/ViewEditor.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Editor/ViewEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/ViewEditor.cs.meta diff --git a/Assets/Fungus/UI/Editor/WriteEditor.cs b/Assets/Fungus/Scripts/Editor/WriteEditor.cs similarity index 100% rename from Assets/Fungus/UI/Editor/WriteEditor.cs rename to Assets/Fungus/Scripts/Editor/WriteEditor.cs diff --git a/Assets/Fungus/UI/Editor/WriteEditor.cs.meta b/Assets/Fungus/Scripts/Editor/WriteEditor.cs.meta similarity index 100% rename from Assets/Fungus/UI/Editor/WriteEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/WriteEditor.cs.meta diff --git a/Assets/Fungus/UI/Editor/WriterAudioEditor.cs b/Assets/Fungus/Scripts/Editor/WriterAudioEditor.cs similarity index 100% rename from Assets/Fungus/UI/Editor/WriterAudioEditor.cs rename to Assets/Fungus/Scripts/Editor/WriterAudioEditor.cs diff --git a/Assets/Fungus/UI/Editor/WriterAudioEditor.cs.meta b/Assets/Fungus/Scripts/Editor/WriterAudioEditor.cs.meta similarity index 100% rename from Assets/Fungus/UI/Editor/WriterAudioEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/WriterAudioEditor.cs.meta diff --git a/Assets/Fungus/UI/Scripts/EventHandlers.meta b/Assets/Fungus/Scripts/EventHandlers.meta similarity index 67% rename from Assets/Fungus/UI/Scripts/EventHandlers.meta rename to Assets/Fungus/Scripts/EventHandlers.meta index de92f9c7..92d38a82 100644 --- a/Assets/Fungus/UI/Scripts/EventHandlers.meta +++ b/Assets/Fungus/Scripts/EventHandlers.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 0329da317386d4617bc27cf9df87783a +guid: 93d4250218aa04c9d957714d9d724771 folderAsset: yes -timeCreated: 1441985730 +timeCreated: 1473770389 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs b/Assets/Fungus/Scripts/EventHandlers/ButtonClicked.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs rename to Assets/Fungus/Scripts/EventHandlers/ButtonClicked.cs diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs.meta b/Assets/Fungus/Scripts/EventHandlers/ButtonClicked.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/ButtonClicked.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs b/Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs rename to Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs.meta b/Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs b/Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs rename to Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs.meta b/Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs b/Assets/Fungus/Scripts/EventHandlers/DragEntered.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs rename to Assets/Fungus/Scripts/EventHandlers/DragEntered.cs diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs.meta b/Assets/Fungus/Scripts/EventHandlers/DragEntered.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/DragEntered.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs b/Assets/Fungus/Scripts/EventHandlers/DragExited.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs rename to Assets/Fungus/Scripts/EventHandlers/DragExited.cs diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs.meta b/Assets/Fungus/Scripts/EventHandlers/DragExited.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/DragExited.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs b/Assets/Fungus/Scripts/EventHandlers/DragStarted.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs rename to Assets/Fungus/Scripts/EventHandlers/DragStarted.cs diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs.meta b/Assets/Fungus/Scripts/EventHandlers/DragStarted.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/DragStarted.cs.meta diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs b/Assets/Fungus/Scripts/EventHandlers/EndEdit.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs rename to Assets/Fungus/Scripts/EventHandlers/EndEdit.cs diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs.meta b/Assets/Fungus/Scripts/EventHandlers/EndEdit.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/EndEdit.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs b/Assets/Fungus/Scripts/EventHandlers/ObjectClicked.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs rename to Assets/Fungus/Scripts/EventHandlers/ObjectClicked.cs diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs.meta b/Assets/Fungus/Scripts/EventHandlers/ObjectClicked.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/ObjectClicked.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Interfaces.meta b/Assets/Fungus/Scripts/Interfaces.meta similarity index 67% rename from Assets/Fungus/Audio/Scripts/Interfaces.meta rename to Assets/Fungus/Scripts/Interfaces.meta index 05675dea..9bd8ca61 100644 --- a/Assets/Fungus/Audio/Scripts/Interfaces.meta +++ b/Assets/Fungus/Scripts/Interfaces.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f2351e6b0a83f4d17b76593ca71d076a +guid: 8d3bdad29f4e0468c823545b6658a25f folderAsset: yes -timeCreated: 1473756661 +timeCreated: 1473770370 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/Camera/Scripts/Interfaces/ICameraController.cs b/Assets/Fungus/Scripts/Interfaces/ICameraController.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Interfaces/ICameraController.cs rename to Assets/Fungus/Scripts/Interfaces/ICameraController.cs diff --git a/Assets/Fungus/Camera/Scripts/Interfaces/ICameraController.cs.meta b/Assets/Fungus/Scripts/Interfaces/ICameraController.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Interfaces/ICameraController.cs.meta rename to Assets/Fungus/Scripts/Interfaces/ICameraController.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ICharacter.cs b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ICharacter.cs rename to Assets/Fungus/Scripts/Interfaces/ICharacter.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ICharacter.cs.meta b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ICharacter.cs.meta rename to Assets/Fungus/Scripts/Interfaces/ICharacter.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Interfaces/IClickable2D.cs b/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Interfaces/IClickable2D.cs rename to Assets/Fungus/Scripts/Interfaces/IClickable2D.cs diff --git a/Assets/Fungus/Sprite/Scripts/Interfaces/IClickable2D.cs.meta b/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Interfaces/IClickable2D.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IClickable2D.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IConversationManager.cs b/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IConversationManager.cs rename to Assets/Fungus/Scripts/Interfaces/IConversationManager.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IConversationManager.cs.meta b/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IConversationManager.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IConversationManager.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ICustomTag.cs b/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ICustomTag.cs rename to Assets/Fungus/Scripts/Interfaces/ICustomTag.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ICustomTag.cs.meta b/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ICustomTag.cs.meta rename to Assets/Fungus/Scripts/Interfaces/ICustomTag.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IDialogInput.cs b/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IDialogInput.cs rename to Assets/Fungus/Scripts/Interfaces/IDialogInput.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IDialogInput.cs.meta b/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IDialogInput.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IDialogInput.cs.meta diff --git a/Assets/Fungus/Sprite/Scripts/Interfaces/IDraggable2D.cs b/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Interfaces/IDraggable2D.cs rename to Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs diff --git a/Assets/Fungus/Sprite/Scripts/Interfaces/IDraggable2D.cs.meta b/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs.meta similarity index 100% rename from Assets/Fungus/Sprite/Scripts/Interfaces/IDraggable2D.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ILocalization.cs b/Assets/Fungus/Scripts/Interfaces/ILocalization.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ILocalization.cs rename to Assets/Fungus/Scripts/Interfaces/ILocalization.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ILocalization.cs.meta b/Assets/Fungus/Scripts/Interfaces/ILocalization.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ILocalization.cs.meta rename to Assets/Fungus/Scripts/Interfaces/ILocalization.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IMenuDialog.cs b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IMenuDialog.cs rename to Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IMenuDialog.cs.meta b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IMenuDialog.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs.meta diff --git a/Assets/Fungus/Audio/Scripts/Interfaces/IMusicController.cs b/Assets/Fungus/Scripts/Interfaces/IMusicController.cs similarity index 100% rename from Assets/Fungus/Audio/Scripts/Interfaces/IMusicController.cs rename to Assets/Fungus/Scripts/Interfaces/IMusicController.cs diff --git a/Assets/Fungus/Audio/Scripts/Interfaces/IMusicController.cs.meta b/Assets/Fungus/Scripts/Interfaces/IMusicController.cs.meta similarity index 100% rename from Assets/Fungus/Audio/Scripts/Interfaces/IMusicController.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IMusicController.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IPortraitController.cs b/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IPortraitController.cs rename to Assets/Fungus/Scripts/Interfaces/IPortraitController.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IPortraitController.cs.meta b/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IPortraitController.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IPortraitController.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ISayDialog.cs b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ISayDialog.cs rename to Assets/Fungus/Scripts/Interfaces/ISayDialog.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/ISayDialog.cs.meta b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/ISayDialog.cs.meta rename to Assets/Fungus/Scripts/Interfaces/ISayDialog.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IStage.cs b/Assets/Fungus/Scripts/Interfaces/IStage.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IStage.cs rename to Assets/Fungus/Scripts/Interfaces/IStage.cs diff --git a/Assets/Fungus/Narrative/Scripts/Interfaces/IStage.cs.meta b/Assets/Fungus/Scripts/Interfaces/IStage.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/Interfaces/IStage.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IStage.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Interfaces/ITextTagParser.cs b/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Interfaces/ITextTagParser.cs rename to Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs diff --git a/Assets/Fungus/UI/Scripts/Interfaces/ITextTagParser.cs.meta b/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Interfaces/ITextTagParser.cs.meta rename to Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs.meta diff --git a/Assets/Fungus/Camera/Scripts/Interfaces/IView.cs b/Assets/Fungus/Scripts/Interfaces/IView.cs similarity index 100% rename from Assets/Fungus/Camera/Scripts/Interfaces/IView.cs rename to Assets/Fungus/Scripts/Interfaces/IView.cs diff --git a/Assets/Fungus/Camera/Scripts/Interfaces/IView.cs.meta b/Assets/Fungus/Scripts/Interfaces/IView.cs.meta similarity index 100% rename from Assets/Fungus/Camera/Scripts/Interfaces/IView.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IView.cs.meta diff --git a/Assets/Fungus/UI/Scripts/Interfaces/IWriter.cs b/Assets/Fungus/Scripts/Interfaces/IWriter.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/Interfaces/IWriter.cs rename to Assets/Fungus/Scripts/Interfaces/IWriter.cs diff --git a/Assets/Fungus/UI/Scripts/Interfaces/IWriter.cs.meta b/Assets/Fungus/Scripts/Interfaces/IWriter.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/Interfaces/IWriter.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IWriter.cs.meta diff --git a/Assets/Fungus/Lua.meta b/Assets/Fungus/Scripts/Utils.meta similarity index 67% rename from Assets/Fungus/Lua.meta rename to Assets/Fungus/Scripts/Utils.meta index 57284f07..45f223f2 100644 --- a/Assets/Fungus/Lua.meta +++ b/Assets/Fungus/Scripts/Utils.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: eb9106aaabbf94f978cec3f7bf29790e +guid: adc84c6e3fc0f4edb8b7a0caed2dc8bb folderAsset: yes -timeCreated: 1459937141 +timeCreated: 1473770521 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/Narrative/Scripts/ConversationManager.cs b/Assets/Fungus/Scripts/Utils/ConversationManager.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/ConversationManager.cs rename to Assets/Fungus/Scripts/Utils/ConversationManager.cs diff --git a/Assets/Fungus/Narrative/Scripts/ConversationManager.cs.meta b/Assets/Fungus/Scripts/Utils/ConversationManager.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/ConversationManager.cs.meta rename to Assets/Fungus/Scripts/Utils/ConversationManager.cs.meta diff --git a/Assets/Fungus/Narrative/Scripts/PortraitUtils.cs b/Assets/Fungus/Scripts/Utils/PortraitUtils.cs similarity index 100% rename from Assets/Fungus/Narrative/Scripts/PortraitUtils.cs rename to Assets/Fungus/Scripts/Utils/PortraitUtils.cs diff --git a/Assets/Fungus/Narrative/Scripts/PortraitUtils.cs.meta b/Assets/Fungus/Scripts/Utils/PortraitUtils.cs.meta similarity index 100% rename from Assets/Fungus/Narrative/Scripts/PortraitUtils.cs.meta rename to Assets/Fungus/Scripts/Utils/PortraitUtils.cs.meta diff --git a/Assets/Fungus/UI/Scripts/TextTagParser.cs b/Assets/Fungus/Scripts/Utils/TextTagParser.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/TextTagParser.cs rename to Assets/Fungus/Scripts/Utils/TextTagParser.cs diff --git a/Assets/Fungus/UI/Scripts/TextTagParser.cs.meta b/Assets/Fungus/Scripts/Utils/TextTagParser.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/TextTagParser.cs.meta rename to Assets/Fungus/Scripts/Utils/TextTagParser.cs.meta diff --git a/Assets/Fungus/UI/Scripts/TextTagToken.cs b/Assets/Fungus/Scripts/Utils/TextTagToken.cs similarity index 100% rename from Assets/Fungus/UI/Scripts/TextTagToken.cs rename to Assets/Fungus/Scripts/Utils/TextTagToken.cs diff --git a/Assets/Fungus/UI/Scripts/TextTagToken.cs.meta b/Assets/Fungus/Scripts/Utils/TextTagToken.cs.meta similarity index 100% rename from Assets/Fungus/UI/Scripts/TextTagToken.cs.meta rename to Assets/Fungus/Scripts/Utils/TextTagToken.cs.meta diff --git a/Assets/Fungus/Sprite/Editor.meta b/Assets/Fungus/Sprite/Editor.meta deleted file mode 100644 index 535871f9..00000000 --- a/Assets/Fungus/Sprite/Editor.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 6de313ae80cb3443ab384d5491b0839c -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Sprite/Scripts.meta b/Assets/Fungus/Sprite/Scripts.meta deleted file mode 100644 index 6cf58c9a..00000000 --- a/Assets/Fungus/Sprite/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 601ceabb5df6040c59cf2a8d00a9f91d -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Sprite/Scripts/Commands.meta b/Assets/Fungus/Sprite/Scripts/Commands.meta deleted file mode 100644 index 148d43a4..00000000 --- a/Assets/Fungus/Sprite/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 64930440b47ca4f1e85e62d2c8b1b38f -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers.meta b/Assets/Fungus/Sprite/Scripts/EventHandlers.meta deleted file mode 100644 index 216f9ad4..00000000 --- a/Assets/Fungus/Sprite/Scripts/EventHandlers.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: c5e8d406029f34a579d94564b4cb7d3b -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Sprite/Scripts/Interfaces.meta b/Assets/Fungus/Sprite/Scripts/Interfaces.meta deleted file mode 100644 index 4306a4ca..00000000 --- a/Assets/Fungus/Sprite/Scripts/Interfaces.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 7937f20be52e240908f219ef0c0c3b2f -folderAsset: yes -timeCreated: 1473756759 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/UI.meta b/Assets/Fungus/UI.meta deleted file mode 100644 index 0bbf47b0..00000000 --- a/Assets/Fungus/UI.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 71839549e49ad422ba0be670a2d9e8f3 -folderAsset: yes -timeCreated: 1435850993 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/UI/Scripts/Commands.meta b/Assets/Fungus/UI/Scripts/Commands.meta deleted file mode 100644 index 083db131..00000000 --- a/Assets/Fungus/UI/Scripts/Commands.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: a7a410254d340428085aaf0e66b494fd -folderAsset: yes -timeCreated: 1435851006 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/UI/Scripts/Interfaces.meta b/Assets/Fungus/UI/Scripts/Interfaces.meta deleted file mode 100644 index 7210a752..00000000 --- a/Assets/Fungus/UI/Scripts/Interfaces.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 5fe1942ed58bf4b28b53fbae5c2364b2 -folderAsset: yes -timeCreated: 1473758057 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/iTween.meta b/Assets/Fungus/iTween.meta deleted file mode 100644 index 713b262a..00000000 --- a/Assets/Fungus/iTween.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 6e28dc60fedde4c22940b446dd7178b3 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/iTween/Scripts.meta b/Assets/Fungus/iTween/Scripts.meta deleted file mode 100644 index c088a9dc..00000000 --- a/Assets/Fungus/iTween/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 613c324e4f7374b649a92bd017b9320f -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/iTween/Scripts/Commands.meta b/Assets/Fungus/iTween/Scripts/Commands.meta deleted file mode 100644 index 3b5f237c..00000000 --- a/Assets/Fungus/iTween/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: d468dad31c6e64adaa4ad3245f554dd7 -folderAsset: yes -DefaultImporter: - userData: From 56e413a224f4eea101c3faf5aa2ea0a09ec377cf Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 11:55:08 +0100 Subject: [PATCH 02/32] Reorganised Fungus folder structure --- Assets/Fungus/Audio/Audio.meta | 5 - Assets/Fungus/Audio/{Audio => }/Click.wav | Bin .../Fungus/Audio/{Audio => }/Click.wav.meta | 0 .../Audio/Click.wav => Audio/Click2.wav} | Bin .../Click.wav.meta => Audio/Click2.wav.meta} | 0 .../{Narrative => }/Audio/HighVoice.wav | Bin .../{Narrative => }/Audio/HighVoice.wav.meta | 0 .../Fungus/{Narrative => }/Audio/LowVoice.wav | Bin .../{Narrative => }/Audio/LowVoice.wav.meta | 0 .../Fungus/{Narrative => }/Audio/MidVoice.wav | Bin .../{Narrative => }/Audio/MidVoice.wav.meta | 0 Assets/Fungus/Camera.meta | 5 - .../{Flowchart/Resources.meta => Docs.meta} | 4 +- Assets/Fungus/{ => Docs}/CHANGELOG.txt | 0 Assets/Fungus/{ => Docs}/CHANGELOG.txt.meta | 0 Assets/Fungus/{ => Docs}/LICENSE.txt | 0 Assets/Fungus/{ => Docs}/LICENSE.txt.meta | 0 Assets/Fungus/{ => Docs}/README.txt | 0 Assets/Fungus/{ => Docs}/README.txt.meta | 0 Assets/Fungus/Flowchart/Editor.meta | 5 - Assets/Fungus/Flowchart/Scripts/Commands.meta | 5 - .../Flowchart/Scripts/EventHandlers.meta | 5 - Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 2 +- Assets/Fungus/Flowchart/Sprites.meta | 5 - Assets/Fungus/{Narrative => }/Fonts.meta | 0 .../{Narrative => }/Fonts/Amaranth.meta | 0 .../Fonts/Amaranth/Amaranth-Bold.otf | Bin .../Fonts/Amaranth/Amaranth-Bold.otf.meta | 0 .../Fonts/Amaranth/Amaranth-BoldItalic.otf | Bin .../Amaranth/Amaranth-BoldItalic.otf.meta | 0 .../Fonts/Amaranth/Amaranth-Italic.otf | Bin .../Fonts/Amaranth/Amaranth-Italic.otf.meta | 0 .../Fonts/Amaranth/Amaranth-Regular.otf | Bin .../Fonts/Amaranth/Amaranth-Regular.otf.meta | 0 .../Fonts/Amaranth/SIL Open Font License.txt | 0 .../Amaranth/SIL Open Font License.txt.meta | 0 Assets/Fungus/{Narrative => }/Fonts/Exo2.meta | 0 .../{Narrative => }/Fonts/Exo2/Exo2-Bold.ttf | Bin .../Fonts/Exo2/Exo2-Bold.ttf.meta | 0 .../Fonts/Exo2/Exo2-Regular.ttf | Bin .../Fonts/Exo2/Exo2-Regular.ttf.meta | 0 .../Fungus/{Narrative => }/Fonts/Exo2/OFL.txt | 0 .../{Narrative => }/Fonts/Exo2/OFL.txt.meta | 0 Assets/Fungus/Narrative.meta | 5 - Assets/Fungus/Narrative/Audio.meta | 5 - Assets/Fungus/Narrative/Images.meta | 5 - Assets/Fungus/Narrative/Resources.meta | 5 - Assets/Fungus/{Camera => }/Resources.meta | 0 .../Prefabs.meta} | 6 +- .../Prefabs}/AudioTag.prefab | 8 +- .../Prefabs}/AudioTag.prefab.meta | 0 .../Prefabs}/Character.prefab | 5 +- .../Prefabs}/Character.prefab.meta | 0 .../Prefabs}/ClickableSprite.prefab | 30 ++++-- .../Prefabs}/ClickableSprite.prefab.meta | 0 .../Prefabs}/DragTargetSprite.prefab | 30 ++++-- .../Prefabs}/DragTargetSprite.prefab.meta | 0 .../Prefabs}/DraggableSprite.prefab | 41 ++++++-- .../Prefabs}/DraggableSprite.prefab.meta | 0 .../Prefabs}/EventSystem.prefab | 6 +- .../Prefabs}/EventSystem.prefab.meta | 0 .../Prefabs}/Flowchart.prefab | 10 +- .../Prefabs}/Flowchart.prefab.meta | 0 .../Prefabs}/FungusLogo.prefab | 34 ++++-- .../Prefabs}/FungusLogo.prefab.meta | 0 .../Prefabs}/Localization.prefab | 3 +- .../Prefabs}/Localization.prefab.meta | 0 .../Prefabs}/MenuDialog.prefab | 30 ++++-- .../Prefabs}/MenuDialog.prefab.meta | 0 .../Prefabs}/ParallaxSprite.prefab | 27 +++-- .../Prefabs}/ParallaxSprite.prefab.meta | 0 .../Prefabs}/SayDialog.prefab | 0 .../Prefabs}/SayDialog.prefab.meta | 0 .../Prefabs}/Stage.prefab | 10 +- .../Prefabs}/Stage.prefab.meta | 0 .../Prefabs}/StagePosition.prefab | 17 ++- .../Prefabs}/StagePosition.prefab.meta | 0 .../Prefabs}/Tag.prefab | 1 + .../Prefabs}/Tag.prefab.meta | 0 .../Prefabs}/View.prefab | 1 + .../Prefabs}/View.prefab.meta | 0 Assets/Fungus/Resources/Sprites.meta | 9 ++ .../Sprites/Background.png | Bin .../Sprites/Background.png.meta | 0 .../Sprites/HandPointer.png | Bin .../Sprites/HandPointer.png.meta | 0 .../Sprites/MousePointer.png | Bin .../Sprites/MousePointer.png.meta | 0 .../{Flowchart => }/Scripts/Commands/Break.cs | 0 .../Scripts/Commands/Break.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Call.cs | 0 .../Scripts/Commands/Call.cs.meta | 0 .../Scripts/Commands/CallMethod.cs | 0 .../Scripts/Commands/CallMethod.cs.meta | 0 .../Scripts/Commands/Comment.cs | 0 .../Scripts/Commands/Comment.cs.meta | 0 .../Scripts/Commands/Condition.cs | 0 .../Scripts/Commands/Condition.cs.meta | 0 .../Scripts/Commands/DebugLog.cs | 0 .../Scripts/Commands/DebugLog.cs.meta | 0 .../Scripts/Commands/DeleteSaveKey.cs | 0 .../Scripts/Commands/DeleteSaveKey.cs.meta | 0 .../Scripts/Commands/Destroy.cs | 0 .../Scripts/Commands/Destroy.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Else.cs | 0 .../Scripts/Commands/Else.cs.meta | 0 .../Scripts/Commands/ElseIf.cs | 0 .../Scripts/Commands/ElseIf.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/End.cs | 0 .../Scripts/Commands/End.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/If.cs | 0 .../Scripts/Commands/If.cs.meta | 0 .../Scripts/Commands/InvokeEvent.cs | 0 .../Scripts/Commands/InvokeEvent.cs.meta | 0 .../Scripts/Commands/InvokeMethod.cs | 0 .../Scripts/Commands/InvokeMethod.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Jump.cs | 0 .../Scripts/Commands/Jump.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Label.cs | 0 .../Scripts/Commands/Label.cs.meta | 0 .../Scripts/Commands/LoadScene.cs | 0 .../Scripts/Commands/LoadScene.cs.meta | 0 .../Scripts/Commands/LoadVariable.cs | 0 .../Scripts/Commands/LoadVariable.cs.meta | 0 .../Scripts/Commands/OpenURL.cs | 0 .../Scripts/Commands/OpenURL.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Quit.cs | 0 .../Scripts/Commands/Quit.cs.meta | 0 .../Scripts/Commands/RandomFloat.cs | 0 .../Scripts/Commands/RandomFloat.cs.meta | 0 .../Scripts/Commands/RandomInteger.cs | 0 .../Scripts/Commands/RandomInteger.cs.meta | 0 .../Scripts/Commands/ReadTextFile.cs | 0 .../Scripts/Commands/ReadTextFile.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Reset.cs | 0 .../Scripts/Commands/Reset.cs.meta | 0 .../Scripts/Commands/SaveVariable.cs | 0 .../Scripts/Commands/SaveVariable.cs.meta | 0 .../Scripts/Commands/SendMessage.cs | 0 .../Scripts/Commands/SendMessage.cs.meta | 0 .../Scripts/Commands/SetActive.cs | 0 .../Scripts/Commands/SetActive.cs.meta | 0 .../Scripts/Commands/SetSaveProfile.cs | 0 .../Scripts/Commands/SetSaveProfile.cs.meta | 0 .../Scripts/Commands/SetVariable.cs | 0 .../Scripts/Commands/SetVariable.cs.meta | 0 .../Scripts/Commands/SpawnObject.cs | 0 .../Scripts/Commands/SpawnObject.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Stop.cs | 0 .../Scripts/Commands/Stop.cs.meta | 0 .../Scripts/Commands/StopBlock.cs | 0 .../Scripts/Commands/StopBlock.cs.meta | 0 .../Scripts/Commands/StopFlowchart.cs | 0 .../Scripts/Commands/StopFlowchart.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/Wait.cs | 0 .../Scripts/Commands/Wait.cs.meta | 0 .../{Flowchart => }/Scripts/Commands/While.cs | 0 .../Scripts/Commands/While.cs.meta | 0 .../Fungus/Scripts/Components/DialogInput.cs | 2 +- .../Scripts/Components/LuaExtensions.cs | 99 ++++++++++++++++++ .../Scripts/Components/LuaExtensions.cs.meta | 13 +++ .../Fungus/Scripts/Components/MenuDialog.cs | 2 +- Assets/Fungus/Scripts/Components/SayDialog.cs | 70 ++++++------- .../Editor/AssetModProcessor.cs | 0 .../Editor/AssetModProcessor.cs.meta | 0 .../Editor/BlockEditor.cs | 0 .../Editor/BlockEditor.cs.meta | 0 .../Editor/BlockInspector.cs | 0 .../Editor/BlockInspector.cs.meta | 0 .../Editor/CallEditor.cs | 0 .../Editor/CallEditor.cs.meta | 0 .../Editor/CommandEditor.cs | 0 .../Editor/CommandEditor.cs.meta | 0 .../Editor/CommandListAdaptor.cs | 0 .../Editor/CommandListAdaptor.cs.meta | 0 .../Editor/CustomGUI.cs | 0 .../Editor/CustomGUI.cs.meta | 0 .../Editor/EditorExtensions.cs | 0 .../Editor/EditorExtensions.cs.meta | 0 .../Editor/EditorZoomArea.cs | 0 .../Editor/EditorZoomArea.cs.meta | 0 .../Editor/EventHandlerEditor.cs | 0 .../Editor/EventHandlerEditor.cs.meta | 0 .../Editor/FlowchartEditor.cs | 0 .../Editor/FlowchartEditor.cs.meta | 0 .../Editor/FlowchartMenuItems.cs | 2 +- .../Editor/FlowchartMenuItems.cs.meta | 0 .../Editor/FlowchartWindow.cs | 0 .../Editor/FlowchartWindow.cs.meta | 0 .../Editor/FungusEditorResources.cs | 0 .../Editor/FungusEditorResources.cs.meta | 0 .../{Flowchart => Scripts}/Editor/GLDraw.cs | 0 .../Editor/GLDraw.cs.meta | 0 .../{Flowchart => Scripts}/Editor/IfEditor.cs | 0 .../Editor/IfEditor.cs.meta | 0 .../Editor/InvokeEventEditor.cs | 0 .../Editor/InvokeEventEditor.cs.meta | 0 .../Editor/InvokeMethodEditor.cs | 0 .../Editor/InvokeMethodEditor.cs.meta | 0 .../Editor/LabelEditor.cs | 0 .../Editor/LabelEditor.cs.meta | 0 .../Editor/Resources.meta | 0 .../Editor/Resources/GLLineDraw.mat | 0 .../Editor/Resources/GLLineDraw.mat.meta | 0 .../Editor/Resources/GLLineDraw.shader | 0 .../Editor/Resources/GLLineDraw.shader.meta | 0 .../Editor/Resources/Icons.meta | 0 .../Editor/Resources/Icons/ResizeHandle.png | Bin .../Resources/Icons/ResizeHandle.png.meta | 0 .../Editor/Resources/Icons/add.png | Bin .../Editor/Resources/Icons/add.png.meta | 0 .../Editor/Resources/Icons/add_small.png | Bin .../Editor/Resources/Icons/add_small.png.meta | 0 .../Editor/Resources/Icons/delete.png | Bin .../Editor/Resources/Icons/delete.png.meta | 0 .../Editor/Resources/Icons/down.png | Bin .../Editor/Resources/Icons/down.png.meta | 0 .../Editor/Resources/Icons/duplicate.png | Bin .../Editor/Resources/Icons/duplicate.png.meta | 0 .../Editor/Resources/Icons/left.png | Bin .../Editor/Resources/Icons/left.png.meta | 0 .../Editor/Resources/Icons/right.png | Bin .../Editor/Resources/Icons/right.png.meta | 0 .../Editor/Resources/Icons/up.png | Bin .../Editor/Resources/Icons/up.png.meta | 0 .../Editor}/SerializedPropertyExtensions.cs | 0 .../SerializedPropertyExtensions.cs.meta | 0 .../Editor/SetVariableEditor.cs | 0 .../Editor/SetVariableEditor.cs.meta | 0 .../Editor/VariableEditor.cs | 0 .../Editor/VariableEditor.cs.meta | 0 .../Editor/VariableListAdaptor.cs | 0 .../Editor/VariableListAdaptor.cs.meta | 0 .../Scripts/EventHandlers/FlowchartEnabled.cs | 0 .../EventHandlers/FlowchartEnabled.cs.meta | 0 .../Scripts/EventHandlers/GameStarted.cs | 0 .../Scripts/EventHandlers/GameStarted.cs.meta | 0 .../Scripts/EventHandlers/KeyPressed.cs | 0 .../Scripts/EventHandlers/KeyPressed.cs.meta | 0 .../Scripts/EventHandlers/MessageReceived.cs | 0 .../EventHandlers/MessageReceived.cs.meta | 0 .../Fungus/Scripts/Interfaces/ISayDialog.cs | 15 ++- .../Scripts/VariableTypes.meta | 0 .../Scripts/VariableTypes/AnimatorVariable.cs | 0 .../VariableTypes/AnimatorVariable.cs.meta | 0 .../VariableTypes/AudioSourceVariable.cs | 0 .../VariableTypes/AudioSourceVariable.cs.meta | 0 .../Scripts/VariableTypes/BooleanVariable.cs | 0 .../VariableTypes/BooleanVariable.cs.meta | 0 .../Scripts/VariableTypes/ColorVariable.cs | 0 .../VariableTypes/ColorVariable.cs.meta | 0 .../Scripts/VariableTypes/FloatVariable.cs | 0 .../VariableTypes/FloatVariable.cs.meta | 0 .../VariableTypes/GameObjectVariable.cs | 0 .../VariableTypes/GameObjectVariable.cs.meta | 0 .../Scripts/VariableTypes/IntegerVariable.cs | 0 .../VariableTypes/IntegerVariable.cs.meta | 0 .../Scripts/VariableTypes/MaterialVariable.cs | 0 .../VariableTypes/MaterialVariable.cs.meta | 0 .../Scripts/VariableTypes/ObjectVariable.cs | 0 .../VariableTypes/ObjectVariable.cs.meta | 0 .../Scripts/VariableTypes/SpriteVariable.cs | 0 .../VariableTypes/SpriteVariable.cs.meta | 0 .../Scripts/VariableTypes/StringVariable.cs | 0 .../VariableTypes/StringVariable.cs.meta | 0 .../Scripts/VariableTypes/TextureVariable.cs | 0 .../VariableTypes/TextureVariable.cs.meta | 0 .../VariableTypes/TransformVariable.cs | 0 .../VariableTypes/TransformVariable.cs.meta | 0 .../Scripts/VariableTypes/Vector2Variable.cs | 0 .../VariableTypes/Vector2Variable.cs.meta | 0 .../Scripts/VariableTypes/Vector3Variable.cs | 0 .../VariableTypes/Vector3Variable.cs.meta | 0 Assets/Fungus/{ => Scripts}/link.xml | 0 Assets/Fungus/{ => Scripts}/link.xml.meta | 0 Assets/Fungus/Sprite.meta | 5 - Assets/Fungus/Sprite/Resources.meta | 5 - Assets/Fungus/Sprite/Sprites.meta | 5 - .../{Camera/Sprites.meta => Textures.meta} | 2 + .../Images => Textures}/Attribution.txt | 0 .../Images => Textures}/Attribution.txt.meta | 0 .../Images => Textures}/ContinueIcon.png | Bin .../Images => Textures}/ContinueIcon.png.meta | 0 .../Sprites => Textures}/CreatedWith.psd | Bin .../Sprites => Textures}/CreatedWith.psd.meta | 0 .../Images => Textures}/DialogBox.png | Bin .../Images => Textures}/DialogBox.png.meta | 0 .../Images => Textures}/DialogBoxSliced.png | Bin .../DialogBoxSliced.png.meta | 0 .../Sprites => Textures}/FungusLogo.png | Bin .../Sprites => Textures}/FungusLogo.png.meta | 0 .../Images => Textures}/Mushroom.png | Bin .../Images => Textures}/Mushroom.png.meta | 0 .../Images => Textures}/OptionButton.png | Bin .../Images => Textures}/OptionButton.png.meta | 0 .../OptionButtonDisabled.png | Bin .../OptionButtonDisabled.png.meta | 0 .../OptionButtonHighlighted.png | Bin .../OptionButtonHighlighted.png.meta | 0 .../OptionButtonPressed.png | Bin .../OptionButtonPressed.png.meta | 0 .../Sprites => Textures}/ScreenFade.png | Bin .../Sprites => Textures}/ScreenFade.png.meta | 0 .../Sprites => Textures}/ScriptIcon.png | Bin .../Sprites => Textures}/ScriptIcon.png.meta | 0 .../Sprites => Textures}/SwipePanIcon.png | Bin .../SwipePanIcon.png.meta | 0 .../FungusLua/Resources/Lua/fungus.txt | 6 +- .../Thirdparty/FungusLua/Scripts/LuaUtils.cs | 2 +- Assets/Tests/Lua/LuaEnvironmentTests.unity | 69 ++++++++---- 310 files changed, 424 insertions(+), 197 deletions(-) delete mode 100644 Assets/Fungus/Audio/Audio.meta rename Assets/Fungus/Audio/{Audio => }/Click.wav (100%) rename Assets/Fungus/Audio/{Audio => }/Click.wav.meta (100%) rename Assets/Fungus/{Narrative/Audio/Click.wav => Audio/Click2.wav} (100%) rename Assets/Fungus/{Narrative/Audio/Click.wav.meta => Audio/Click2.wav.meta} (100%) rename Assets/Fungus/{Narrative => }/Audio/HighVoice.wav (100%) rename Assets/Fungus/{Narrative => }/Audio/HighVoice.wav.meta (100%) rename Assets/Fungus/{Narrative => }/Audio/LowVoice.wav (100%) rename Assets/Fungus/{Narrative => }/Audio/LowVoice.wav.meta (100%) rename Assets/Fungus/{Narrative => }/Audio/MidVoice.wav (100%) rename Assets/Fungus/{Narrative => }/Audio/MidVoice.wav.meta (100%) delete mode 100644 Assets/Fungus/Camera.meta rename Assets/Fungus/{Flowchart/Resources.meta => Docs.meta} (67%) rename Assets/Fungus/{ => Docs}/CHANGELOG.txt (100%) rename Assets/Fungus/{ => Docs}/CHANGELOG.txt.meta (100%) rename Assets/Fungus/{ => Docs}/LICENSE.txt (100%) rename Assets/Fungus/{ => Docs}/LICENSE.txt.meta (100%) rename Assets/Fungus/{ => Docs}/README.txt (100%) rename Assets/Fungus/{ => Docs}/README.txt.meta (100%) delete mode 100644 Assets/Fungus/Flowchart/Editor.meta delete mode 100644 Assets/Fungus/Flowchart/Scripts/Commands.meta delete mode 100644 Assets/Fungus/Flowchart/Scripts/EventHandlers.meta delete mode 100644 Assets/Fungus/Flowchart/Sprites.meta rename Assets/Fungus/{Narrative => }/Fonts.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-Bold.otf (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-Bold.otf.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-BoldItalic.otf (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-BoldItalic.otf.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-Italic.otf (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-Italic.otf.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-Regular.otf (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/Amaranth-Regular.otf.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/SIL Open Font License.txt (100%) rename Assets/Fungus/{Narrative => }/Fonts/Amaranth/SIL Open Font License.txt.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Exo2.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Exo2/Exo2-Bold.ttf (100%) rename Assets/Fungus/{Narrative => }/Fonts/Exo2/Exo2-Bold.ttf.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Exo2/Exo2-Regular.ttf (100%) rename Assets/Fungus/{Narrative => }/Fonts/Exo2/Exo2-Regular.ttf.meta (100%) rename Assets/Fungus/{Narrative => }/Fonts/Exo2/OFL.txt (100%) rename Assets/Fungus/{Narrative => }/Fonts/Exo2/OFL.txt.meta (100%) delete mode 100644 Assets/Fungus/Narrative.meta delete mode 100644 Assets/Fungus/Narrative/Audio.meta delete mode 100644 Assets/Fungus/Narrative/Images.meta delete mode 100644 Assets/Fungus/Narrative/Resources.meta rename Assets/Fungus/{Camera => }/Resources.meta (100%) rename Assets/Fungus/{Flowchart/Editor/Extensions.meta => Resources/Prefabs.meta} (57%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/AudioTag.prefab (93%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/AudioTag.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Character.prefab (94%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Character.prefab.meta (100%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/ClickableSprite.prefab (77%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/ClickableSprite.prefab.meta (100%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/DragTargetSprite.prefab (73%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/DragTargetSprite.prefab.meta (100%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/DraggableSprite.prefab (75%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/DraggableSprite.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/EventSystem.prefab (95%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/EventSystem.prefab.meta (100%) rename Assets/Fungus/{Flowchart/Resources => Resources/Prefabs}/Flowchart.prefab (94%) rename Assets/Fungus/{Flowchart/Resources => Resources/Prefabs}/Flowchart.prefab.meta (100%) rename Assets/Fungus/{Flowchart/Resources => Resources/Prefabs}/FungusLogo.prefab (80%) rename Assets/Fungus/{Flowchart/Resources => Resources/Prefabs}/FungusLogo.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Localization.prefab (93%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Localization.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/MenuDialog.prefab (97%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/MenuDialog.prefab.meta (100%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/ParallaxSprite.prefab (77%) rename Assets/Fungus/{Sprite/Resources => Resources/Prefabs}/ParallaxSprite.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/SayDialog.prefab (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/SayDialog.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Stage.prefab (97%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Stage.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/StagePosition.prefab (79%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/StagePosition.prefab.meta (100%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Tag.prefab (97%) rename Assets/Fungus/{Narrative/Resources => Resources/Prefabs}/Tag.prefab.meta (100%) rename Assets/Fungus/{Camera/Resources => Resources/Prefabs}/View.prefab (97%) rename Assets/Fungus/{Camera/Resources => Resources/Prefabs}/View.prefab.meta (100%) create mode 100644 Assets/Fungus/Resources/Sprites.meta rename Assets/Fungus/{Sprite => Resources}/Sprites/Background.png (100%) rename Assets/Fungus/{Sprite => Resources}/Sprites/Background.png.meta (100%) rename Assets/Fungus/{Sprite => Resources}/Sprites/HandPointer.png (100%) rename Assets/Fungus/{Sprite => Resources}/Sprites/HandPointer.png.meta (100%) rename Assets/Fungus/{Sprite => Resources}/Sprites/MousePointer.png (100%) rename Assets/Fungus/{Sprite => Resources}/Sprites/MousePointer.png.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Break.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Break.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Call.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Call.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/CallMethod.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/CallMethod.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Comment.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Comment.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Condition.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Condition.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/DebugLog.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/DebugLog.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/DeleteSaveKey.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/DeleteSaveKey.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Destroy.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Destroy.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Else.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Else.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/ElseIf.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/ElseIf.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/End.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/End.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/If.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/If.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/InvokeEvent.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/InvokeEvent.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/InvokeMethod.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/InvokeMethod.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Jump.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Jump.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Label.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Label.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/LoadScene.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/LoadScene.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/LoadVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/LoadVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/OpenURL.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/OpenURL.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Quit.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Quit.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/RandomFloat.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/RandomFloat.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/RandomInteger.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/RandomInteger.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/ReadTextFile.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/ReadTextFile.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Reset.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Reset.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SaveVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SaveVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SendMessage.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SendMessage.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SetActive.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SetActive.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SetSaveProfile.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SetSaveProfile.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SetVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SetVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SpawnObject.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/SpawnObject.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Stop.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Stop.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/StopBlock.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/StopBlock.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/StopFlowchart.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/StopFlowchart.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Wait.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/Wait.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/While.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/Commands/While.cs.meta (100%) create mode 100644 Assets/Fungus/Scripts/Components/LuaExtensions.cs create mode 100644 Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta rename Assets/Fungus/{Flowchart => Scripts}/Editor/AssetModProcessor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/AssetModProcessor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/BlockEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/BlockEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/BlockInspector.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/BlockInspector.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CallEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CallEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CommandEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CommandEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CommandListAdaptor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CommandListAdaptor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CustomGUI.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/CustomGUI.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/EditorExtensions.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/EditorExtensions.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/EditorZoomArea.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/EditorZoomArea.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/EventHandlerEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/EventHandlerEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FlowchartEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FlowchartEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FlowchartMenuItems.cs (96%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FlowchartMenuItems.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FlowchartWindow.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FlowchartWindow.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FungusEditorResources.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/FungusEditorResources.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/GLDraw.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/GLDraw.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/IfEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/IfEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/InvokeEventEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/InvokeEventEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/InvokeMethodEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/InvokeMethodEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/LabelEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/LabelEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/GLLineDraw.mat (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/GLLineDraw.mat.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/GLLineDraw.shader (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/GLLineDraw.shader.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/ResizeHandle.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/ResizeHandle.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/add.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/add.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/add_small.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/add_small.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/delete.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/delete.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/down.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/down.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/duplicate.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/duplicate.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/left.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/left.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/right.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/right.png.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/up.png (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/Resources/Icons/up.png.meta (100%) rename Assets/Fungus/{Flowchart/Editor/Extensions => Scripts/Editor}/SerializedPropertyExtensions.cs (100%) rename Assets/Fungus/{Flowchart/Editor/Extensions => Scripts/Editor}/SerializedPropertyExtensions.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/SetVariableEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/SetVariableEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/VariableEditor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/VariableEditor.cs.meta (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/VariableListAdaptor.cs (100%) rename Assets/Fungus/{Flowchart => Scripts}/Editor/VariableListAdaptor.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/FlowchartEnabled.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/FlowchartEnabled.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/GameStarted.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/GameStarted.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/KeyPressed.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/KeyPressed.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/MessageReceived.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/EventHandlers/MessageReceived.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/AnimatorVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/AnimatorVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/AudioSourceVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/AudioSourceVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/BooleanVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/BooleanVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/ColorVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/ColorVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/FloatVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/FloatVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/GameObjectVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/GameObjectVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/IntegerVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/IntegerVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/MaterialVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/MaterialVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/ObjectVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/ObjectVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/SpriteVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/SpriteVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/StringVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/StringVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/TextureVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/TextureVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/TransformVariable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/TransformVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/Vector2Variable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/Vector2Variable.cs.meta (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/Vector3Variable.cs (100%) rename Assets/Fungus/{Flowchart => }/Scripts/VariableTypes/Vector3Variable.cs.meta (100%) rename Assets/Fungus/{ => Scripts}/link.xml (100%) rename Assets/Fungus/{ => Scripts}/link.xml.meta (100%) delete mode 100644 Assets/Fungus/Sprite.meta delete mode 100644 Assets/Fungus/Sprite/Resources.meta delete mode 100644 Assets/Fungus/Sprite/Sprites.meta rename Assets/Fungus/{Camera/Sprites.meta => Textures.meta} (71%) rename Assets/Fungus/{Narrative/Images => Textures}/Attribution.txt (100%) rename Assets/Fungus/{Narrative/Images => Textures}/Attribution.txt.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/ContinueIcon.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/ContinueIcon.png.meta (100%) rename Assets/Fungus/{Flowchart/Sprites => Textures}/CreatedWith.psd (100%) rename Assets/Fungus/{Flowchart/Sprites => Textures}/CreatedWith.psd.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/DialogBox.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/DialogBox.png.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/DialogBoxSliced.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/DialogBoxSliced.png.meta (100%) rename Assets/Fungus/{Flowchart/Sprites => Textures}/FungusLogo.png (100%) rename Assets/Fungus/{Flowchart/Sprites => Textures}/FungusLogo.png.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/Mushroom.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/Mushroom.png.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButton.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButton.png.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButtonDisabled.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButtonDisabled.png.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButtonHighlighted.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButtonHighlighted.png.meta (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButtonPressed.png (100%) rename Assets/Fungus/{Narrative/Images => Textures}/OptionButtonPressed.png.meta (100%) rename Assets/Fungus/{Camera/Sprites => Textures}/ScreenFade.png (100%) rename Assets/Fungus/{Camera/Sprites => Textures}/ScreenFade.png.meta (100%) rename Assets/Fungus/{Flowchart/Sprites => Textures}/ScriptIcon.png (100%) rename Assets/Fungus/{Flowchart/Sprites => Textures}/ScriptIcon.png.meta (100%) rename Assets/Fungus/{Camera/Sprites => Textures}/SwipePanIcon.png (100%) rename Assets/Fungus/{Camera/Sprites => Textures}/SwipePanIcon.png.meta (100%) diff --git a/Assets/Fungus/Audio/Audio.meta b/Assets/Fungus/Audio/Audio.meta deleted file mode 100644 index 891fd621..00000000 --- a/Assets/Fungus/Audio/Audio.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 0c0251f25261847649112eb90bdc787c -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Audio/Audio/Click.wav b/Assets/Fungus/Audio/Click.wav similarity index 100% rename from Assets/Fungus/Audio/Audio/Click.wav rename to Assets/Fungus/Audio/Click.wav diff --git a/Assets/Fungus/Audio/Audio/Click.wav.meta b/Assets/Fungus/Audio/Click.wav.meta similarity index 100% rename from Assets/Fungus/Audio/Audio/Click.wav.meta rename to Assets/Fungus/Audio/Click.wav.meta diff --git a/Assets/Fungus/Narrative/Audio/Click.wav b/Assets/Fungus/Audio/Click2.wav similarity index 100% rename from Assets/Fungus/Narrative/Audio/Click.wav rename to Assets/Fungus/Audio/Click2.wav diff --git a/Assets/Fungus/Narrative/Audio/Click.wav.meta b/Assets/Fungus/Audio/Click2.wav.meta similarity index 100% rename from Assets/Fungus/Narrative/Audio/Click.wav.meta rename to Assets/Fungus/Audio/Click2.wav.meta diff --git a/Assets/Fungus/Narrative/Audio/HighVoice.wav b/Assets/Fungus/Audio/HighVoice.wav similarity index 100% rename from Assets/Fungus/Narrative/Audio/HighVoice.wav rename to Assets/Fungus/Audio/HighVoice.wav diff --git a/Assets/Fungus/Narrative/Audio/HighVoice.wav.meta b/Assets/Fungus/Audio/HighVoice.wav.meta similarity index 100% rename from Assets/Fungus/Narrative/Audio/HighVoice.wav.meta rename to Assets/Fungus/Audio/HighVoice.wav.meta diff --git a/Assets/Fungus/Narrative/Audio/LowVoice.wav b/Assets/Fungus/Audio/LowVoice.wav similarity index 100% rename from Assets/Fungus/Narrative/Audio/LowVoice.wav rename to Assets/Fungus/Audio/LowVoice.wav diff --git a/Assets/Fungus/Narrative/Audio/LowVoice.wav.meta b/Assets/Fungus/Audio/LowVoice.wav.meta similarity index 100% rename from Assets/Fungus/Narrative/Audio/LowVoice.wav.meta rename to Assets/Fungus/Audio/LowVoice.wav.meta diff --git a/Assets/Fungus/Narrative/Audio/MidVoice.wav b/Assets/Fungus/Audio/MidVoice.wav similarity index 100% rename from Assets/Fungus/Narrative/Audio/MidVoice.wav rename to Assets/Fungus/Audio/MidVoice.wav diff --git a/Assets/Fungus/Narrative/Audio/MidVoice.wav.meta b/Assets/Fungus/Audio/MidVoice.wav.meta similarity index 100% rename from Assets/Fungus/Narrative/Audio/MidVoice.wav.meta rename to Assets/Fungus/Audio/MidVoice.wav.meta diff --git a/Assets/Fungus/Camera.meta b/Assets/Fungus/Camera.meta deleted file mode 100644 index 2e91ac93..00000000 --- a/Assets/Fungus/Camera.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 6e9a956b0b8294e4f82ab030bb93a8e4 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Flowchart/Resources.meta b/Assets/Fungus/Docs.meta similarity index 67% rename from Assets/Fungus/Flowchart/Resources.meta rename to Assets/Fungus/Docs.meta index 8e38972d..8e8f39e0 100644 --- a/Assets/Fungus/Flowchart/Resources.meta +++ b/Assets/Fungus/Docs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 3c8cc55d1747d47c3a62002c9fbe8011 +guid: 5441286d76a2f47c7a2ea683709ea59e folderAsset: yes -timeCreated: 1427386140 +timeCreated: 1473781211 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Fungus/CHANGELOG.txt b/Assets/Fungus/Docs/CHANGELOG.txt similarity index 100% rename from Assets/Fungus/CHANGELOG.txt rename to Assets/Fungus/Docs/CHANGELOG.txt diff --git a/Assets/Fungus/CHANGELOG.txt.meta b/Assets/Fungus/Docs/CHANGELOG.txt.meta similarity index 100% rename from Assets/Fungus/CHANGELOG.txt.meta rename to Assets/Fungus/Docs/CHANGELOG.txt.meta diff --git a/Assets/Fungus/LICENSE.txt b/Assets/Fungus/Docs/LICENSE.txt similarity index 100% rename from Assets/Fungus/LICENSE.txt rename to Assets/Fungus/Docs/LICENSE.txt diff --git a/Assets/Fungus/LICENSE.txt.meta b/Assets/Fungus/Docs/LICENSE.txt.meta similarity index 100% rename from Assets/Fungus/LICENSE.txt.meta rename to Assets/Fungus/Docs/LICENSE.txt.meta diff --git a/Assets/Fungus/README.txt b/Assets/Fungus/Docs/README.txt similarity index 100% rename from Assets/Fungus/README.txt rename to Assets/Fungus/Docs/README.txt diff --git a/Assets/Fungus/README.txt.meta b/Assets/Fungus/Docs/README.txt.meta similarity index 100% rename from Assets/Fungus/README.txt.meta rename to Assets/Fungus/Docs/README.txt.meta diff --git a/Assets/Fungus/Flowchart/Editor.meta b/Assets/Fungus/Flowchart/Editor.meta deleted file mode 100644 index 8b7ba371..00000000 --- a/Assets/Fungus/Flowchart/Editor.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: ef11f1c72b929498e835aa270145bf96 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Flowchart/Scripts/Commands.meta b/Assets/Fungus/Flowchart/Scripts/Commands.meta deleted file mode 100644 index 3139697d..00000000 --- a/Assets/Fungus/Flowchart/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: f79fc50442aef4dc7a950abab31ec36a -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers.meta b/Assets/Fungus/Flowchart/Scripts/EventHandlers.meta deleted file mode 100644 index dfa7f822..00000000 --- a/Assets/Fungus/Flowchart/Scripts/EventHandlers.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: cb76d2003b2004cd3ace7c8a0b5fd276 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index f84702ec..a2826a79 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -255,7 +255,7 @@ namespace Fungus if (eventSystem == null) { // Auto spawn an Event System from the prefab - GameObject prefab = Resources.Load("EventSystem"); + GameObject prefab = Resources.Load("Prefabs/EventSystem"); if (prefab != null) { GameObject go = Instantiate(prefab) as GameObject; diff --git a/Assets/Fungus/Flowchart/Sprites.meta b/Assets/Fungus/Flowchart/Sprites.meta deleted file mode 100644 index 31aba49d..00000000 --- a/Assets/Fungus/Flowchart/Sprites.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 95007f6e545624b21a39aa21c579dcee -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Fonts.meta b/Assets/Fungus/Fonts.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts.meta rename to Assets/Fungus/Fonts.meta diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth.meta b/Assets/Fungus/Fonts/Amaranth.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth.meta rename to Assets/Fungus/Fonts/Amaranth.meta diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Bold.otf b/Assets/Fungus/Fonts/Amaranth/Amaranth-Bold.otf similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Bold.otf rename to Assets/Fungus/Fonts/Amaranth/Amaranth-Bold.otf diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Bold.otf.meta b/Assets/Fungus/Fonts/Amaranth/Amaranth-Bold.otf.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Bold.otf.meta rename to Assets/Fungus/Fonts/Amaranth/Amaranth-Bold.otf.meta diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-BoldItalic.otf b/Assets/Fungus/Fonts/Amaranth/Amaranth-BoldItalic.otf similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-BoldItalic.otf rename to Assets/Fungus/Fonts/Amaranth/Amaranth-BoldItalic.otf diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-BoldItalic.otf.meta b/Assets/Fungus/Fonts/Amaranth/Amaranth-BoldItalic.otf.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-BoldItalic.otf.meta rename to Assets/Fungus/Fonts/Amaranth/Amaranth-BoldItalic.otf.meta diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Italic.otf b/Assets/Fungus/Fonts/Amaranth/Amaranth-Italic.otf similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Italic.otf rename to Assets/Fungus/Fonts/Amaranth/Amaranth-Italic.otf diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Italic.otf.meta b/Assets/Fungus/Fonts/Amaranth/Amaranth-Italic.otf.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Italic.otf.meta rename to Assets/Fungus/Fonts/Amaranth/Amaranth-Italic.otf.meta diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Regular.otf b/Assets/Fungus/Fonts/Amaranth/Amaranth-Regular.otf similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Regular.otf rename to Assets/Fungus/Fonts/Amaranth/Amaranth-Regular.otf diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Regular.otf.meta b/Assets/Fungus/Fonts/Amaranth/Amaranth-Regular.otf.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/Amaranth-Regular.otf.meta rename to Assets/Fungus/Fonts/Amaranth/Amaranth-Regular.otf.meta diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/SIL Open Font License.txt b/Assets/Fungus/Fonts/Amaranth/SIL Open Font License.txt similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/SIL Open Font License.txt rename to Assets/Fungus/Fonts/Amaranth/SIL Open Font License.txt diff --git a/Assets/Fungus/Narrative/Fonts/Amaranth/SIL Open Font License.txt.meta b/Assets/Fungus/Fonts/Amaranth/SIL Open Font License.txt.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Amaranth/SIL Open Font License.txt.meta rename to Assets/Fungus/Fonts/Amaranth/SIL Open Font License.txt.meta diff --git a/Assets/Fungus/Narrative/Fonts/Exo2.meta b/Assets/Fungus/Fonts/Exo2.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Exo2.meta rename to Assets/Fungus/Fonts/Exo2.meta diff --git a/Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Bold.ttf b/Assets/Fungus/Fonts/Exo2/Exo2-Bold.ttf similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Bold.ttf rename to Assets/Fungus/Fonts/Exo2/Exo2-Bold.ttf diff --git a/Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Bold.ttf.meta b/Assets/Fungus/Fonts/Exo2/Exo2-Bold.ttf.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Bold.ttf.meta rename to Assets/Fungus/Fonts/Exo2/Exo2-Bold.ttf.meta diff --git a/Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Regular.ttf b/Assets/Fungus/Fonts/Exo2/Exo2-Regular.ttf similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Regular.ttf rename to Assets/Fungus/Fonts/Exo2/Exo2-Regular.ttf diff --git a/Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Regular.ttf.meta b/Assets/Fungus/Fonts/Exo2/Exo2-Regular.ttf.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Exo2/Exo2-Regular.ttf.meta rename to Assets/Fungus/Fonts/Exo2/Exo2-Regular.ttf.meta diff --git a/Assets/Fungus/Narrative/Fonts/Exo2/OFL.txt b/Assets/Fungus/Fonts/Exo2/OFL.txt similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Exo2/OFL.txt rename to Assets/Fungus/Fonts/Exo2/OFL.txt diff --git a/Assets/Fungus/Narrative/Fonts/Exo2/OFL.txt.meta b/Assets/Fungus/Fonts/Exo2/OFL.txt.meta similarity index 100% rename from Assets/Fungus/Narrative/Fonts/Exo2/OFL.txt.meta rename to Assets/Fungus/Fonts/Exo2/OFL.txt.meta diff --git a/Assets/Fungus/Narrative.meta b/Assets/Fungus/Narrative.meta deleted file mode 100644 index f43ca986..00000000 --- a/Assets/Fungus/Narrative.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 382433a04f0cc44d1b777c359b0242a3 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Audio.meta b/Assets/Fungus/Narrative/Audio.meta deleted file mode 100644 index dea8b8de..00000000 --- a/Assets/Fungus/Narrative/Audio.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 6b96d35ab90bb48fc9c41a3a2d147736 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Images.meta b/Assets/Fungus/Narrative/Images.meta deleted file mode 100644 index a924da61..00000000 --- a/Assets/Fungus/Narrative/Images.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: bbcb57c04f3008e4391c6b2866a718fb -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Narrative/Resources.meta b/Assets/Fungus/Narrative/Resources.meta deleted file mode 100644 index 376badf5..00000000 --- a/Assets/Fungus/Narrative/Resources.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 92e86c1e0db8e4ea29c05df76d0cff9e -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Camera/Resources.meta b/Assets/Fungus/Resources.meta similarity index 100% rename from Assets/Fungus/Camera/Resources.meta rename to Assets/Fungus/Resources.meta diff --git a/Assets/Fungus/Flowchart/Editor/Extensions.meta b/Assets/Fungus/Resources/Prefabs.meta similarity index 57% rename from Assets/Fungus/Flowchart/Editor/Extensions.meta rename to Assets/Fungus/Resources/Prefabs.meta index 24881c44..c3723fff 100644 --- a/Assets/Fungus/Flowchart/Editor/Extensions.meta +++ b/Assets/Fungus/Resources/Prefabs.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 895ead76bb3488c4481a5ae7d88c03df +guid: fc921ee1d765948f0b788694e06b4a4a folderAsset: yes -timeCreated: 1462775995 -licenseType: Pro +timeCreated: 1473780677 +licenseType: Free DefaultImporter: userData: assetBundleName: diff --git a/Assets/Fungus/Narrative/Resources/AudioTag.prefab b/Assets/Fungus/Resources/Prefabs/AudioTag.prefab similarity index 93% rename from Assets/Fungus/Narrative/Resources/AudioTag.prefab rename to Assets/Fungus/Resources/Prefabs/AudioTag.prefab index 0d1fcfc5..02afd71a 100644 --- a/Assets/Fungus/Narrative/Resources/AudioTag.prefab +++ b/Assets/Fungus/Resources/Prefabs/AudioTag.prefab @@ -24,8 +24,9 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 177196} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: .0389058143, y: -4.39559603, z: 0} + m_LocalPosition: {x: 0.038905814, y: -4.395596, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -44,6 +45,7 @@ AudioSource: m_Pitch: 1 Loop: 0 Mute: 0 + Spatialize: 0 Priority: 128 DopplerLevel: 1 MinDistance: 1 @@ -68,6 +70,7 @@ AudioSource: tangentMode: 0 m_PreInfinity: 2 m_PostInfinity: 2 + m_RotationOrder: 4 panLevelCustomCurve: serializedVersion: 2 m_Curve: @@ -78,6 +81,7 @@ AudioSource: tangentMode: 0 m_PreInfinity: 2 m_PostInfinity: 2 + m_RotationOrder: 0 spreadCustomCurve: serializedVersion: 2 m_Curve: @@ -88,6 +92,7 @@ AudioSource: tangentMode: 0 m_PreInfinity: 2 m_PostInfinity: 2 + m_RotationOrder: 4 reverbZoneMixCustomCurve: serializedVersion: 2 m_Curve: @@ -98,6 +103,7 @@ AudioSource: tangentMode: 0 m_PreInfinity: 2 m_PostInfinity: 2 + m_RotationOrder: 0 --- !u!114 &11477196 MonoBehaviour: m_ObjectHideFlags: 1 diff --git a/Assets/Fungus/Narrative/Resources/AudioTag.prefab.meta b/Assets/Fungus/Resources/Prefabs/AudioTag.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/AudioTag.prefab.meta rename to Assets/Fungus/Resources/Prefabs/AudioTag.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/Character.prefab b/Assets/Fungus/Resources/Prefabs/Character.prefab similarity index 94% rename from Assets/Fungus/Narrative/Resources/Character.prefab rename to Assets/Fungus/Resources/Prefabs/Character.prefab index a8cafd05..6f3d43f3 100644 --- a/Assets/Fungus/Narrative/Resources/Character.prefab +++ b/Assets/Fungus/Resources/Prefabs/Character.prefab @@ -25,6 +25,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -42,10 +43,10 @@ MonoBehaviour: nameText: Character Name nameColor: {r: 1, g: 1, b: 1, a: 1} soundEffect: {fileID: 0} - profileSprite: {fileID: 0} portraits: [] portraitsFace: 0 - notes: + setSayDialog: {fileID: 0} + description: --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 diff --git a/Assets/Fungus/Narrative/Resources/Character.prefab.meta b/Assets/Fungus/Resources/Prefabs/Character.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/Character.prefab.meta rename to Assets/Fungus/Resources/Prefabs/Character.prefab.meta diff --git a/Assets/Fungus/Sprite/Resources/ClickableSprite.prefab b/Assets/Fungus/Resources/Prefabs/ClickableSprite.prefab similarity index 77% rename from Assets/Fungus/Sprite/Resources/ClickableSprite.prefab rename to Assets/Fungus/Resources/Prefabs/ClickableSprite.prefab index a758bacf..9d8039bc 100644 --- a/Assets/Fungus/Sprite/Resources/ClickableSprite.prefab +++ b/Assets/Fungus/Resources/Prefabs/ClickableSprite.prefab @@ -27,6 +27,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -37,10 +38,13 @@ BoxCollider2D: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 100000} m_Enabled: 1 + m_Density: 1 m_Material: {fileID: 0} m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 m_Size: {x: 3, y: 3} - m_Center: {x: 0, y: 0} --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 1 @@ -53,6 +57,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: clickEnabled: 1 + hoverCursor: {fileID: 0} + useEventSystem: 0 --- !u!212 &21200000 SpriteRenderer: m_ObjectHideFlags: 1 @@ -62,19 +68,30 @@ SpriteRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 m_Materials: - - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_SubsetIndices: m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 1 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 @@ -86,4 +103,3 @@ Prefab: m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 100000} m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/Assets/Fungus/Sprite/Resources/ClickableSprite.prefab.meta b/Assets/Fungus/Resources/Prefabs/ClickableSprite.prefab.meta similarity index 100% rename from Assets/Fungus/Sprite/Resources/ClickableSprite.prefab.meta rename to Assets/Fungus/Resources/Prefabs/ClickableSprite.prefab.meta diff --git a/Assets/Fungus/Sprite/Resources/DragTargetSprite.prefab b/Assets/Fungus/Resources/Prefabs/DragTargetSprite.prefab similarity index 73% rename from Assets/Fungus/Sprite/Resources/DragTargetSprite.prefab rename to Assets/Fungus/Resources/Prefabs/DragTargetSprite.prefab index 278d8785..452249db 100644 --- a/Assets/Fungus/Sprite/Resources/DragTargetSprite.prefab +++ b/Assets/Fungus/Resources/Prefabs/DragTargetSprite.prefab @@ -24,8 +24,9 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 100000} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -8.60999966, y: -4.46999979, z: 0} + m_LocalPosition: {x: -8.61, y: -4.47, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -36,10 +37,13 @@ CircleCollider2D: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 100000} m_Enabled: 1 + m_Density: 1 m_Material: {fileID: 0} m_IsTrigger: 0 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 m_Radius: 1.5 - m_Center: {x: 0, y: 0} --- !u!212 &21200000 SpriteRenderer: m_ObjectHideFlags: 1 @@ -49,19 +53,30 @@ SpriteRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 m_Materials: - - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_SubsetIndices: m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 1 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 @@ -73,4 +88,3 @@ Prefab: m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 100000} m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/Assets/Fungus/Sprite/Resources/DragTargetSprite.prefab.meta b/Assets/Fungus/Resources/Prefabs/DragTargetSprite.prefab.meta similarity index 100% rename from Assets/Fungus/Sprite/Resources/DragTargetSprite.prefab.meta rename to Assets/Fungus/Resources/Prefabs/DragTargetSprite.prefab.meta diff --git a/Assets/Fungus/Sprite/Resources/DraggableSprite.prefab b/Assets/Fungus/Resources/Prefabs/DraggableSprite.prefab similarity index 75% rename from Assets/Fungus/Sprite/Resources/DraggableSprite.prefab rename to Assets/Fungus/Resources/Prefabs/DraggableSprite.prefab index 444f18eb..106fd6a4 100644 --- a/Assets/Fungus/Sprite/Resources/DraggableSprite.prefab +++ b/Assets/Fungus/Resources/Prefabs/DraggableSprite.prefab @@ -26,26 +26,29 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 100000} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -.730000019, y: .360000014, z: 0} + m_LocalPosition: {x: -0.73, y: 0.36, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 --- !u!50 &5000000 Rigidbody2D: + serializedVersion: 2 m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 100000} + m_UseAutoMass: 0 m_Mass: 1 m_LinearDrag: 0 - m_AngularDrag: .0500000007 + m_AngularDrag: 0.05 m_GravityScale: 1 - m_FixedAngle: 0 m_IsKinematic: 1 m_Interpolate: 0 m_SleepingMode: 1 m_CollisionDetection: 0 + m_Constraints: 0 --- !u!61 &6100000 BoxCollider2D: m_ObjectHideFlags: 1 @@ -53,10 +56,13 @@ BoxCollider2D: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 100000} m_Enabled: 1 + m_Density: 1 m_Material: {fileID: 0} m_IsTrigger: 1 + m_UsedByEffector: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 m_Size: {x: 3, y: 3} - m_Center: {x: 0, y: 0} --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 1 @@ -69,8 +75,11 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: dragEnabled: 1 - returnToStartPos: 1 + returnOnCancelled: 1 + returnOnCompleted: 1 returnDuration: 1 + hoverCursor: {fileID: 0} + useEventSystem: 0 --- !u!212 &21200000 SpriteRenderer: m_ObjectHideFlags: 1 @@ -80,19 +89,30 @@ SpriteRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 m_Materials: - - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_SubsetIndices: m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 1 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 @@ -104,4 +124,3 @@ Prefab: m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 100000} m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/Assets/Fungus/Sprite/Resources/DraggableSprite.prefab.meta b/Assets/Fungus/Resources/Prefabs/DraggableSprite.prefab.meta similarity index 100% rename from Assets/Fungus/Sprite/Resources/DraggableSprite.prefab.meta rename to Assets/Fungus/Resources/Prefabs/DraggableSprite.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/EventSystem.prefab b/Assets/Fungus/Resources/Prefabs/EventSystem.prefab similarity index 95% rename from Assets/Fungus/Narrative/Resources/EventSystem.prefab rename to Assets/Fungus/Resources/Prefabs/EventSystem.prefab index aac0491e..0338c552 100644 --- a/Assets/Fungus/Narrative/Resources/EventSystem.prefab +++ b/Assets/Fungus/Resources/Prefabs/EventSystem.prefab @@ -27,6 +27,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -60,7 +61,8 @@ MonoBehaviour: m_SubmitButton: Submit m_CancelButton: Cancel m_InputActionsPerSecond: 10 - m_AllowActivationOnMobileDevice: 0 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 --- !u!114 &11479528 MonoBehaviour: m_ObjectHideFlags: 1 @@ -72,7 +74,7 @@ MonoBehaviour: m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_AllowActivationOnStandalone: 0 + m_ForceModuleActive: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 diff --git a/Assets/Fungus/Narrative/Resources/EventSystem.prefab.meta b/Assets/Fungus/Resources/Prefabs/EventSystem.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/EventSystem.prefab.meta rename to Assets/Fungus/Resources/Prefabs/EventSystem.prefab.meta diff --git a/Assets/Fungus/Flowchart/Resources/Flowchart.prefab b/Assets/Fungus/Resources/Prefabs/Flowchart.prefab similarity index 94% rename from Assets/Fungus/Flowchart/Resources/Flowchart.prefab rename to Assets/Fungus/Resources/Prefabs/Flowchart.prefab index 41f918bb..b46f5b85 100644 --- a/Assets/Fungus/Flowchart/Resources/Flowchart.prefab +++ b/Assets/Fungus/Resources/Prefabs/Flowchart.prefab @@ -27,6 +27,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -41,7 +42,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} m_Name: m_EditorClassIdentifier: - version: 1.0 + version: 1 scrollPos: {x: 0, y: 0} variablesScrollPos: {x: 0, y: 0} variablesExpanded: 1 @@ -62,10 +63,13 @@ MonoBehaviour: hideComponents: 1 saveSelection: 1 localizationId: + showLineNumbers: 0 hideCommands: [] + luaEnvironment: {fileID: 0} + luaBindingName: flowchart --- !u!114 &11433304 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 142980} @@ -87,7 +91,7 @@ MonoBehaviour: commandList: [] --- !u!114 &11462346 MonoBehaviour: - m_ObjectHideFlags: 1 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 142980} diff --git a/Assets/Fungus/Flowchart/Resources/Flowchart.prefab.meta b/Assets/Fungus/Resources/Prefabs/Flowchart.prefab.meta similarity index 100% rename from Assets/Fungus/Flowchart/Resources/Flowchart.prefab.meta rename to Assets/Fungus/Resources/Prefabs/Flowchart.prefab.meta diff --git a/Assets/Fungus/Flowchart/Resources/FungusLogo.prefab b/Assets/Fungus/Resources/Prefabs/FungusLogo.prefab similarity index 80% rename from Assets/Fungus/Flowchart/Resources/FungusLogo.prefab rename to Assets/Fungus/Resources/Prefabs/FungusLogo.prefab index ad135c98..f9b7741c 100644 --- a/Assets/Fungus/Flowchart/Resources/FungusLogo.prefab +++ b/Assets/Fungus/Resources/Prefabs/FungusLogo.prefab @@ -41,6 +41,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 454942} m_Father: {fileID: 0} @@ -52,8 +53,9 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 181890} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: .479999989, y: 2.01999998, z: 0} + m_LocalPosition: {x: 0.48, y: 2.02, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 406310} m_RootOrder: 0 @@ -66,23 +68,30 @@ SpriteRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 m_Materials: - - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_SubsetIndices: m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 0 m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 + m_SelectedWireframeHidden: 1 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 1b656a189e6154422a74e05a56c3f245, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 --- !u!212 &21226848 SpriteRenderer: m_ObjectHideFlags: 1 @@ -92,23 +101,30 @@ SpriteRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 m_Materials: - - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_SubsetIndices: m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 0 m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 + m_SelectedWireframeHidden: 1 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 7adcbbe62d6554d81affcab2c56ad5ac, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 diff --git a/Assets/Fungus/Flowchart/Resources/FungusLogo.prefab.meta b/Assets/Fungus/Resources/Prefabs/FungusLogo.prefab.meta similarity index 100% rename from Assets/Fungus/Flowchart/Resources/FungusLogo.prefab.meta rename to Assets/Fungus/Resources/Prefabs/FungusLogo.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/Localization.prefab b/Assets/Fungus/Resources/Prefabs/Localization.prefab similarity index 93% rename from Assets/Fungus/Narrative/Resources/Localization.prefab rename to Assets/Fungus/Resources/Prefabs/Localization.prefab index c9845980..570bbadf 100644 --- a/Assets/Fungus/Narrative/Resources/Localization.prefab +++ b/Assets/Fungus/Resources/Prefabs/Localization.prefab @@ -23,8 +23,9 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 149266} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2.05546069, y: -3.16485739, z: 0} + m_LocalPosition: {x: 2.0554607, y: -3.1648574, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 diff --git a/Assets/Fungus/Narrative/Resources/Localization.prefab.meta b/Assets/Fungus/Resources/Prefabs/Localization.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/Localization.prefab.meta rename to Assets/Fungus/Resources/Prefabs/Localization.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/MenuDialog.prefab b/Assets/Fungus/Resources/Prefabs/MenuDialog.prefab similarity index 97% rename from Assets/Fungus/Narrative/Resources/MenuDialog.prefab rename to Assets/Fungus/Resources/Prefabs/MenuDialog.prefab index bed0c56e..e7bf7e82 100644 --- a/Assets/Fungus/Narrative/Resources/MenuDialog.prefab +++ b/Assets/Fungus/Resources/Prefabs/MenuDialog.prefab @@ -399,7 +399,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -794,7 +794,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -821,7 +821,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -1034,7 +1034,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -1061,7 +1061,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -1274,7 +1274,7 @@ MonoBehaviour: m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_Color: {r: 1, g: 1, b: 1, a: 0.8627451} m_RaycastTarget: 1 m_OnCullStateChanged: @@ -1402,6 +1402,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22415120} m_Father: {fileID: 22415112} @@ -1420,6 +1421,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22470986} - {fileID: 22415112} @@ -1439,6 +1441,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.9, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22415116} m_Father: {fileID: 22415112} @@ -1457,6 +1460,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22472126} - {fileID: 22472120} @@ -1481,6 +1485,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22415122} m_Father: {fileID: 22415108} @@ -1499,6 +1504,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22415094} m_RootOrder: 0 @@ -1516,6 +1522,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22415116} m_RootOrder: 0 @@ -1533,6 +1540,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22415102} m_RootOrder: 0 @@ -1550,6 +1558,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22472110} m_RootOrder: 0 @@ -1567,6 +1576,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22472108} m_Father: {fileID: 22415112} @@ -1585,6 +1595,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22472114} m_Father: {fileID: 22415112} @@ -1603,6 +1614,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22472112} m_RootOrder: 0 @@ -1620,6 +1632,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22472118} m_RootOrder: 0 @@ -1637,6 +1650,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22472116} m_Father: {fileID: 22415112} @@ -1655,6 +1669,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22472122} m_Father: {fileID: 22415112} @@ -1673,6 +1688,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22472120} m_RootOrder: 0 @@ -1690,6 +1706,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22472126} m_RootOrder: 0 @@ -1707,6 +1724,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22472124} m_Father: {fileID: 22415112} diff --git a/Assets/Fungus/Narrative/Resources/MenuDialog.prefab.meta b/Assets/Fungus/Resources/Prefabs/MenuDialog.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/MenuDialog.prefab.meta rename to Assets/Fungus/Resources/Prefabs/MenuDialog.prefab.meta diff --git a/Assets/Fungus/Sprite/Resources/ParallaxSprite.prefab b/Assets/Fungus/Resources/Prefabs/ParallaxSprite.prefab similarity index 77% rename from Assets/Fungus/Sprite/Resources/ParallaxSprite.prefab rename to Assets/Fungus/Resources/Prefabs/ParallaxSprite.prefab index 6d22c99b..80469ba8 100644 --- a/Assets/Fungus/Sprite/Resources/ParallaxSprite.prefab +++ b/Assets/Fungus/Resources/Prefabs/ParallaxSprite.prefab @@ -26,6 +26,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -41,8 +42,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: backgroundSprite: {fileID: 0} - parallaxScale: {x: .25, y: 0} - accelerometerScale: .5 + parallaxScale: {x: 0.25, y: 0} + accelerometerScale: 0.5 --- !u!212 &21200000 SpriteRenderer: m_ObjectHideFlags: 1 @@ -52,19 +53,30 @@ SpriteRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 m_Materials: - - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_SubsetIndices: m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 1 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingOrder: 1 m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 @@ -76,4 +88,3 @@ Prefab: m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 100000} m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/Assets/Fungus/Sprite/Resources/ParallaxSprite.prefab.meta b/Assets/Fungus/Resources/Prefabs/ParallaxSprite.prefab.meta similarity index 100% rename from Assets/Fungus/Sprite/Resources/ParallaxSprite.prefab.meta rename to Assets/Fungus/Resources/Prefabs/ParallaxSprite.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/SayDialog.prefab b/Assets/Fungus/Resources/Prefabs/SayDialog.prefab similarity index 100% rename from Assets/Fungus/Narrative/Resources/SayDialog.prefab rename to Assets/Fungus/Resources/Prefabs/SayDialog.prefab diff --git a/Assets/Fungus/Narrative/Resources/SayDialog.prefab.meta b/Assets/Fungus/Resources/Prefabs/SayDialog.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/SayDialog.prefab.meta rename to Assets/Fungus/Resources/Prefabs/SayDialog.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/Stage.prefab b/Assets/Fungus/Resources/Prefabs/Stage.prefab similarity index 97% rename from Assets/Fungus/Narrative/Resources/Stage.prefab rename to Assets/Fungus/Resources/Prefabs/Stage.prefab index 8e9e03d8..9b66d215 100644 --- a/Assets/Fungus/Narrative/Resources/Stage.prefab +++ b/Assets/Fungus/Resources/Prefabs/Stage.prefab @@ -129,6 +129,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22410274} m_Father: {fileID: 0} @@ -203,7 +204,6 @@ MonoBehaviour: fadeDuration: 0.75 moveDuration: 1 fadeEaseType: 4 - moveEaseType: 4 shiftOffset: {x: 0, y: 0} defaultPosition: {fileID: 11410280} positions: @@ -212,7 +212,6 @@ MonoBehaviour: - {fileID: 22410270} - {fileID: 22410272} - {fileID: 22410278} - charactersOnStage: [] --- !u!114 &11410276 MonoBehaviour: m_ObjectHideFlags: 1 @@ -376,6 +375,7 @@ Canvas: m_ReceivesEvents: 1 m_OverrideSorting: 0 m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 @@ -388,6 +388,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22410274} m_RootOrder: 2 @@ -405,6 +406,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22410274} m_RootOrder: 3 @@ -422,6 +424,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 22410276} - {fileID: 22410280} @@ -444,6 +447,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22410274} m_RootOrder: 0 @@ -461,6 +465,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22410274} m_RootOrder: 4 @@ -478,6 +483,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 22410274} m_RootOrder: 1 diff --git a/Assets/Fungus/Narrative/Resources/Stage.prefab.meta b/Assets/Fungus/Resources/Prefabs/Stage.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/Stage.prefab.meta rename to Assets/Fungus/Resources/Prefabs/Stage.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/StagePosition.prefab b/Assets/Fungus/Resources/Prefabs/StagePosition.prefab similarity index 79% rename from Assets/Fungus/Narrative/Resources/StagePosition.prefab rename to Assets/Fungus/Resources/Prefabs/StagePosition.prefab index 7e06ffd3..c8cf1795 100644 --- a/Assets/Fungus/Narrative/Resources/StagePosition.prefab +++ b/Assets/Fungus/Resources/Prefabs/StagePosition.prefab @@ -30,6 +30,12 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} m_Type: 0 m_PreserveAspect: 1 @@ -52,15 +58,16 @@ RectTransform: m_GameObject: {fileID: 195640} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 2.31660223, y: 2.31660223, z: 2.31660223} + m_LocalScale: {x: 2.3166022, y: 2.3166022, z: 2.3166022} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 - m_AnchorMin: {x: .5, y: 0} - m_AnchorMax: {x: .5, y: 0} - m_AnchoredPosition: {x: -590.733398, y: 483.453583} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: -590.7334, y: 483.45358} m_SizeDelta: {x: 1000, y: 1000} - m_Pivot: {x: .5, y: 0} + m_Pivot: {x: 0.5, y: 0} --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 diff --git a/Assets/Fungus/Narrative/Resources/StagePosition.prefab.meta b/Assets/Fungus/Resources/Prefabs/StagePosition.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/StagePosition.prefab.meta rename to Assets/Fungus/Resources/Prefabs/StagePosition.prefab.meta diff --git a/Assets/Fungus/Narrative/Resources/Tag.prefab b/Assets/Fungus/Resources/Prefabs/Tag.prefab similarity index 97% rename from Assets/Fungus/Narrative/Resources/Tag.prefab rename to Assets/Fungus/Resources/Prefabs/Tag.prefab index b04de67f..21e8fd3d 100644 --- a/Assets/Fungus/Narrative/Resources/Tag.prefab +++ b/Assets/Fungus/Resources/Prefabs/Tag.prefab @@ -25,6 +25,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 diff --git a/Assets/Fungus/Narrative/Resources/Tag.prefab.meta b/Assets/Fungus/Resources/Prefabs/Tag.prefab.meta similarity index 100% rename from Assets/Fungus/Narrative/Resources/Tag.prefab.meta rename to Assets/Fungus/Resources/Prefabs/Tag.prefab.meta diff --git a/Assets/Fungus/Camera/Resources/View.prefab b/Assets/Fungus/Resources/Prefabs/View.prefab similarity index 97% rename from Assets/Fungus/Camera/Resources/View.prefab rename to Assets/Fungus/Resources/Prefabs/View.prefab index 84748832..d4f6a3b6 100644 --- a/Assets/Fungus/Camera/Resources/View.prefab +++ b/Assets/Fungus/Resources/Prefabs/View.prefab @@ -25,6 +25,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 diff --git a/Assets/Fungus/Camera/Resources/View.prefab.meta b/Assets/Fungus/Resources/Prefabs/View.prefab.meta similarity index 100% rename from Assets/Fungus/Camera/Resources/View.prefab.meta rename to Assets/Fungus/Resources/Prefabs/View.prefab.meta diff --git a/Assets/Fungus/Resources/Sprites.meta b/Assets/Fungus/Resources/Sprites.meta new file mode 100644 index 00000000..14ca07e3 --- /dev/null +++ b/Assets/Fungus/Resources/Sprites.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 32f062c580ee140fdb01e9a7354fd1dc +folderAsset: yes +timeCreated: 1473780777 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Sprite/Sprites/Background.png b/Assets/Fungus/Resources/Sprites/Background.png similarity index 100% rename from Assets/Fungus/Sprite/Sprites/Background.png rename to Assets/Fungus/Resources/Sprites/Background.png diff --git a/Assets/Fungus/Sprite/Sprites/Background.png.meta b/Assets/Fungus/Resources/Sprites/Background.png.meta similarity index 100% rename from Assets/Fungus/Sprite/Sprites/Background.png.meta rename to Assets/Fungus/Resources/Sprites/Background.png.meta diff --git a/Assets/Fungus/Sprite/Sprites/HandPointer.png b/Assets/Fungus/Resources/Sprites/HandPointer.png similarity index 100% rename from Assets/Fungus/Sprite/Sprites/HandPointer.png rename to Assets/Fungus/Resources/Sprites/HandPointer.png diff --git a/Assets/Fungus/Sprite/Sprites/HandPointer.png.meta b/Assets/Fungus/Resources/Sprites/HandPointer.png.meta similarity index 100% rename from Assets/Fungus/Sprite/Sprites/HandPointer.png.meta rename to Assets/Fungus/Resources/Sprites/HandPointer.png.meta diff --git a/Assets/Fungus/Sprite/Sprites/MousePointer.png b/Assets/Fungus/Resources/Sprites/MousePointer.png similarity index 100% rename from Assets/Fungus/Sprite/Sprites/MousePointer.png rename to Assets/Fungus/Resources/Sprites/MousePointer.png diff --git a/Assets/Fungus/Sprite/Sprites/MousePointer.png.meta b/Assets/Fungus/Resources/Sprites/MousePointer.png.meta similarity index 100% rename from Assets/Fungus/Sprite/Sprites/MousePointer.png.meta rename to Assets/Fungus/Resources/Sprites/MousePointer.png.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Break.cs b/Assets/Fungus/Scripts/Commands/Break.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Break.cs rename to Assets/Fungus/Scripts/Commands/Break.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Break.cs.meta b/Assets/Fungus/Scripts/Commands/Break.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Break.cs.meta rename to Assets/Fungus/Scripts/Commands/Break.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Call.cs b/Assets/Fungus/Scripts/Commands/Call.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Call.cs rename to Assets/Fungus/Scripts/Commands/Call.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Call.cs.meta b/Assets/Fungus/Scripts/Commands/Call.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Call.cs.meta rename to Assets/Fungus/Scripts/Commands/Call.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs b/Assets/Fungus/Scripts/Commands/CallMethod.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs rename to Assets/Fungus/Scripts/Commands/CallMethod.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs.meta b/Assets/Fungus/Scripts/Commands/CallMethod.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs.meta rename to Assets/Fungus/Scripts/Commands/CallMethod.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs b/Assets/Fungus/Scripts/Commands/Comment.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs rename to Assets/Fungus/Scripts/Commands/Comment.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs.meta b/Assets/Fungus/Scripts/Commands/Comment.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs.meta rename to Assets/Fungus/Scripts/Commands/Comment.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs b/Assets/Fungus/Scripts/Commands/Condition.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs rename to Assets/Fungus/Scripts/Commands/Condition.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs.meta b/Assets/Fungus/Scripts/Commands/Condition.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs.meta rename to Assets/Fungus/Scripts/Commands/Condition.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs b/Assets/Fungus/Scripts/Commands/DebugLog.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs rename to Assets/Fungus/Scripts/Commands/DebugLog.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs.meta b/Assets/Fungus/Scripts/Commands/DebugLog.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs.meta rename to Assets/Fungus/Scripts/Commands/DebugLog.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs b/Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs rename to Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs.meta b/Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs.meta rename to Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs b/Assets/Fungus/Scripts/Commands/Destroy.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs rename to Assets/Fungus/Scripts/Commands/Destroy.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs.meta b/Assets/Fungus/Scripts/Commands/Destroy.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs.meta rename to Assets/Fungus/Scripts/Commands/Destroy.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs b/Assets/Fungus/Scripts/Commands/Else.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Else.cs rename to Assets/Fungus/Scripts/Commands/Else.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs.meta b/Assets/Fungus/Scripts/Commands/Else.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Else.cs.meta rename to Assets/Fungus/Scripts/Commands/Else.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs b/Assets/Fungus/Scripts/Commands/ElseIf.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs rename to Assets/Fungus/Scripts/Commands/ElseIf.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs.meta b/Assets/Fungus/Scripts/Commands/ElseIf.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs.meta rename to Assets/Fungus/Scripts/Commands/ElseIf.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/End.cs b/Assets/Fungus/Scripts/Commands/End.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/End.cs rename to Assets/Fungus/Scripts/Commands/End.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/End.cs.meta b/Assets/Fungus/Scripts/Commands/End.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/End.cs.meta rename to Assets/Fungus/Scripts/Commands/End.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/If.cs b/Assets/Fungus/Scripts/Commands/If.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/If.cs rename to Assets/Fungus/Scripts/Commands/If.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/If.cs.meta b/Assets/Fungus/Scripts/Commands/If.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/If.cs.meta rename to Assets/Fungus/Scripts/Commands/If.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs b/Assets/Fungus/Scripts/Commands/InvokeEvent.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs rename to Assets/Fungus/Scripts/Commands/InvokeEvent.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs.meta b/Assets/Fungus/Scripts/Commands/InvokeEvent.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs.meta rename to Assets/Fungus/Scripts/Commands/InvokeEvent.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs b/Assets/Fungus/Scripts/Commands/InvokeMethod.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs rename to Assets/Fungus/Scripts/Commands/InvokeMethod.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs.meta b/Assets/Fungus/Scripts/Commands/InvokeMethod.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs.meta rename to Assets/Fungus/Scripts/Commands/InvokeMethod.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs b/Assets/Fungus/Scripts/Commands/Jump.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs rename to Assets/Fungus/Scripts/Commands/Jump.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs.meta b/Assets/Fungus/Scripts/Commands/Jump.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs.meta rename to Assets/Fungus/Scripts/Commands/Jump.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Label.cs b/Assets/Fungus/Scripts/Commands/Label.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Label.cs rename to Assets/Fungus/Scripts/Commands/Label.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Label.cs.meta b/Assets/Fungus/Scripts/Commands/Label.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Label.cs.meta rename to Assets/Fungus/Scripts/Commands/Label.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs b/Assets/Fungus/Scripts/Commands/LoadScene.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs rename to Assets/Fungus/Scripts/Commands/LoadScene.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs.meta b/Assets/Fungus/Scripts/Commands/LoadScene.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs.meta rename to Assets/Fungus/Scripts/Commands/LoadScene.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs b/Assets/Fungus/Scripts/Commands/LoadVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs rename to Assets/Fungus/Scripts/Commands/LoadVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs.meta b/Assets/Fungus/Scripts/Commands/LoadVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs.meta rename to Assets/Fungus/Scripts/Commands/LoadVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs b/Assets/Fungus/Scripts/Commands/OpenURL.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs rename to Assets/Fungus/Scripts/Commands/OpenURL.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs.meta b/Assets/Fungus/Scripts/Commands/OpenURL.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs.meta rename to Assets/Fungus/Scripts/Commands/OpenURL.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs b/Assets/Fungus/Scripts/Commands/Quit.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs rename to Assets/Fungus/Scripts/Commands/Quit.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs.meta b/Assets/Fungus/Scripts/Commands/Quit.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs.meta rename to Assets/Fungus/Scripts/Commands/Quit.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs b/Assets/Fungus/Scripts/Commands/RandomFloat.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs rename to Assets/Fungus/Scripts/Commands/RandomFloat.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs.meta b/Assets/Fungus/Scripts/Commands/RandomFloat.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs.meta rename to Assets/Fungus/Scripts/Commands/RandomFloat.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs b/Assets/Fungus/Scripts/Commands/RandomInteger.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs rename to Assets/Fungus/Scripts/Commands/RandomInteger.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs.meta b/Assets/Fungus/Scripts/Commands/RandomInteger.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs.meta rename to Assets/Fungus/Scripts/Commands/RandomInteger.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs b/Assets/Fungus/Scripts/Commands/ReadTextFile.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs rename to Assets/Fungus/Scripts/Commands/ReadTextFile.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs.meta b/Assets/Fungus/Scripts/Commands/ReadTextFile.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs.meta rename to Assets/Fungus/Scripts/Commands/ReadTextFile.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs b/Assets/Fungus/Scripts/Commands/Reset.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs rename to Assets/Fungus/Scripts/Commands/Reset.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs.meta b/Assets/Fungus/Scripts/Commands/Reset.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs.meta rename to Assets/Fungus/Scripts/Commands/Reset.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs b/Assets/Fungus/Scripts/Commands/SaveVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs rename to Assets/Fungus/Scripts/Commands/SaveVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs.meta b/Assets/Fungus/Scripts/Commands/SaveVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs.meta rename to Assets/Fungus/Scripts/Commands/SaveVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs b/Assets/Fungus/Scripts/Commands/SendMessage.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs rename to Assets/Fungus/Scripts/Commands/SendMessage.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs.meta b/Assets/Fungus/Scripts/Commands/SendMessage.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs.meta rename to Assets/Fungus/Scripts/Commands/SendMessage.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs b/Assets/Fungus/Scripts/Commands/SetActive.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs rename to Assets/Fungus/Scripts/Commands/SetActive.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs.meta b/Assets/Fungus/Scripts/Commands/SetActive.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs.meta rename to Assets/Fungus/Scripts/Commands/SetActive.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs b/Assets/Fungus/Scripts/Commands/SetSaveProfile.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs rename to Assets/Fungus/Scripts/Commands/SetSaveProfile.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs.meta b/Assets/Fungus/Scripts/Commands/SetSaveProfile.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs.meta rename to Assets/Fungus/Scripts/Commands/SetSaveProfile.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs b/Assets/Fungus/Scripts/Commands/SetVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs rename to Assets/Fungus/Scripts/Commands/SetVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs.meta b/Assets/Fungus/Scripts/Commands/SetVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs.meta rename to Assets/Fungus/Scripts/Commands/SetVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs b/Assets/Fungus/Scripts/Commands/SpawnObject.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs rename to Assets/Fungus/Scripts/Commands/SpawnObject.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs.meta b/Assets/Fungus/Scripts/Commands/SpawnObject.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs.meta rename to Assets/Fungus/Scripts/Commands/SpawnObject.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs b/Assets/Fungus/Scripts/Commands/Stop.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs rename to Assets/Fungus/Scripts/Commands/Stop.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs.meta b/Assets/Fungus/Scripts/Commands/Stop.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs.meta rename to Assets/Fungus/Scripts/Commands/Stop.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs b/Assets/Fungus/Scripts/Commands/StopBlock.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs rename to Assets/Fungus/Scripts/Commands/StopBlock.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs.meta b/Assets/Fungus/Scripts/Commands/StopBlock.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs.meta rename to Assets/Fungus/Scripts/Commands/StopBlock.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs b/Assets/Fungus/Scripts/Commands/StopFlowchart.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs rename to Assets/Fungus/Scripts/Commands/StopFlowchart.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs.meta b/Assets/Fungus/Scripts/Commands/StopFlowchart.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs.meta rename to Assets/Fungus/Scripts/Commands/StopFlowchart.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs b/Assets/Fungus/Scripts/Commands/Wait.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs rename to Assets/Fungus/Scripts/Commands/Wait.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs.meta b/Assets/Fungus/Scripts/Commands/Wait.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs.meta rename to Assets/Fungus/Scripts/Commands/Wait.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/While.cs b/Assets/Fungus/Scripts/Commands/While.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/While.cs rename to Assets/Fungus/Scripts/Commands/While.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/While.cs.meta b/Assets/Fungus/Scripts/Commands/While.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Commands/While.cs.meta rename to Assets/Fungus/Scripts/Commands/While.cs.meta diff --git a/Assets/Fungus/Scripts/Components/DialogInput.cs b/Assets/Fungus/Scripts/Components/DialogInput.cs index 872b7dfd..e8902ea4 100644 --- a/Assets/Fungus/Scripts/Components/DialogInput.cs +++ b/Assets/Fungus/Scripts/Components/DialogInput.cs @@ -51,7 +51,7 @@ namespace Fungus if (EventSystem.current == null) { // Auto spawn an Event System from the prefab - GameObject prefab = Resources.Load("EventSystem"); + GameObject prefab = Resources.Load("Prefabs/EventSystem"); if (prefab != null) { GameObject go = Instantiate(prefab) as GameObject; diff --git a/Assets/Fungus/Scripts/Components/LuaExtensions.cs b/Assets/Fungus/Scripts/Components/LuaExtensions.cs new file mode 100644 index 00000000..37034833 --- /dev/null +++ b/Assets/Fungus/Scripts/Components/LuaExtensions.cs @@ -0,0 +1,99 @@ +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; +using UnityEngine.UI; +using System.Collections; +using Fungus; +using MoonSharp.Interpreter; + +namespace Fungus +{ + public static class LuaExtensions + { + /// + /// Extension for MenuDialog that allows AddOption to call a Lua function when an option is selected. + /// + public static bool AddOption(this MenuDialog menuDialog, string text, bool interactable, ILuaEnvironment luaEnv, Closure callBack) + { + if (!menuDialog.gameObject.activeSelf) + { + menuDialog.gameObject.SetActive(true); + } + + bool addedOption = false; + foreach (Button button in menuDialog.CachedButtons) + { + if (!button.gameObject.activeSelf) + { + button.gameObject.SetActive(true); + + button.interactable = interactable; + + Text textComponent = button.GetComponentInChildren(); + if (textComponent != null) + { + textComponent.text = text; + } + + button.onClick.AddListener(delegate { + + menuDialog.StopAllCoroutines(); // Stop timeout + menuDialog.Clear(); + menuDialog.HideSayDialog(); + + if (callBack != null) + { + luaEnv.RunLuaFunction(callBack, true); + } + }); + + addedOption = true; + break; + } + } + + return addedOption; + } + + /// + /// Extension for MenuDialog that allows ShowTimer to call a Lua function when the timer expires. + /// + public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, ILuaEnvironment luaEnv, Closure callBack) + { + if (menuDialog.CachedSlider == null || + duration <= 0f) + { + yield break; + } + + menuDialog.CachedSlider.gameObject.SetActive(true); + menuDialog.StopAllCoroutines(); + + float elapsedTime = 0; + Slider timeoutSlider = menuDialog.GetComponentInChildren(); + + while (elapsedTime < duration) + { + if (timeoutSlider != null) + { + float t = 1f - elapsedTime / duration; + timeoutSlider.value = t; + } + + elapsedTime += Time.deltaTime; + + yield return null; + } + + menuDialog.Clear(); + menuDialog.gameObject.SetActive(false); + menuDialog.HideSayDialog(); + + if (callBack != null) + { + luaEnv.RunLuaFunction(callBack, true); + } + } + } +} diff --git a/Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta b/Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta new file mode 100644 index 00000000..28946979 --- /dev/null +++ b/Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 998f811805a17465ba6720248632ec01 +timeCreated: 1459502744 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: + diff --git a/Assets/Fungus/Scripts/Components/MenuDialog.cs b/Assets/Fungus/Scripts/Components/MenuDialog.cs index 53e07209..7cb3cd74 100644 --- a/Assets/Fungus/Scripts/Components/MenuDialog.cs +++ b/Assets/Fungus/Scripts/Components/MenuDialog.cs @@ -35,7 +35,7 @@ namespace Fungus if (activeMenuDialog == null) { // Auto spawn a menu dialog object from the prefab - GameObject prefab = Resources.Load("MenuDialog"); + GameObject prefab = Resources.Load("Prefabs/MenuDialog"); if (prefab != null) { GameObject go = Instantiate(prefab) as GameObject; diff --git a/Assets/Fungus/Scripts/Components/SayDialog.cs b/Assets/Fungus/Scripts/Components/SayDialog.cs index 5f7923ee..d7ebeb43 100644 --- a/Assets/Fungus/Scripts/Components/SayDialog.cs +++ b/Assets/Fungus/Scripts/Components/SayDialog.cs @@ -69,7 +69,7 @@ namespace Fungus if (activeSayDialog == null) { // Auto spawn a say dialog object from the prefab - GameObject prefab = Resources.Load("SayDialog"); + GameObject prefab = Resources.Load("Prefabs/SayDialog"); if (prefab != null) { GameObject go = Instantiate(prefab) as GameObject; @@ -158,39 +158,6 @@ namespace Fungus } } - protected virtual IEnumerator SayInternal(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, Action onComplete) - { - IWriter writer = GetWriter(); - - if (writer.IsWriting || writer.IsWaitingForInput) - { - writer.Stop(); - while (writer.IsWriting || writer.IsWaitingForInput) - { - yield return null; - } - } - - gameObject.SetActive(true); - - this.fadeWhenDone = fadeWhenDone; - - // Voice over clip takes precedence over a character sound effect if provided - - AudioClip soundEffectClip = null; - if (voiceOverClip != null) - { - WriterAudio writerAudio = GetWriterAudio(); - writerAudio.OnVoiceover(voiceOverClip); - } - else if (speakingCharacter != null) - { - soundEffectClip = speakingCharacter.SoundEffect; - } - - yield return StartCoroutine(writer.Write(text, clearPrevious, waitForInput, stopVoiceover, soundEffectClip, onComplete)); - } - protected virtual void LateUpdate() { UpdateAlpha(); @@ -400,7 +367,40 @@ namespace Fungus public virtual void Say(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, Action onComplete) { - StartCoroutine(SayInternal(text, clearPrevious, waitForInput, fadeWhenDone, stopVoiceover, voiceOverClip, onComplete)); + StartCoroutine(DoSay(text, clearPrevious, waitForInput, fadeWhenDone, stopVoiceover, voiceOverClip, onComplete)); + } + + public virtual IEnumerator DoSay(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, Action onComplete) + { + IWriter writer = GetWriter(); + + if (writer.IsWriting || writer.IsWaitingForInput) + { + writer.Stop(); + while (writer.IsWriting || writer.IsWaitingForInput) + { + yield return null; + } + } + + gameObject.SetActive(true); + + this.fadeWhenDone = fadeWhenDone; + + // Voice over clip takes precedence over a character sound effect if provided + + AudioClip soundEffectClip = null; + if (voiceOverClip != null) + { + WriterAudio writerAudio = GetWriterAudio(); + writerAudio.OnVoiceover(voiceOverClip); + } + else if (speakingCharacter != null) + { + soundEffectClip = speakingCharacter.SoundEffect; + } + + yield return StartCoroutine(writer.Write(text, clearPrevious, waitForInput, stopVoiceover, soundEffectClip, onComplete)); } public virtual bool FadeWhenDone { set { fadeWhenDone = value; } } diff --git a/Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs b/Assets/Fungus/Scripts/Editor/AssetModProcessor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs rename to Assets/Fungus/Scripts/Editor/AssetModProcessor.cs diff --git a/Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs.meta b/Assets/Fungus/Scripts/Editor/AssetModProcessor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs.meta rename to Assets/Fungus/Scripts/Editor/AssetModProcessor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/BlockEditor.cs rename to Assets/Fungus/Scripts/Editor/BlockEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs.meta b/Assets/Fungus/Scripts/Editor/BlockEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/BlockEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/BlockEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/BlockInspector.cs b/Assets/Fungus/Scripts/Editor/BlockInspector.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/BlockInspector.cs rename to Assets/Fungus/Scripts/Editor/BlockInspector.cs diff --git a/Assets/Fungus/Flowchart/Editor/BlockInspector.cs.meta b/Assets/Fungus/Scripts/Editor/BlockInspector.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/BlockInspector.cs.meta rename to Assets/Fungus/Scripts/Editor/BlockInspector.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/CallEditor.cs b/Assets/Fungus/Scripts/Editor/CallEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CallEditor.cs rename to Assets/Fungus/Scripts/Editor/CallEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/CallEditor.cs.meta b/Assets/Fungus/Scripts/Editor/CallEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CallEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/CallEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/CommandEditor.cs b/Assets/Fungus/Scripts/Editor/CommandEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CommandEditor.cs rename to Assets/Fungus/Scripts/Editor/CommandEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/CommandEditor.cs.meta b/Assets/Fungus/Scripts/Editor/CommandEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CommandEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/CommandEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs rename to Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs diff --git a/Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs.meta b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs.meta rename to Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/CustomGUI.cs b/Assets/Fungus/Scripts/Editor/CustomGUI.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CustomGUI.cs rename to Assets/Fungus/Scripts/Editor/CustomGUI.cs diff --git a/Assets/Fungus/Flowchart/Editor/CustomGUI.cs.meta b/Assets/Fungus/Scripts/Editor/CustomGUI.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/CustomGUI.cs.meta rename to Assets/Fungus/Scripts/Editor/CustomGUI.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/EditorExtensions.cs b/Assets/Fungus/Scripts/Editor/EditorExtensions.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/EditorExtensions.cs rename to Assets/Fungus/Scripts/Editor/EditorExtensions.cs diff --git a/Assets/Fungus/Flowchart/Editor/EditorExtensions.cs.meta b/Assets/Fungus/Scripts/Editor/EditorExtensions.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/EditorExtensions.cs.meta rename to Assets/Fungus/Scripts/Editor/EditorExtensions.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs b/Assets/Fungus/Scripts/Editor/EditorZoomArea.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs rename to Assets/Fungus/Scripts/Editor/EditorZoomArea.cs diff --git a/Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs.meta b/Assets/Fungus/Scripts/Editor/EditorZoomArea.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs.meta rename to Assets/Fungus/Scripts/Editor/EditorZoomArea.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs b/Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs rename to Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs.meta b/Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/EventHandlerEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs b/Assets/Fungus/Scripts/Editor/FlowchartEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs rename to Assets/Fungus/Scripts/Editor/FlowchartEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs.meta b/Assets/Fungus/Scripts/Editor/FlowchartEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/FlowchartEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs similarity index 96% rename from Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs rename to Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs index db685b29..63794ade 100644 --- a/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs @@ -52,7 +52,7 @@ namespace Fungus public static GameObject SpawnPrefab(string prefabName) { - GameObject prefab = Resources.Load(prefabName); + GameObject prefab = Resources.Load("Prefabs/" + prefabName); if (prefab == null) { return null; diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs.meta b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs.meta rename to Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs rename to Assets/Fungus/Scripts/Editor/FlowchartWindow.cs diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs.meta b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs.meta rename to Assets/Fungus/Scripts/Editor/FlowchartWindow.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs b/Assets/Fungus/Scripts/Editor/FungusEditorResources.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs rename to Assets/Fungus/Scripts/Editor/FungusEditorResources.cs diff --git a/Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs.meta b/Assets/Fungus/Scripts/Editor/FungusEditorResources.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs.meta rename to Assets/Fungus/Scripts/Editor/FungusEditorResources.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/GLDraw.cs b/Assets/Fungus/Scripts/Editor/GLDraw.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/GLDraw.cs rename to Assets/Fungus/Scripts/Editor/GLDraw.cs diff --git a/Assets/Fungus/Flowchart/Editor/GLDraw.cs.meta b/Assets/Fungus/Scripts/Editor/GLDraw.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/GLDraw.cs.meta rename to Assets/Fungus/Scripts/Editor/GLDraw.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/IfEditor.cs b/Assets/Fungus/Scripts/Editor/IfEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/IfEditor.cs rename to Assets/Fungus/Scripts/Editor/IfEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/IfEditor.cs.meta b/Assets/Fungus/Scripts/Editor/IfEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/IfEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/IfEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs b/Assets/Fungus/Scripts/Editor/InvokeEventEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs rename to Assets/Fungus/Scripts/Editor/InvokeEventEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs.meta b/Assets/Fungus/Scripts/Editor/InvokeEventEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/InvokeEventEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs b/Assets/Fungus/Scripts/Editor/InvokeMethodEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs rename to Assets/Fungus/Scripts/Editor/InvokeMethodEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs.meta b/Assets/Fungus/Scripts/Editor/InvokeMethodEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/InvokeMethodEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/LabelEditor.cs b/Assets/Fungus/Scripts/Editor/LabelEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/LabelEditor.cs rename to Assets/Fungus/Scripts/Editor/LabelEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/LabelEditor.cs.meta b/Assets/Fungus/Scripts/Editor/LabelEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/LabelEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/LabelEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources.meta b/Assets/Fungus/Scripts/Editor/Resources.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources.meta rename to Assets/Fungus/Scripts/Editor/Resources.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat b/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat rename to Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat.meta b/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat.meta rename to Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader b/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader rename to Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader.meta b/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader.meta rename to Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/ResizeHandle.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/ResizeHandle.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/ResizeHandle.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/ResizeHandle.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/add.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/add.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/add.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/add.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/add.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/add.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/add.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/add.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/add_small.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/add_small.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/add_small.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/add_small.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/delete.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/delete.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/delete.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/delete.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/down.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/down.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/down.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/down.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/down.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/down.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/down.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/down.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/duplicate.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/duplicate.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/duplicate.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/duplicate.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/left.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/left.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/left.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/left.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/left.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/left.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/left.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/left.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/right.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/right.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/right.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/right.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/right.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/right.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/right.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/right.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/up.png b/Assets/Fungus/Scripts/Editor/Resources/Icons/up.png similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/up.png rename to Assets/Fungus/Scripts/Editor/Resources/Icons/up.png diff --git a/Assets/Fungus/Flowchart/Editor/Resources/Icons/up.png.meta b/Assets/Fungus/Scripts/Editor/Resources/Icons/up.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Resources/Icons/up.png.meta rename to Assets/Fungus/Scripts/Editor/Resources/Icons/up.png.meta diff --git a/Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs b/Assets/Fungus/Scripts/Editor/SerializedPropertyExtensions.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs rename to Assets/Fungus/Scripts/Editor/SerializedPropertyExtensions.cs diff --git a/Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs.meta b/Assets/Fungus/Scripts/Editor/SerializedPropertyExtensions.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs.meta rename to Assets/Fungus/Scripts/Editor/SerializedPropertyExtensions.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs b/Assets/Fungus/Scripts/Editor/SetVariableEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs rename to Assets/Fungus/Scripts/Editor/SetVariableEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs.meta b/Assets/Fungus/Scripts/Editor/SetVariableEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/SetVariableEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/VariableEditor.cs b/Assets/Fungus/Scripts/Editor/VariableEditor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/VariableEditor.cs rename to Assets/Fungus/Scripts/Editor/VariableEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/VariableEditor.cs.meta b/Assets/Fungus/Scripts/Editor/VariableEditor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/VariableEditor.cs.meta rename to Assets/Fungus/Scripts/Editor/VariableEditor.cs.meta diff --git a/Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs b/Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs similarity index 100% rename from Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs rename to Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs diff --git a/Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs.meta b/Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs.meta rename to Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs b/Assets/Fungus/Scripts/EventHandlers/FlowchartEnabled.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs rename to Assets/Fungus/Scripts/EventHandlers/FlowchartEnabled.cs diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs.meta b/Assets/Fungus/Scripts/EventHandlers/FlowchartEnabled.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/FlowchartEnabled.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs b/Assets/Fungus/Scripts/EventHandlers/GameStarted.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs rename to Assets/Fungus/Scripts/EventHandlers/GameStarted.cs diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs.meta b/Assets/Fungus/Scripts/EventHandlers/GameStarted.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/GameStarted.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs b/Assets/Fungus/Scripts/EventHandlers/KeyPressed.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs rename to Assets/Fungus/Scripts/EventHandlers/KeyPressed.cs diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs.meta b/Assets/Fungus/Scripts/EventHandlers/KeyPressed.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/KeyPressed.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs b/Assets/Fungus/Scripts/EventHandlers/MessageReceived.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs rename to Assets/Fungus/Scripts/EventHandlers/MessageReceived.cs diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs.meta b/Assets/Fungus/Scripts/EventHandlers/MessageReceived.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs.meta rename to Assets/Fungus/Scripts/EventHandlers/MessageReceived.cs.meta diff --git a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs index e682587d..319ef96e 100644 --- a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs @@ -1,4 +1,5 @@ using UnityEngine; +using System.Collections; namespace Fungus { @@ -30,7 +31,7 @@ namespace Fungus void SetCharacterName(string name, Color color); /// - /// Write a line of story text to the Say Dialog. + /// Write a line of story text to the Say Dialog. Starts coroutine automatically. /// /// The text to display. /// Clear any previous text in the Say Dialog. @@ -41,6 +42,18 @@ namespace Fungus /// Callback to execute when writing and player input have finished. void Say(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, System.Action onComplete); + /// + /// Write a line of story text to the Say Dialog. Must be started as a coroutine. + /// + /// The text to display. + /// Clear any previous text in the Say Dialog. + /// Wait for player input before continuing once text is written. + /// Fade out the Say Dialog when writing and player input has finished. + /// Stop any existing voiceover audio before writing starts. + /// Voice over audio clip to play. + /// Callback to execute when writing and player input have finished. + IEnumerator DoSay(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, System.Action onComplete); + /// /// Tell the Say Dialog to fade out once writing and player input have finished. /// diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes.meta b/Assets/Fungus/Scripts/VariableTypes.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes.meta rename to Assets/Fungus/Scripts/VariableTypes.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs b/Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs b/Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs b/Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs b/Assets/Fungus/Scripts/VariableTypes/ColorVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/ColorVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/ColorVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/ColorVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs b/Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs b/Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs b/Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs b/Assets/Fungus/Scripts/VariableTypes/MaterialVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/MaterialVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/MaterialVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/MaterialVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs b/Assets/Fungus/Scripts/VariableTypes/ObjectVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/ObjectVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/ObjectVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/ObjectVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs b/Assets/Fungus/Scripts/VariableTypes/SpriteVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/SpriteVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/SpriteVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/SpriteVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs b/Assets/Fungus/Scripts/VariableTypes/StringVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/StringVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/StringVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/StringVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs b/Assets/Fungus/Scripts/VariableTypes/TextureVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/TextureVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/TextureVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/TextureVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs b/Assets/Fungus/Scripts/VariableTypes/TransformVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs rename to Assets/Fungus/Scripts/VariableTypes/TransformVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/TransformVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/TransformVariable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/TransformVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs b/Assets/Fungus/Scripts/VariableTypes/Vector2Variable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs rename to Assets/Fungus/Scripts/VariableTypes/Vector2Variable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/Vector2Variable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/Vector2Variable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs b/Assets/Fungus/Scripts/VariableTypes/Vector3Variable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs rename to Assets/Fungus/Scripts/VariableTypes/Vector3Variable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs.meta b/Assets/Fungus/Scripts/VariableTypes/Vector3Variable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs.meta rename to Assets/Fungus/Scripts/VariableTypes/Vector3Variable.cs.meta diff --git a/Assets/Fungus/link.xml b/Assets/Fungus/Scripts/link.xml similarity index 100% rename from Assets/Fungus/link.xml rename to Assets/Fungus/Scripts/link.xml diff --git a/Assets/Fungus/link.xml.meta b/Assets/Fungus/Scripts/link.xml.meta similarity index 100% rename from Assets/Fungus/link.xml.meta rename to Assets/Fungus/Scripts/link.xml.meta diff --git a/Assets/Fungus/Sprite.meta b/Assets/Fungus/Sprite.meta deleted file mode 100644 index 0c5e9709..00000000 --- a/Assets/Fungus/Sprite.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 11656a29c65f3446298fdf276df9f918 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Sprite/Resources.meta b/Assets/Fungus/Sprite/Resources.meta deleted file mode 100644 index 5c9b6119..00000000 --- a/Assets/Fungus/Sprite/Resources.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 2c8a8211b1b944debacc99b17624670e -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Sprite/Sprites.meta b/Assets/Fungus/Sprite/Sprites.meta deleted file mode 100644 index ca44e96b..00000000 --- a/Assets/Fungus/Sprite/Sprites.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: bbfa0b731252a4b70ad8eaf428d86965 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Camera/Sprites.meta b/Assets/Fungus/Textures.meta similarity index 71% rename from Assets/Fungus/Camera/Sprites.meta rename to Assets/Fungus/Textures.meta index 61d895b7..4dc3bf66 100644 --- a/Assets/Fungus/Camera/Sprites.meta +++ b/Assets/Fungus/Textures.meta @@ -3,3 +3,5 @@ guid: 8dea678f784954ce3b1e6b1845374ef0 folderAsset: yes DefaultImporter: userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Narrative/Images/Attribution.txt b/Assets/Fungus/Textures/Attribution.txt similarity index 100% rename from Assets/Fungus/Narrative/Images/Attribution.txt rename to Assets/Fungus/Textures/Attribution.txt diff --git a/Assets/Fungus/Narrative/Images/Attribution.txt.meta b/Assets/Fungus/Textures/Attribution.txt.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/Attribution.txt.meta rename to Assets/Fungus/Textures/Attribution.txt.meta diff --git a/Assets/Fungus/Narrative/Images/ContinueIcon.png b/Assets/Fungus/Textures/ContinueIcon.png similarity index 100% rename from Assets/Fungus/Narrative/Images/ContinueIcon.png rename to Assets/Fungus/Textures/ContinueIcon.png diff --git a/Assets/Fungus/Narrative/Images/ContinueIcon.png.meta b/Assets/Fungus/Textures/ContinueIcon.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/ContinueIcon.png.meta rename to Assets/Fungus/Textures/ContinueIcon.png.meta diff --git a/Assets/Fungus/Flowchart/Sprites/CreatedWith.psd b/Assets/Fungus/Textures/CreatedWith.psd similarity index 100% rename from Assets/Fungus/Flowchart/Sprites/CreatedWith.psd rename to Assets/Fungus/Textures/CreatedWith.psd diff --git a/Assets/Fungus/Flowchart/Sprites/CreatedWith.psd.meta b/Assets/Fungus/Textures/CreatedWith.psd.meta similarity index 100% rename from Assets/Fungus/Flowchart/Sprites/CreatedWith.psd.meta rename to Assets/Fungus/Textures/CreatedWith.psd.meta diff --git a/Assets/Fungus/Narrative/Images/DialogBox.png b/Assets/Fungus/Textures/DialogBox.png similarity index 100% rename from Assets/Fungus/Narrative/Images/DialogBox.png rename to Assets/Fungus/Textures/DialogBox.png diff --git a/Assets/Fungus/Narrative/Images/DialogBox.png.meta b/Assets/Fungus/Textures/DialogBox.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/DialogBox.png.meta rename to Assets/Fungus/Textures/DialogBox.png.meta diff --git a/Assets/Fungus/Narrative/Images/DialogBoxSliced.png b/Assets/Fungus/Textures/DialogBoxSliced.png similarity index 100% rename from Assets/Fungus/Narrative/Images/DialogBoxSliced.png rename to Assets/Fungus/Textures/DialogBoxSliced.png diff --git a/Assets/Fungus/Narrative/Images/DialogBoxSliced.png.meta b/Assets/Fungus/Textures/DialogBoxSliced.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/DialogBoxSliced.png.meta rename to Assets/Fungus/Textures/DialogBoxSliced.png.meta diff --git a/Assets/Fungus/Flowchart/Sprites/FungusLogo.png b/Assets/Fungus/Textures/FungusLogo.png similarity index 100% rename from Assets/Fungus/Flowchart/Sprites/FungusLogo.png rename to Assets/Fungus/Textures/FungusLogo.png diff --git a/Assets/Fungus/Flowchart/Sprites/FungusLogo.png.meta b/Assets/Fungus/Textures/FungusLogo.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Sprites/FungusLogo.png.meta rename to Assets/Fungus/Textures/FungusLogo.png.meta diff --git a/Assets/Fungus/Narrative/Images/Mushroom.png b/Assets/Fungus/Textures/Mushroom.png similarity index 100% rename from Assets/Fungus/Narrative/Images/Mushroom.png rename to Assets/Fungus/Textures/Mushroom.png diff --git a/Assets/Fungus/Narrative/Images/Mushroom.png.meta b/Assets/Fungus/Textures/Mushroom.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/Mushroom.png.meta rename to Assets/Fungus/Textures/Mushroom.png.meta diff --git a/Assets/Fungus/Narrative/Images/OptionButton.png b/Assets/Fungus/Textures/OptionButton.png similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButton.png rename to Assets/Fungus/Textures/OptionButton.png diff --git a/Assets/Fungus/Narrative/Images/OptionButton.png.meta b/Assets/Fungus/Textures/OptionButton.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButton.png.meta rename to Assets/Fungus/Textures/OptionButton.png.meta diff --git a/Assets/Fungus/Narrative/Images/OptionButtonDisabled.png b/Assets/Fungus/Textures/OptionButtonDisabled.png similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButtonDisabled.png rename to Assets/Fungus/Textures/OptionButtonDisabled.png diff --git a/Assets/Fungus/Narrative/Images/OptionButtonDisabled.png.meta b/Assets/Fungus/Textures/OptionButtonDisabled.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButtonDisabled.png.meta rename to Assets/Fungus/Textures/OptionButtonDisabled.png.meta diff --git a/Assets/Fungus/Narrative/Images/OptionButtonHighlighted.png b/Assets/Fungus/Textures/OptionButtonHighlighted.png similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButtonHighlighted.png rename to Assets/Fungus/Textures/OptionButtonHighlighted.png diff --git a/Assets/Fungus/Narrative/Images/OptionButtonHighlighted.png.meta b/Assets/Fungus/Textures/OptionButtonHighlighted.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButtonHighlighted.png.meta rename to Assets/Fungus/Textures/OptionButtonHighlighted.png.meta diff --git a/Assets/Fungus/Narrative/Images/OptionButtonPressed.png b/Assets/Fungus/Textures/OptionButtonPressed.png similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButtonPressed.png rename to Assets/Fungus/Textures/OptionButtonPressed.png diff --git a/Assets/Fungus/Narrative/Images/OptionButtonPressed.png.meta b/Assets/Fungus/Textures/OptionButtonPressed.png.meta similarity index 100% rename from Assets/Fungus/Narrative/Images/OptionButtonPressed.png.meta rename to Assets/Fungus/Textures/OptionButtonPressed.png.meta diff --git a/Assets/Fungus/Camera/Sprites/ScreenFade.png b/Assets/Fungus/Textures/ScreenFade.png similarity index 100% rename from Assets/Fungus/Camera/Sprites/ScreenFade.png rename to Assets/Fungus/Textures/ScreenFade.png diff --git a/Assets/Fungus/Camera/Sprites/ScreenFade.png.meta b/Assets/Fungus/Textures/ScreenFade.png.meta similarity index 100% rename from Assets/Fungus/Camera/Sprites/ScreenFade.png.meta rename to Assets/Fungus/Textures/ScreenFade.png.meta diff --git a/Assets/Fungus/Flowchart/Sprites/ScriptIcon.png b/Assets/Fungus/Textures/ScriptIcon.png similarity index 100% rename from Assets/Fungus/Flowchart/Sprites/ScriptIcon.png rename to Assets/Fungus/Textures/ScriptIcon.png diff --git a/Assets/Fungus/Flowchart/Sprites/ScriptIcon.png.meta b/Assets/Fungus/Textures/ScriptIcon.png.meta similarity index 100% rename from Assets/Fungus/Flowchart/Sprites/ScriptIcon.png.meta rename to Assets/Fungus/Textures/ScriptIcon.png.meta diff --git a/Assets/Fungus/Camera/Sprites/SwipePanIcon.png b/Assets/Fungus/Textures/SwipePanIcon.png similarity index 100% rename from Assets/Fungus/Camera/Sprites/SwipePanIcon.png rename to Assets/Fungus/Textures/SwipePanIcon.png diff --git a/Assets/Fungus/Camera/Sprites/SwipePanIcon.png.meta b/Assets/Fungus/Textures/SwipePanIcon.png.meta similarity index 100% rename from Assets/Fungus/Camera/Sprites/SwipePanIcon.png.meta rename to Assets/Fungus/Textures/SwipePanIcon.png.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt index cfe2565d..e6e50670 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt +++ b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt @@ -152,7 +152,7 @@ end -- Gets the active say dialog, or creates one if none exists yet function M.getsaydialog() if (M.sayoptions.saydialog == nil) then - local sd = M.luautils.spawn("SayDialog").GetComponent("SayDialog") + local sd = M.luautils.spawn("Prefabs/SayDialog").GetComponent("SayDialog") M.setsaydialog(sd) end return M.sayoptions.saydialog @@ -193,7 +193,7 @@ function M.say(text, voiceclip) -- Do variable substitution before displaying text local subbed = M.sub(text) - local e = sd.SayInternal(subbed, M.sayoptions.clearprevious, M.sayoptions.waitforinput, M.sayoptions.fadewhendone, M.sayoptions.stopvoiceover, voiceclip) + local e = sd.DoSay(subbed, M.sayoptions.clearprevious, M.sayoptions.waitforinput, M.sayoptions.fadewhendone, M.sayoptions.stopvoiceover, voiceclip) M.runwait(e) end @@ -225,7 +225,7 @@ end -- Gets the active menu dialog, or creates one if none exists yet function M.getmenudialog() if (M.menuoptions.menudialog == nil) then - local md = M.luautils.spawn("MenuDialog").GetComponent("MenuDialog") + local md = M.luautils.spawn("Prefabs/MenuDialog").GetComponent("MenuDialog") M.setmenudialog(md) end return M.menuoptions.menudialog diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs index 90c6d02f..06825c6d 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs @@ -434,7 +434,7 @@ namespace Fungus if (prefab != null) { GameObject go = Instantiate(prefab) as GameObject; - go.name = resourceName; + go.name = resourceName.Replace("Prefabs/", ""); return go; } return null; diff --git a/Assets/Tests/Lua/LuaEnvironmentTests.unity b/Assets/Tests/Lua/LuaEnvironmentTests.unity index e1d9459e..20de0045 100644 --- a/Assets/Tests/Lua/LuaEnvironmentTests.unity +++ b/Assets/Tests/Lua/LuaEnvironmentTests.unity @@ -13,7 +13,7 @@ SceneSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 6 + serializedVersion: 7 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -37,12 +37,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 6 + serializedVersion: 7 m_GIWorkflowMode: 1 - m_LightmapsMode: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -53,17 +53,22 @@ LightmapSettings: m_EnableBakedLightmaps: 0 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: - serializedVersion: 3 + serializedVersion: 4 m_Resolution: 2 m_BakeResolution: 40 m_TextureWidth: 1024 m_TextureHeight: 1024 + m_AO: 0 m_AOMaxDistance: 1 - m_Padding: 2 m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 m_TextureCompression: 1 + m_DirectLightInLightProbes: 1 m_FinalGather: 0 + m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 1024 m_ReflectionCompression: 2 m_LightingDataAsset: {fileID: 0} @@ -173,6 +178,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 385045793} - {fileID: 1309386183} @@ -204,6 +210,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1228088165} m_RootOrder: 3 @@ -252,7 +259,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &156811089 @@ -299,6 +305,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1887843215} m_RootOrder: 1 @@ -319,7 +326,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &159008372 @@ -348,6 +354,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1575922007} m_RootOrder: 0 @@ -389,7 +396,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!4 &236999594 stripped @@ -442,6 +448,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 1258610947} - {fileID: 1828947836} @@ -473,6 +480,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1228088165} m_RootOrder: 2 @@ -488,6 +496,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4cc8a659e950044b69d7c62696c36962, type: 3} m_Name: m_EditorClassIdentifier: + allEnvironments: 1 + luaEnvironment: {fileID: 0} tableName: registerTypes: 1 boundTypes: @@ -509,6 +519,7 @@ MonoBehaviour: - key: dummycollection obj: {fileID: 367860753} component: {fileID: 367860754} + showInherited: 0 --- !u!1 &305346650 GameObject: m_ObjectHideFlags: 0 @@ -535,6 +546,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 637150169} m_RootOrder: 1 @@ -573,7 +585,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &367860753 @@ -618,6 +629,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -3.8587983, y: -2.6257849, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1228088165} m_RootOrder: 0 @@ -651,6 +663,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1537199682} m_RootOrder: 0 @@ -699,7 +712,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &637150168 MonoBehaviour: m_ObjectHideFlags: 0 @@ -730,6 +743,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 236999594} - {fileID: 305346651} @@ -803,6 +817,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 715881503} m_RootOrder: 1 @@ -856,7 +871,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &715881501 @@ -905,6 +919,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 2093904138} - {fileID: 681659774} @@ -934,6 +949,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -3.8587983, y: -2.6257849, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1537199682} m_RootOrder: 2 @@ -963,6 +979,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1887843215} m_RootOrder: 0 @@ -1034,6 +1051,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -1115,6 +1133,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1575922007} m_RootOrder: 1 @@ -1199,6 +1218,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 367860755} - {fileID: 1167396341} @@ -1243,6 +1263,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 256438764} m_RootOrder: 0 @@ -1276,6 +1297,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -3.8587983, y: -2.6257849, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 47556549} m_RootOrder: 1 @@ -1317,7 +1339,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &1394431693 @@ -1403,6 +1424,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -1432,6 +1454,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 256438764} m_RootOrder: 2 @@ -1561,6 +1584,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 1855619326} - {fileID: 1738134228} @@ -1581,7 +1605,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &1537199681 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1612,6 +1636,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 550607924} - {fileID: 1932132174} @@ -1655,6 +1680,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 7 @@ -1704,6 +1730,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 159008373} - {fileID: 1073989295} @@ -1780,6 +1807,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -1809,6 +1837,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1532103954} m_RootOrder: 1 @@ -1888,7 +1917,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &1818482578 @@ -1917,6 +1945,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1960220032} m_RootOrder: 3 @@ -1958,7 +1987,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &1828947831 @@ -2017,6 +2045,8 @@ MonoBehaviour: localizationId: showLineNumbers: 0 hideCommands: [] + luaEnvironment: {fileID: 0} + luaBindingName: flowchart --- !u!114 &1828947833 MonoBehaviour: m_ObjectHideFlags: 2 @@ -2029,7 +2059,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: itemId: 1 - errorMessage: indentLevel: 0 luaEnvironment: {fileID: 0} luaFile: {fileID: 0} @@ -2089,6 +2118,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 256438764} m_RootOrder: 1 @@ -2201,6 +2231,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 870653407} - {fileID: 156811091} @@ -2232,6 +2263,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1537199682} m_RootOrder: 1 @@ -2272,7 +2304,7 @@ MonoBehaviour: -- Spawn an object from a prefab in a Resources folder - saydialog = luautils.spawn("SayDialog") + saydialog = luautils.spawn("Prefabs/SayDialog") check(saydialog != nil) @@ -2299,7 +2331,6 @@ MonoBehaviour: executeAfterFrames: 1 repeatExecuteFrame: 1 repeatEveryFrame: 1 - hasFailed: 0 executeMethods: 2 executeMethodName: OnExecute --- !u!1 &1960220030 @@ -2348,6 +2379,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 1272779136} - {fileID: 1500823905} @@ -2528,6 +2560,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 1960220032} m_RootOrder: 2 From b6a1e2df57f2375d094fe79754843771044a6f6f Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 12:26:25 +0100 Subject: [PATCH 03/32] Merged MenuDialog extension methods with MenuDialog class. --- .../Scripts/Components/LuaExtensions.cs | 99 ------------------- .../Scripts/Components/LuaExtensions.cs.meta | 13 --- .../Fungus/Scripts/Components/MenuDialog.cs | 80 +++++++++++++++ .../Fungus/Scripts/Interfaces/IMenuDialog.cs | 21 +++- 4 files changed, 97 insertions(+), 116 deletions(-) delete mode 100644 Assets/Fungus/Scripts/Components/LuaExtensions.cs delete mode 100644 Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta diff --git a/Assets/Fungus/Scripts/Components/LuaExtensions.cs b/Assets/Fungus/Scripts/Components/LuaExtensions.cs deleted file mode 100644 index 37034833..00000000 --- a/Assets/Fungus/Scripts/Components/LuaExtensions.cs +++ /dev/null @@ -1,99 +0,0 @@ -// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). -// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) - -using UnityEngine; -using UnityEngine.UI; -using System.Collections; -using Fungus; -using MoonSharp.Interpreter; - -namespace Fungus -{ - public static class LuaExtensions - { - /// - /// Extension for MenuDialog that allows AddOption to call a Lua function when an option is selected. - /// - public static bool AddOption(this MenuDialog menuDialog, string text, bool interactable, ILuaEnvironment luaEnv, Closure callBack) - { - if (!menuDialog.gameObject.activeSelf) - { - menuDialog.gameObject.SetActive(true); - } - - bool addedOption = false; - foreach (Button button in menuDialog.CachedButtons) - { - if (!button.gameObject.activeSelf) - { - button.gameObject.SetActive(true); - - button.interactable = interactable; - - Text textComponent = button.GetComponentInChildren(); - if (textComponent != null) - { - textComponent.text = text; - } - - button.onClick.AddListener(delegate { - - menuDialog.StopAllCoroutines(); // Stop timeout - menuDialog.Clear(); - menuDialog.HideSayDialog(); - - if (callBack != null) - { - luaEnv.RunLuaFunction(callBack, true); - } - }); - - addedOption = true; - break; - } - } - - return addedOption; - } - - /// - /// Extension for MenuDialog that allows ShowTimer to call a Lua function when the timer expires. - /// - public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, ILuaEnvironment luaEnv, Closure callBack) - { - if (menuDialog.CachedSlider == null || - duration <= 0f) - { - yield break; - } - - menuDialog.CachedSlider.gameObject.SetActive(true); - menuDialog.StopAllCoroutines(); - - float elapsedTime = 0; - Slider timeoutSlider = menuDialog.GetComponentInChildren(); - - while (elapsedTime < duration) - { - if (timeoutSlider != null) - { - float t = 1f - elapsedTime / duration; - timeoutSlider.value = t; - } - - elapsedTime += Time.deltaTime; - - yield return null; - } - - menuDialog.Clear(); - menuDialog.gameObject.SetActive(false); - menuDialog.HideSayDialog(); - - if (callBack != null) - { - luaEnv.RunLuaFunction(callBack, true); - } - } - } -} diff --git a/Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta b/Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta deleted file mode 100644 index 28946979..00000000 --- a/Assets/Fungus/Scripts/Components/LuaExtensions.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 998f811805a17465ba6720248632ec01 -timeCreated: 1459502744 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: - diff --git a/Assets/Fungus/Scripts/Components/MenuDialog.cs b/Assets/Fungus/Scripts/Components/MenuDialog.cs index 7cb3cd74..d76ca18e 100644 --- a/Assets/Fungus/Scripts/Components/MenuDialog.cs +++ b/Assets/Fungus/Scripts/Components/MenuDialog.cs @@ -6,6 +6,7 @@ using UnityEngine.UI; using System.Collections; using UnityEngine.EventSystems; using System.Linq; +using MoonSharp.Interpreter; namespace Fungus { @@ -201,6 +202,48 @@ namespace Fungus return addedOption; } + public bool AddOption(string text, bool interactable, ILuaEnvironment luaEnv, Closure callBack) + { + if (!gameObject.activeSelf) + { + gameObject.SetActive(true); + } + + bool addedOption = false; + foreach (Button button in CachedButtons) + { + if (!button.gameObject.activeSelf) + { + button.gameObject.SetActive(true); + + button.interactable = interactable; + + Text textComponent = button.GetComponentInChildren(); + if (textComponent != null) + { + textComponent.text = text; + } + + button.onClick.AddListener(delegate { + + StopAllCoroutines(); // Stop timeout + Clear(); + HideSayDialog(); + + if (callBack != null) + { + luaEnv.RunLuaFunction(callBack, true); + } + }); + + addedOption = true; + break; + } + } + + return addedOption; + } + public virtual void ShowTimer(float duration, Block targetBlock) { if (cachedSlider != null) @@ -212,6 +255,43 @@ namespace Fungus } } + public IEnumerator ShowTimer(float duration, ILuaEnvironment luaEnv, Closure callBack) + { + if (CachedSlider == null || + duration <= 0f) + { + yield break; + } + + CachedSlider.gameObject.SetActive(true); + StopAllCoroutines(); + + float elapsedTime = 0; + Slider timeoutSlider = GetComponentInChildren(); + + while (elapsedTime < duration) + { + if (timeoutSlider != null) + { + float t = 1f - elapsedTime / duration; + timeoutSlider.value = t; + } + + elapsedTime += Time.deltaTime; + + yield return null; + } + + Clear(); + gameObject.SetActive(false); + HideSayDialog(); + + if (callBack != null) + { + luaEnv.RunLuaFunction(callBack, true); + } + } + public virtual bool IsActive() { return gameObject.activeInHierarchy; diff --git a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs index a909cd5f..ae3a445c 100644 --- a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs @@ -1,5 +1,6 @@ -using UnityEngine; -using UnityEngine.UI; +using UnityEngine.UI; +using MoonSharp.Interpreter; +using System.Collections; namespace Fungus { @@ -36,7 +37,7 @@ namespace Fungus void HideSayDialog(); /// - /// Adds the option to the list of displayed options. + /// Adds the option to the list of displayed options. Calls a Block when selected. /// Will cause the Menu dialog to become visible if it is not already visible. /// /// true, if the option was added successfully. @@ -46,12 +47,24 @@ namespace Fungus bool AddOption(string text, bool interactable, Block targetBlock); /// - /// Show a timer during which the player can select an option. + /// Adds the option to the list of displayed options, calls a Lua function when selected. + /// Will cause the Menu dialog to become visible if it is not already visible. + /// + /// true, if the option was added successfully. + bool AddOption(string text, bool interactable, ILuaEnvironment luaEnv, Closure callBack); + + /// + /// Show a timer during which the player can select an option. Calls a Block when the timer expires. /// /// The duration during which the player can select an option. /// Block to execute if the player does not select an option in time. void ShowTimer(float duration, Block targetBlock); + /// + /// Show a timer during which the player can select an option. Calls a Lua function when the timer expires. + /// + IEnumerator ShowTimer(float duration, ILuaEnvironment luaEnv, Closure callBack); + /// /// Returns true if the Menu Dialog is currently displayed. /// From 4c280e46399465e14b5d86cf96023dc9010ba20d Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 13:56:25 +0100 Subject: [PATCH 04/32] Refactored Block to use Block interface --- Assets/Fungus/Flowchart/Scripts/Block.cs | 102 +++++++++------- Assets/Fungus/Flowchart/Scripts/IBlock.cs | 114 ++++++++++++++++++ .../Fungus/Flowchart/Scripts/IBlock.cs.meta | 12 ++ 3 files changed, 182 insertions(+), 46 deletions(-) create mode 100644 Assets/Fungus/Flowchart/Scripts/IBlock.cs create mode 100644 Assets/Fungus/Flowchart/Scripts/IBlock.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 8d3f8fb3..32fe99c9 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -15,73 +15,34 @@ namespace Fungus [ExecuteInEditMode] [RequireComponent(typeof(Flowchart))] [AddComponentMenu("")] - public class Block : Node + public class Block : Node, IBlock { - public enum ExecutionState - { - Idle, - Executing, - } - - /// - /// The execution state of the Block. - /// - protected ExecutionState executionState; - public virtual ExecutionState State { get { return executionState; } } - - /// - /// Unique identifier for the Block. - /// [SerializeField] protected int itemId = -1; // Invalid flowchart item id - public virtual int ItemId { get { return itemId; } set { itemId = value; } } - /// - /// The name of the block node as displayed in the Flowchart window. - /// [FormerlySerializedAs("sequenceName")] [Tooltip("The name of the block node as displayed in the Flowchart window")] [SerializeField] protected string blockName = "New Block"; - public virtual string BlockName { get { return blockName; } set { blockName = value; } } - /// - /// Description text to display under the block node - /// [TextArea(2, 5)] [Tooltip("Description text to display under the block node")] [SerializeField] protected string description = ""; - public virtual string Description { get { return description; } } - /// - /// An optional Event Handler which can execute the block when an event occurs. - /// [Tooltip("An optional Event Handler which can execute the block when an event occurs")] [SerializeField] protected EventHandler eventHandler; - public virtual EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } } - /// - /// The currently executing command. - /// + [SerializeField] protected List commandList = new List(); + + protected ExecutionState executionState; + protected Command activeCommand; - public virtual Command ActiveCommand { get { return activeCommand; } } /// // Index of last command executed before the current one. // -1 indicates no previous command. /// protected int previousActiveCommandIndex = -1; - public virtual float ExecutingIconTimer { get; set; } - /// - /// The list of commands in the sequence. - /// - [SerializeField] protected List commandList = new List(); - public virtual List CommandList { get { return commandList; } } - - /// - /// Controls the next command to execute in the block execution coroutine. - /// protected int jumpToCommandIndex = -1; - public int JumpToCommandIndex { set { jumpToCommandIndex = value; } } /// /// Duration of fade for executing icon displayed beside blocks & commands. @@ -128,7 +89,7 @@ namespace Fungus // The user can modify the command list order while playing in the editor, // so we keep the command indices updated every frame. There's no need to // do this in player builds so we compile this bit out for those builds. - void Update() + protected virtual void Update() { int index = 0; foreach (Command command in commandList) @@ -143,6 +104,53 @@ namespace Fungus } #endif + #region IBlock implementation + + /// + /// The execution state of the Block. + /// + public virtual ExecutionState State { get { return executionState; } } + + /// + /// Unique identifier for the Block. + /// + public virtual int ItemId { get { return itemId; } set { itemId = value; } } + + /// + /// The name of the block node as displayed in the Flowchart window. + /// + public virtual string BlockName { get { return blockName; } set { blockName = value; } } + + /// + /// Description text to display under the block node + /// + public virtual string Description { get { return description; } } + + /// + /// An optional Event Handler which can execute the block when an event occurs. + /// + public virtual EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } } + + /// + /// The currently executing command. + /// + public virtual Command ActiveCommand { get { return activeCommand; } } + + /// + /// Timer for fading Block execution icon. + /// + public virtual float ExecutingIconTimer { get; set; } + + /// + /// The list of commands in the sequence. + /// + public virtual List CommandList { get { return commandList; } } + + /// + /// Controls the next command to execute in the block execution coroutine. + /// + public virtual int JumpToCommandIndex { set { jumpToCommandIndex = value; } } + /// /// Returns the parent Flowchart for this Block. /// @@ -221,7 +229,7 @@ namespace Fungus // Skip disabled commands, comments and labels while (i < commandList.Count && - (!commandList[i].enabled || + (!commandList[i].enabled || commandList[i].GetType() == typeof(Comment) || commandList[i].GetType() == typeof(Label))) { @@ -364,5 +372,7 @@ namespace Fungus } } } + + #endregion } } diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Flowchart/Scripts/IBlock.cs new file mode 100644 index 00000000..c8e02abe --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs @@ -0,0 +1,114 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +namespace Fungus +{ + /// + /// Execution state of a Block. + /// + public enum ExecutionState + { + Idle, + Executing, + } + + /// + /// A container for a sequence of Fungus comands. + /// + public interface IBlock + { + /// + /// The execution state of the Block. + /// + ExecutionState State { get; } + + /// + /// Unique identifier for the Block. + /// + int ItemId { get; set; } + + /// + /// The name of the block node as displayed in the Flowchart window. + /// + string BlockName { get; set; } + + /// + /// Description text to display under the block node + /// + string Description { get; } + + /// + /// An optional Event Handler which can execute the block when an event occurs. + /// + EventHandler _EventHandler { get; set; } + + /// + /// The currently executing command. + /// + Command ActiveCommand { get; } + + /// + /// Timer for fading Block execution icon. + /// + float ExecutingIconTimer { get; set; } + + /// + /// The list of commands in the sequence. + /// + List CommandList { get; } + + /// + /// Controls the next command to execute in the block execution coroutine. + /// + int JumpToCommandIndex { set; } + + /// + /// Returns the parent Flowchart for this Block. + /// + Flowchart GetFlowchart(); + + /// + /// Returns true if the Block is executing a command. + /// + bool IsExecuting(); + + /// + /// Returns the number of times this Block has executed. + /// + int GetExecutionCount(); + + /// + /// Start a coroutine which executes all commands in the Block. Only one running instance of each Block is permitted. + /// + void StartExecution(); + + /// + /// A coroutine method that executes all commands in the Block. Only one running instance of each Block is permitted. + /// + /// Index of command to start execution at + /// Delegate function to call when execution completes + IEnumerator Execute(int commandIndex = 0, System.Action onComplete = null); + + /// + /// Stop executing commands in this Block. + /// + void Stop(); + + /// + /// Returns a list of all Blocks connected to this one. + /// + List GetConnectedBlocks(); + + /// + /// Returns the type of the previously executing command. + /// + /// The previous active command type. + System.Type GetPreviousActiveCommandType(); + + /// + /// Recalculate the indent levels for all commands in the list. + /// + void UpdateIndentLevels(); + } +} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs.meta b/Assets/Fungus/Flowchart/Scripts/IBlock.cs.meta new file mode 100644 index 00000000..a0965ceb --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3a23dd66c807e4fab86a64184c3faa9a +timeCreated: 1473856388 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From d027c2c30e1da9fe8804cc0cc0adac0818061c7e Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 13:56:39 +0100 Subject: [PATCH 05/32] Fixed formatting --- Assets/Fungus/Flowchart/Scripts/Block.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 32fe99c9..ea420328 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -229,7 +229,7 @@ namespace Fungus // Skip disabled commands, comments and labels while (i < commandList.Count && - (!commandList[i].enabled || + (!commandList[i].enabled || commandList[i].GetType() == typeof(Comment) || commandList[i].GetType() == typeof(Label))) { From 420c2ac444faf5db2874ffdce4c12171fe1b92f0 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 14:06:00 +0100 Subject: [PATCH 06/32] Refactored Command to use ICommand interface --- Assets/Fungus/Flowchart/Scripts/Command.cs | 21 ++- Assets/Fungus/Flowchart/Scripts/ICommand.cs | 163 ++++++++++++++++++ .../Fungus/Flowchart/Scripts/ICommand.cs.meta | 12 ++ 3 files changed, 189 insertions(+), 7 deletions(-) create mode 100644 Assets/Fungus/Flowchart/Scripts/ICommand.cs create mode 100644 Assets/Fungus/Flowchart/Scripts/ICommand.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Flowchart/Scripts/Command.cs index d0971fb7..b6b83314 100644 --- a/Assets/Fungus/Flowchart/Scripts/Command.cs +++ b/Assets/Fungus/Flowchart/Scripts/Command.cs @@ -37,29 +37,34 @@ namespace Fungus /// /// Base class for Commands. Commands can be added to Blocks to create an execution sequence. /// - public class Command : MonoBehaviour + public class Command : MonoBehaviour, ICommand { + [FormerlySerializedAs("commandId")] + [HideInInspector] + [SerializeField] protected int itemId = -1; // Invalid flowchart item id + + [HideInInspector] + [SerializeField] protected int indentLevel; + + protected string errorMessage = ""; + + #region ICommand implementation + /// /// Unique identifier for this command. /// Unique for this Flowchart. /// - [FormerlySerializedAs("commandId")] - [HideInInspector] - [SerializeField] protected int itemId = -1; // Invalid flowchart item id public virtual int ItemId { get { return itemId; } set { itemId = value; } } /// /// Error message to display in the command inspector. /// - protected string errorMessage = ""; public virtual string ErrorMessage { get { return errorMessage; } } /// /// Indent depth of the current commands. /// Commands are indented inside If, While, etc. sections. /// - [HideInInspector] - [SerializeField] protected int indentLevel; public virtual int IndentLevel { get { return indentLevel; } set { indentLevel = value; } } /// @@ -276,5 +281,7 @@ namespace Fungus return localizationId; } + + #endregion } } \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/ICommand.cs b/Assets/Fungus/Flowchart/Scripts/ICommand.cs new file mode 100644 index 00000000..699ff8a5 --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/ICommand.cs @@ -0,0 +1,163 @@ +using UnityEngine; +using System.Collections.Generic; + +namespace Fungus +{ + /// + /// Commands can be added to Blocks to create an execution sequence. + /// + public interface ICommand + { + /// + /// Unique identifier for this command. + /// Unique for this Flowchart. + /// + int ItemId { get; set; } + + /// + /// Error message to display in the command inspector. + /// + string ErrorMessage { get; } + + /// + /// Indent depth of the current commands. + /// Commands are indented inside If, While, etc. sections. + /// + int IndentLevel { get; set; } + + /// + /// Index of the command in the parent block's command list. + /// + int CommandIndex { get; set; } + + /// + /// Set to true by the parent block while the command is executing. + /// + bool IsExecuting { get; set; } + + /// + /// Timer used to control appearance of executing icon in inspector. + /// + float ExecutingIconTimer { get; set; } + + /// + /// Reference to the Block object that this command belongs to. + /// This reference is only populated at runtime and in the editor when the + /// block is selected. + /// + Block ParentBlock { get; set; } + + /// + /// Returns the Flowchart that this command belongs to. + /// + Flowchart GetFlowchart(); + + /// + /// Execute the command. + /// + void Execute(); + + /// + /// End execution of this command and continue execution at the next command. + /// + void Continue(); + + /// + /// End execution of this command and continue execution at a specific command index. + /// + /// Next command index. + void Continue(int nextCommandIndex); + + /// + /// Stops the parent Block executing. + /// + void StopParentBlock(); + + /// + /// Called when the parent block has been requested to stop executing, and + /// this command is the currently executing command. + /// Use this callback to terminate any asynchronous operations and + /// cleanup state so that the command is ready to execute again later on. + /// + void OnStopExecuting(); + + /// + /// Called when the new command is added to a block in the editor. + /// + void OnCommandAdded(Block parentBlock); + + /// + /// Called when the command is deleted from a block in the editor. + /// + void OnCommandRemoved(Block parentBlock); + + /// + /// Called when this command starts execution. + /// + void OnEnter(); + + /// + /// Called when this command ends execution. + /// + void OnExit(); + + /// + /// Called when this command is reset. This happens when the Reset command is used. + /// + void OnReset(); + + /// + /// Populates a list with the Blocks that this command references. + /// + void GetConnectedBlocks(ref List connectedBlocks); + + /// + /// Returns true if this command references the variable. + /// Used to highlight variables in the variable list when a command is selected. + /// + bool HasReference(Variable variable); + + /// + /// Returns the summary text to display in the command inspector. + /// + string GetSummary(); + + /// + /// Returns the help text to display for this command. + /// + string GetHelpText(); + + /// + /// Return true if this command opens a block of commands. Used for indenting commands. + /// + bool OpenBlock(); + + /// + /// Return true if this command closes a block of commands. Used for indenting commands. + /// + bool CloseBlock(); + + /// + /// Return the color for the command background in inspector. + /// + /// The button color. + Color GetButtonColor(); + + /// + /// Returns true if the specified property should be displayed in the inspector. + /// This is useful for hiding certain properties based on the value of another property. + /// + bool IsPropertyVisible(string propertyName); + + /// + /// Returns true if the specified property should be displayed as a reorderable list in the inspector. + /// This only applies for array properties and has no effect for non-array properties. + /// + bool IsReorderableArray(string propertyName); + + /// + /// Returns the localization id for the Flowchart that contains this command. + /// + string GetFlowchartLocalizationId(); + } +} diff --git a/Assets/Fungus/Flowchart/Scripts/ICommand.cs.meta b/Assets/Fungus/Flowchart/Scripts/ICommand.cs.meta new file mode 100644 index 00000000..6b85918e --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/ICommand.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 189c3f33fdd4b47608ac0aa3a2b971bb +timeCreated: 1473856401 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 1cf014aa18807f6836521bf731ebe9a84977d16d Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 15:24:59 +0100 Subject: [PATCH 07/32] Refactored Block to use IBlock --- Assets/Fungus/Flowchart/Scripts/Block.cs | 61 +-------- Assets/Fungus/Flowchart/Scripts/Command.cs | 8 +- .../Fungus/Flowchart/Scripts/EventHandler.cs | 4 +- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 64 +++++----- Assets/Fungus/Flowchart/Scripts/IBlock.cs | 2 +- Assets/Fungus/Flowchart/Scripts/ICommand.cs | 8 +- Assets/Fungus/Flowchart/Scripts/INode.cs | 15 +++ Assets/Fungus/Flowchart/Scripts/INode.cs.meta | 12 ++ Assets/Fungus/Flowchart/Scripts/Node.cs | 7 +- Assets/Fungus/Scripts/Commands/Call.cs | 4 +- .../Fungus/Scripts/Commands/ControlStage.cs | 2 +- Assets/Fungus/Scripts/Commands/Menu.cs | 2 +- Assets/Fungus/Scripts/Commands/MenuTimer.cs | 2 +- Assets/Fungus/Scripts/Commands/Portrait.cs | 2 +- .../Scripts/Commands/SetInteractable.cs | 2 +- .../Fungus/Scripts/Commands/SetSpriteOrder.cs | 2 +- Assets/Fungus/Scripts/Commands/StopBlock.cs | 2 +- Assets/Fungus/Scripts/Commands/TweenUI.cs | 2 +- .../Fungus/Scripts/Components/Localization.cs | 4 +- .../Fungus/Scripts/Components/MenuDialog.cs | 8 +- Assets/Fungus/Scripts/Editor/BlockEditor.cs | 62 ++++----- .../Fungus/Scripts/Editor/BlockInspector.cs | 10 +- .../Scripts/Editor/CommandListAdaptor.cs | 8 +- .../Scripts/Editor/FlowchartMenuItems.cs | 2 +- .../Fungus/Scripts/Editor/FlowchartWindow.cs | 120 ++++++++++-------- .../Fungus/Scripts/Interfaces/IMenuDialog.cs | 4 +- 26 files changed, 207 insertions(+), 212 deletions(-) create mode 100644 Assets/Fungus/Flowchart/Scripts/INode.cs create mode 100644 Assets/Fungus/Flowchart/Scripts/INode.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index ea420328..a679ec0a 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -106,88 +106,44 @@ namespace Fungus #region IBlock implementation - /// - /// The execution state of the Block. - /// public virtual ExecutionState State { get { return executionState; } } - /// - /// Unique identifier for the Block. - /// public virtual int ItemId { get { return itemId; } set { itemId = value; } } - /// - /// The name of the block node as displayed in the Flowchart window. - /// public virtual string BlockName { get { return blockName; } set { blockName = value; } } - /// - /// Description text to display under the block node - /// public virtual string Description { get { return description; } } - /// - /// An optional Event Handler which can execute the block when an event occurs. - /// public virtual EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } } - /// - /// The currently executing command. - /// public virtual Command ActiveCommand { get { return activeCommand; } } - /// - /// Timer for fading Block execution icon. - /// public virtual float ExecutingIconTimer { get; set; } - /// - /// The list of commands in the sequence. - /// public virtual List CommandList { get { return commandList; } } - /// - /// Controls the next command to execute in the block execution coroutine. - /// public virtual int JumpToCommandIndex { set { jumpToCommandIndex = value; } } - /// - /// Returns the parent Flowchart for this Block. - /// public virtual Flowchart GetFlowchart() { return GetComponent(); } - /// - /// Returns true if the Block is executing a command. - /// public virtual bool IsExecuting() { return (executionState == ExecutionState.Executing); } - /// - /// Returns the number of times this Block has executed. - /// public virtual int GetExecutionCount() { return executionCount; } - /// - /// Start a coroutine which executes all commands in the Block. Only one running instance of each Block is permitted. - /// public virtual void StartExecution() { StartCoroutine(Execute()); } - /// - /// A coroutine method that executes all commands in the Block. Only one running instance of each Block is permitted. - /// - /// Index of command to start execution at - /// Delegate function to call when execution completes public virtual IEnumerator Execute(int commandIndex = 0, Action onComplete = null) { if (executionState != ExecutionState.Idle) @@ -296,9 +252,6 @@ namespace Fungus } } - /// - /// Stop executing commands in this Block. - /// public virtual void Stop() { // Tell the executing command to stop immediately @@ -312,12 +265,9 @@ namespace Fungus jumpToCommandIndex = int.MaxValue; } - /// - /// Returns a list of all Blocks connected to this one. - /// - public virtual List GetConnectedBlocks() + public virtual List GetConnectedBlocks() { - List connectedBlocks = new List(); + var connectedBlocks = new List(); foreach (Command command in commandList) { if (command != null) @@ -328,10 +278,6 @@ namespace Fungus return connectedBlocks; } - /// - /// Returns the type of the previously executing command. - /// - /// The previous active command type. public virtual System.Type GetPreviousActiveCommandType() { if (previousActiveCommandIndex >= 0 && @@ -343,9 +289,6 @@ namespace Fungus return null; } - /// - /// Recalculate the indent levels for all commands in the list. - /// public virtual void UpdateIndentLevels() { int indentLevel = 0; diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Flowchart/Scripts/Command.cs index b6b83314..7d60a857 100644 --- a/Assets/Fungus/Flowchart/Scripts/Command.cs +++ b/Assets/Fungus/Flowchart/Scripts/Command.cs @@ -87,7 +87,7 @@ namespace Fungus /// This reference is only populated at runtime and in the editor when the /// block is selected. /// - public virtual Block ParentBlock { get; set; } + public virtual IBlock ParentBlock { get; set; } /// /// Returns the Flowchart that this command belongs to. @@ -160,13 +160,13 @@ namespace Fungus /// /// Called when the new command is added to a block in the editor. /// - public virtual void OnCommandAdded(Block parentBlock) + public virtual void OnCommandAdded(IBlock parentBlock) {} /// /// Called when the command is deleted from a block in the editor. /// - public virtual void OnCommandRemoved(Block parentBlock) + public virtual void OnCommandRemoved(IBlock parentBlock) {} /// @@ -190,7 +190,7 @@ namespace Fungus /// /// Populates a list with the Blocks that this command references. /// - public virtual void GetConnectedBlocks(ref List connectedBlocks) + public virtual void GetConnectedBlocks(ref List connectedBlocks) {} /// diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs index 31b86201..332fc4be 100644 --- a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs +++ b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs @@ -32,7 +32,7 @@ namespace Fungus /// Add an EventHandlerInfo attibute and your new EventHandler class will automatically appear in the /// 'Execute On Event' dropdown menu when a block is selected. /// - [RequireComponent(typeof(Block))] + [RequireComponent(typeof(IBlock))] [RequireComponent(typeof(Flowchart))] [AddComponentMenu("")] public class EventHandler : MonoBehaviour @@ -44,7 +44,7 @@ namespace Fungus [HideInInspector] [FormerlySerializedAs("parentSequence")] [SerializeField] protected Block parentBlock; - public virtual Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } } + public virtual IBlock ParentBlock { get { return parentBlock; } set { parentBlock = (Block)value; } } /// /// The Event Handler should call this method when the event is detected. diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index a2826a79..f07289bf 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -94,7 +94,7 @@ namespace Fungus [HideInInspector] [FormerlySerializedAs("selectedSequence")] [SerializeField] protected Block selectedBlock; - public virtual Block SelectedBlock { get { return selectedBlock; } set { selectedBlock = value; } } + public virtual IBlock SelectedBlock { get { return selectedBlock; } set { selectedBlock = (Block)value; } } /// /// Currently selected command in the Flowchart editor. @@ -203,8 +203,8 @@ namespace Fungus public int NextItemId() { int maxId = -1; - Block[] blocks = GetComponents(); - foreach (Block block in blocks) + IBlock[] blocks = GetComponents(); + foreach (IBlock block in blocks) { maxId = Math.Max(maxId, block.ItemId); } @@ -309,8 +309,8 @@ namespace Fungus // Make sure item ids are unique and monotonically increasing. // This should always be the case, but some legacy Flowcharts may have issues. List usedIds = new List(); - Block[] blocks = GetComponents(); - foreach (Block block in blocks) + IBlock[] blocks = GetComponents(); + foreach (IBlock block in blocks) { if (block.ItemId == -1 || usedIds.Contains(block.ItemId)) @@ -338,7 +338,7 @@ namespace Fungus // Unreferenced components don't have any effect on the flowchart behavior, but // they waste memory so should be cleared out periodically. - Block[] blocks = GetComponents(); + IBlock[] blocks = GetComponents(); // Remove any null entries in the variables list // It shouldn't happen but it seemed to occur for a user on the forum @@ -355,7 +355,7 @@ namespace Fungus foreach (Command command in GetComponents()) { bool found = false; - foreach (Block block in blocks) + foreach (IBlock block in blocks) { if (block.CommandList.Contains(command)) { @@ -373,7 +373,7 @@ namespace Fungus foreach (EventHandler eventHandler in GetComponents()) { bool found = false; - foreach (Block block in blocks) + foreach (IBlock block in blocks) { if (block._EventHandler == eventHandler) { @@ -411,9 +411,9 @@ namespace Fungus /// /// Returns the named Block in the flowchart, or null if not found. /// - public virtual Block FindBlock(string blockName) + public virtual IBlock FindBlock(string blockName) { - Block [] blocks = GetComponents(); + IBlock [] blocks = GetComponents(); foreach (Block block in blocks) { if (block.BlockName == blockName) @@ -430,8 +430,8 @@ namespace Fungus /// You can use this method in a UI event. e.g. to handle a button click. public virtual void ExecuteBlock(string blockName) { - Block block = null; - foreach (Block b in GetComponents()) + IBlock block = null; + foreach (IBlock b in GetComponents()) { if (b.BlockName == blockName) { @@ -458,7 +458,7 @@ namespace Fungus /// This version provides extra options to control how the block is executed. /// Returns true if the Block started execution. /// - public virtual bool ExecuteBlock(Block block, int commandIndex = 0, Action onComplete = null) + public virtual bool ExecuteBlock(IBlock block, int commandIndex = 0, Action onComplete = null) { if (block == null) { @@ -466,7 +466,7 @@ namespace Fungus return false; } - if (block.gameObject != gameObject) + if (((Block)block).gameObject != gameObject) { Debug.LogError("Block must belong to the same gameobject as this Flowchart"); return false; @@ -489,8 +489,8 @@ namespace Fungus /// public virtual void StopAllBlocks() { - Block [] blocks = GetComponents(); - foreach (Block block in blocks) + IBlock [] blocks = GetComponents(); + foreach (IBlock block in blocks) { if (block.IsExecuting()) { @@ -577,7 +577,7 @@ namespace Fungus /// /// Returns a new Block key that is guaranteed not to clash with any existing Block in the Flowchart. /// - public virtual string GetUniqueBlockKey(string originalKey, Block ignoreBlock = null) + public virtual string GetUniqueBlockKey(string originalKey, IBlock ignoreBlock = null) { int suffix = 0; string baseKey = originalKey.Trim(); @@ -588,13 +588,13 @@ namespace Fungus baseKey = "New Block"; } - Block[] blocks = GetComponents(); + IBlock[] blocks = GetComponents(); string key = baseKey; while (true) { bool collision = false; - foreach(Block block in blocks) + foreach(IBlock block in blocks) { if (block == ignoreBlock || block.BlockName == null) @@ -631,7 +631,7 @@ namespace Fungus baseKey = "New Label"; } - Block block = ignoreLabel.ParentBlock; + IBlock block = ignoreLabel.ParentBlock; string key = baseKey; while (true) @@ -871,13 +871,15 @@ namespace Fungus { if (hideComponents) { - Block[] blocks = GetComponents(); - foreach (Block block in blocks) + IBlock[] blocks = GetComponents(); + foreach (IBlock block in blocks) { - block.hideFlags = HideFlags.HideInInspector; - if (block.gameObject != gameObject) + GameObject go = ((Block)block).gameObject; + + go.hideFlags = HideFlags.HideInInspector; + if (go != gameObject) { - block.gameObject.hideFlags = HideFlags.HideInHierarchy; + go.hideFlags = HideFlags.HideInHierarchy; } } @@ -975,8 +977,8 @@ namespace Fungus /// public virtual bool HasExecutingBlocks() { - Block[] blocks = GetComponents(); - foreach (Block block in blocks) + IBlock[] blocks = GetComponents(); + foreach (IBlock block in blocks) { if (block.IsExecuting()) { @@ -989,12 +991,12 @@ namespace Fungus /// /// Returns a list of all executing blocks in this Flowchart. /// - public virtual List GetExecutingBlocks() + public virtual List GetExecutingBlocks() { - List executingBlocks = new List(); + List executingBlocks = new List(); - Block[] blocks = GetComponents(); - foreach (Block block in blocks) + IBlock[] blocks = GetComponents(); + foreach (IBlock block in blocks) { if (block.IsExecuting()) { diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Flowchart/Scripts/IBlock.cs index c8e02abe..7ff19109 100644 --- a/Assets/Fungus/Flowchart/Scripts/IBlock.cs +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs @@ -98,7 +98,7 @@ namespace Fungus /// /// Returns a list of all Blocks connected to this one. /// - List GetConnectedBlocks(); + List GetConnectedBlocks(); /// /// Returns the type of the previously executing command. diff --git a/Assets/Fungus/Flowchart/Scripts/ICommand.cs b/Assets/Fungus/Flowchart/Scripts/ICommand.cs index 699ff8a5..3dd97655 100644 --- a/Assets/Fungus/Flowchart/Scripts/ICommand.cs +++ b/Assets/Fungus/Flowchart/Scripts/ICommand.cs @@ -45,7 +45,7 @@ namespace Fungus /// This reference is only populated at runtime and in the editor when the /// block is selected. /// - Block ParentBlock { get; set; } + IBlock ParentBlock { get; set; } /// /// Returns the Flowchart that this command belongs to. @@ -84,12 +84,12 @@ namespace Fungus /// /// Called when the new command is added to a block in the editor. /// - void OnCommandAdded(Block parentBlock); + void OnCommandAdded(IBlock parentBlock); /// /// Called when the command is deleted from a block in the editor. /// - void OnCommandRemoved(Block parentBlock); + void OnCommandRemoved(IBlock parentBlock); /// /// Called when this command starts execution. @@ -109,7 +109,7 @@ namespace Fungus /// /// Populates a list with the Blocks that this command references. /// - void GetConnectedBlocks(ref List connectedBlocks); + void GetConnectedBlocks(ref List connectedBlocks); /// /// Returns true if this command references the variable. diff --git a/Assets/Fungus/Flowchart/Scripts/INode.cs b/Assets/Fungus/Flowchart/Scripts/INode.cs new file mode 100644 index 00000000..0285a067 --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/INode.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace Fungus +{ + /// + /// Flowchart nodes. + /// + public interface INode + { + /// + /// Returns the display rect. + /// + Rect _NodeRect { get; set; } + } +} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/INode.cs.meta b/Assets/Fungus/Flowchart/Scripts/INode.cs.meta new file mode 100644 index 00000000..9be7487a --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/INode.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e9eea916a931c4fed81b254bae8c0b93 +timeCreated: 1473862805 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Flowchart/Scripts/Node.cs b/Assets/Fungus/Flowchart/Scripts/Node.cs index 27fac885..268b45a9 100644 --- a/Assets/Fungus/Flowchart/Scripts/Node.cs +++ b/Assets/Fungus/Flowchart/Scripts/Node.cs @@ -9,9 +9,14 @@ namespace Fungus /// Base class for Flowchart nodes. /// [AddComponentMenu("")] - public class Node : MonoBehaviour + public class Node : MonoBehaviour, INode { [SerializeField] protected Rect nodeRect = new Rect(0, 0, 120, 30); + + #region INode implementation + public virtual Rect _NodeRect { get { return nodeRect; } set { nodeRect = value; } } + + #endregion } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/Call.cs b/Assets/Fungus/Scripts/Commands/Call.cs index e3670414..223eae26 100644 --- a/Assets/Fungus/Scripts/Commands/Call.cs +++ b/Assets/Fungus/Scripts/Commands/Call.cs @@ -45,7 +45,7 @@ namespace Fungus if (targetBlock != null) { // Check if calling your own parent block - if (targetBlock == ParentBlock) + if (ParentBlock.Equals(targetBlock)) { // Just ignore the callmode in this case, and jump to first command in list Continue(0); @@ -91,7 +91,7 @@ namespace Fungus } } - public override void GetConnectedBlocks(ref List connectedBlocks) + public override void GetConnectedBlocks(ref List connectedBlocks) { if (targetBlock != null) { diff --git a/Assets/Fungus/Scripts/Commands/ControlStage.cs b/Assets/Fungus/Scripts/Commands/ControlStage.cs index d0c43dbd..73e67ef8 100644 --- a/Assets/Fungus/Scripts/Commands/ControlStage.cs +++ b/Assets/Fungus/Scripts/Commands/ControlStage.cs @@ -197,7 +197,7 @@ namespace Fungus return new Color32(230, 200, 250, 255); } - public override void OnCommandAdded(Block parentBlock) + public override void OnCommandAdded(IBlock parentBlock) { //Default to display type: show display = StageDisplayType.Show; diff --git a/Assets/Fungus/Scripts/Commands/Menu.cs b/Assets/Fungus/Scripts/Commands/Menu.cs index 09340e28..c29167a9 100644 --- a/Assets/Fungus/Scripts/Commands/Menu.cs +++ b/Assets/Fungus/Scripts/Commands/Menu.cs @@ -62,7 +62,7 @@ namespace Fungus Continue(); } - public override void GetConnectedBlocks(ref List connectedBlocks) + public override void GetConnectedBlocks(ref List connectedBlocks) { if (targetBlock != null) { diff --git a/Assets/Fungus/Scripts/Commands/MenuTimer.cs b/Assets/Fungus/Scripts/Commands/MenuTimer.cs index 4e17ed81..24ceb68a 100644 --- a/Assets/Fungus/Scripts/Commands/MenuTimer.cs +++ b/Assets/Fungus/Scripts/Commands/MenuTimer.cs @@ -37,7 +37,7 @@ namespace Fungus Continue(); } - public override void GetConnectedBlocks(ref List connectedBlocks) + public override void GetConnectedBlocks(ref List connectedBlocks) { if (targetBlock != null) { diff --git a/Assets/Fungus/Scripts/Commands/Portrait.cs b/Assets/Fungus/Scripts/Commands/Portrait.cs index 4e119220..f1600d92 100644 --- a/Assets/Fungus/Scripts/Commands/Portrait.cs +++ b/Assets/Fungus/Scripts/Commands/Portrait.cs @@ -207,7 +207,7 @@ namespace Fungus return new Color32(230, 200, 250, 255); } - public override void OnCommandAdded(Block parentBlock) + public override void OnCommandAdded(IBlock parentBlock) { //Default to display type: show display = DisplayType.Show; diff --git a/Assets/Fungus/Scripts/Commands/SetInteractable.cs b/Assets/Fungus/Scripts/Commands/SetInteractable.cs index 5357c2ab..b967b4df 100644 --- a/Assets/Fungus/Scripts/Commands/SetInteractable.cs +++ b/Assets/Fungus/Scripts/Commands/SetInteractable.cs @@ -81,7 +81,7 @@ namespace Fungus return new Color32(180, 250, 250, 255); } - public override void OnCommandAdded(Block parentBlock) + public override void OnCommandAdded(IBlock parentBlock) { targetObjects.Add(null); } diff --git a/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs b/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs index 06f615f1..8fe4f663 100644 --- a/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs +++ b/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs @@ -72,7 +72,7 @@ namespace Fungus return false; } - public override void OnCommandAdded(Block parentBlock) + public override void OnCommandAdded(IBlock parentBlock) { // Add a default empty entry targetSprites.Add(null); diff --git a/Assets/Fungus/Scripts/Commands/StopBlock.cs b/Assets/Fungus/Scripts/Commands/StopBlock.cs index f7a3f89e..3afcefd4 100644 --- a/Assets/Fungus/Scripts/Commands/StopBlock.cs +++ b/Assets/Fungus/Scripts/Commands/StopBlock.cs @@ -31,7 +31,7 @@ namespace Fungus flowchart = GetFlowchart(); } - Block block = flowchart.FindBlock(blockName.Value); + IBlock block = flowchart.FindBlock(blockName.Value); if (block == null || !block.IsExecuting()) { diff --git a/Assets/Fungus/Scripts/Commands/TweenUI.cs b/Assets/Fungus/Scripts/Commands/TweenUI.cs index 4cba1bf7..6a56e2ed 100644 --- a/Assets/Fungus/Scripts/Commands/TweenUI.cs +++ b/Assets/Fungus/Scripts/Commands/TweenUI.cs @@ -65,7 +65,7 @@ namespace Fungus Continue(); } - public override void OnCommandAdded(Block parentBlock) + public override void OnCommandAdded(IBlock parentBlock) { // Add an empty slot by default. Saves an unnecessary user click. if (targetObjects.Count == 0) diff --git a/Assets/Fungus/Scripts/Components/Localization.cs b/Assets/Fungus/Scripts/Components/Localization.cs index 3dcf540a..375e884b 100644 --- a/Assets/Fungus/Scripts/Components/Localization.cs +++ b/Assets/Fungus/Scripts/Components/Localization.cs @@ -138,8 +138,8 @@ namespace Fungus Flowchart[] flowcharts = GameObject.FindObjectsOfType(); foreach (Flowchart flowchart in flowcharts) { - Block[] blocks = flowchart.GetComponents(); - foreach (Block block in blocks) + IBlock[] blocks = flowchart.GetComponents(); + foreach (IBlock block in blocks) { foreach (Command command in block.CommandList) { diff --git a/Assets/Fungus/Scripts/Components/MenuDialog.cs b/Assets/Fungus/Scripts/Components/MenuDialog.cs index d76ca18e..2f0a6b52 100644 --- a/Assets/Fungus/Scripts/Components/MenuDialog.cs +++ b/Assets/Fungus/Scripts/Components/MenuDialog.cs @@ -72,7 +72,7 @@ namespace Fungus Canvas.ForceUpdateCanvases(); } - protected virtual IEnumerator WaitForTimeout(float timeoutDuration, Block targetBlock) + protected virtual IEnumerator WaitForTimeout(float timeoutDuration, IBlock targetBlock) { float elapsedTime = 0; @@ -147,7 +147,7 @@ namespace Fungus } } - public virtual bool AddOption(string text, bool interactable, Block targetBlock) + public virtual bool AddOption(string text, bool interactable, IBlock targetBlock) { bool addedOption = false; foreach (Button button in cachedButtons) @@ -169,7 +169,7 @@ namespace Fungus textComponent.text = text; } - Block block = targetBlock; + IBlock block = targetBlock; button.onClick.AddListener(delegate { @@ -244,7 +244,7 @@ namespace Fungus return addedOption; } - public virtual void ShowTimer(float duration, Block targetBlock) + public virtual void ShowTimer(float duration, IBlock targetBlock) { if (cachedSlider != null) { diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index 9a84341b..7420a2a0 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -20,13 +20,13 @@ namespace Fungus { protected class SetEventHandlerOperation { - public Block block; + public IBlock block; public Type eventHandlerType; } protected class AddCommandOperation { - public Block block; + public IBlock block; public Type commandType; public int index; } @@ -59,7 +59,7 @@ namespace Fungus EditorGUI.PropertyField(blockNameRect, blockNameProperty, new GUIContent("")); // Ensure block name is unique for this Flowchart - Block block = target as Block; + IBlock block = target as IBlock; string uniqueName = flowchart.GetUniqueBlockKey(blockNameProperty.stringValue, block); if (uniqueName != block.BlockName) { @@ -89,7 +89,7 @@ namespace Fungus actionList.Clear(); } - Block block = target as Block; + IBlock block = target as IBlock; SerializedProperty commandListProperty = serializedObject.FindProperty("commandList"); @@ -114,7 +114,7 @@ namespace Fungus ReorderableListGUI.Title("Commands"); CommandListAdaptor adaptor = new CommandListAdaptor(commandListProperty, 0); - adaptor.nodeRect = block._NodeRect; + adaptor.nodeRect = (block as INode)._NodeRect; ReorderableListFlags flags = ReorderableListFlags.HideAddButton | ReorderableListFlags.HideRemoveButtons | ReorderableListFlags.DisableContextMenu; @@ -305,7 +305,7 @@ namespace Fungus // event handler selected. List eventHandlerTypes = EditorExtensions.FindDerivedTypes(typeof(EventHandler)).ToList(); - Block block = target as Block; + IBlock block = target as IBlock; System.Type currentType = null; if (block._EventHandler != null) { @@ -382,14 +382,14 @@ namespace Fungus protected void OnSelectEventHandler(object obj) { SetEventHandlerOperation operation = obj as SetEventHandlerOperation; - Block block = operation.block; + IBlock block = operation.block; System.Type selectedType = operation.eventHandlerType; if (block == null) { return; } - Undo.RecordObject(block, "Set Event Handler"); + Undo.RecordObject((Block)block, "Set Event Handler"); if (block._EventHandler != null) { @@ -398,13 +398,13 @@ namespace Fungus if (selectedType != null) { - EventHandler newHandler = Undo.AddComponent(block.gameObject, selectedType) as EventHandler; + EventHandler newHandler = Undo.AddComponent(((Block)block).gameObject, selectedType) as EventHandler; newHandler.ParentBlock = block; block._EventHandler = newHandler; } // Because this is an async call, we need to force prefab instances to record changes - PrefabUtility.RecordPrefabInstancePropertyModifications(block); + PrefabUtility.RecordPrefabInstancePropertyModifications((Block)block); } static public void BlockField(SerializedProperty property, GUIContent label, GUIContent nullLabel, Flowchart flowchart) @@ -414,14 +414,14 @@ namespace Fungus return; } - Block block = property.objectReferenceValue as Block; + IBlock block = property.objectReferenceValue as IBlock; // Build dictionary of child blocks List blockNames = new List(); int selectedIndex = 0; blockNames.Add(nullLabel); - Block[] blocks = flowchart.GetComponents(); + IBlock[] blocks = flowchart.GetComponents(); for (int i = 0; i < blocks.Length; ++i) { blockNames.Add(new GUIContent(blocks[i].BlockName)); @@ -442,7 +442,7 @@ namespace Fungus block = blocks[selectedIndex - 1]; } - property.objectReferenceValue = block; + property.objectReferenceValue = (Block)block; } static public Block BlockField(Rect position, GUIContent nullLabel, Flowchart flowchart, Block block) @@ -631,7 +631,7 @@ namespace Fungus protected virtual void ShowCommandMenu() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); @@ -722,7 +722,7 @@ namespace Fungus { AddCommandOperation commandOperation = obj as AddCommandOperation; - Block block = commandOperation.block; + IBlock block = commandOperation.block; if (block == null) { return; @@ -732,7 +732,7 @@ namespace Fungus flowchart.ClearSelectedCommands(); - Command newCommand = Undo.AddComponent(block.gameObject, commandOperation.commandType) as Command; + Command newCommand = Undo.AddComponent(((Block)block).gameObject, commandOperation.commandType) as Command; block.GetFlowchart().AddSelectedCommand(newCommand); newCommand.ParentBlock = block; newCommand.ItemId = flowchart.NextItemId(); @@ -740,7 +740,7 @@ namespace Fungus // Let command know it has just been added to the block newCommand.OnCommandAdded(block); - Undo.RecordObject(block, "Set command type"); + Undo.RecordObject((Block)block, "Set command type"); if (commandOperation.index < block.CommandList.Count - 1) { block.CommandList.Insert(commandOperation.index, newCommand); @@ -751,12 +751,12 @@ namespace Fungus } // Because this is an async call, we need to force prefab instances to record changes - PrefabUtility.RecordPrefabInstancePropertyModifications(block); + PrefabUtility.RecordPrefabInstancePropertyModifications((Block)block); } public virtual void ShowContextMenu() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); if (flowchart == null) @@ -844,7 +844,7 @@ namespace Fungus protected void SelectAll() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); if (flowchart == null || @@ -865,7 +865,7 @@ namespace Fungus protected void SelectNone() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); if (flowchart == null || @@ -888,7 +888,7 @@ namespace Fungus protected void Copy() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); if (flowchart == null || @@ -918,7 +918,7 @@ namespace Fungus protected void Paste() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); if (flowchart == null || @@ -970,14 +970,14 @@ namespace Fungus } // Because this is an async call, we need to force prefab instances to record changes - PrefabUtility.RecordPrefabInstancePropertyModifications(block); + PrefabUtility.RecordPrefabInstancePropertyModifications((Block)block); Repaint(); } protected void Delete() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); if (flowchart == null || @@ -998,7 +998,7 @@ namespace Fungus // Order of destruction is important here for undo to work Undo.DestroyObjectImmediate(command); - Undo.RecordObject(flowchart.SelectedBlock, "Delete"); + Undo.RecordObject((Block)flowchart.SelectedBlock, "Delete"); flowchart.SelectedBlock.CommandList.RemoveAt(i); lastSelectedIndex = i; @@ -1022,7 +1022,7 @@ namespace Fungus protected void PlayCommand() { - Block targetBlock = target as Block; + IBlock targetBlock = target as IBlock; Flowchart flowchart = targetBlock.GetFlowchart(); Command command = flowchart.SelectedCommands[0]; if (targetBlock.IsExecuting()) @@ -1042,7 +1042,7 @@ namespace Fungus protected void StopAllPlayCommand() { - Block targetBlock = target as Block; + IBlock targetBlock = target as IBlock; Flowchart flowchart = targetBlock.GetFlowchart(); Command command = flowchart.SelectedCommands[0]; @@ -1051,7 +1051,7 @@ namespace Fungus flowchart.StartCoroutine(RunBlock(flowchart, targetBlock, command.CommandIndex, 0.2f)); } - protected IEnumerator RunBlock(Flowchart flowchart, Block targetBlock, int commandIndex, float delay) + protected IEnumerator RunBlock(Flowchart flowchart, IBlock targetBlock, int commandIndex, float delay) { yield return new WaitForSeconds(delay); flowchart.ExecuteBlock(targetBlock, commandIndex); @@ -1059,7 +1059,7 @@ namespace Fungus protected void SelectPrevious() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); int firstSelectedIndex = flowchart.SelectedBlock.CommandList.Count; @@ -1099,7 +1099,7 @@ namespace Fungus protected void SelectNext() { - Block block = target as Block; + IBlock block = target as IBlock; Flowchart flowchart = block.GetFlowchart(); int lastSelectedIndex = -1; diff --git a/Assets/Fungus/Scripts/Editor/BlockInspector.cs b/Assets/Fungus/Scripts/Editor/BlockInspector.cs index 02962d28..833f098a 100644 --- a/Assets/Fungus/Scripts/Editor/BlockInspector.cs +++ b/Assets/Fungus/Scripts/Editor/BlockInspector.cs @@ -70,20 +70,20 @@ namespace Fungus public override void OnInspectorGUI () { BlockInspector blockInspector = target as BlockInspector; - Block block = blockInspector.block; - - if (block == null) + if (blockInspector.block == null) { return; } + IBlock block = blockInspector.block; + Flowchart flowchart = block.GetFlowchart(); if (activeBlockEditor == null || - block != activeBlockEditor.target) + !block.Equals(activeBlockEditor.target)) { DestroyImmediate(activeBlockEditor); - activeBlockEditor = Editor.CreateEditor(block) as BlockEditor; + activeBlockEditor = Editor.CreateEditor((Block)block) as BlockEditor; } activeBlockEditor.DrawBlockName(flowchart); diff --git a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs index 352401a5..0dd64147 100644 --- a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs @@ -84,13 +84,13 @@ namespace Fungus return null; } - Block block = flowchart.SelectedBlock; + IBlock block = flowchart.SelectedBlock; if (block == null) { return null; } - Command newCommand = Undo.AddComponent(block.gameObject) as Command; + Command newCommand = Undo.AddComponent(((Block)block).gameObject) as Command; newCommand.ItemId = flowchart.NextItemId(); flowchart.ClearSelectedCommands(); flowchart.AddSelectedCommand(newCommand); @@ -103,10 +103,10 @@ namespace Fungus Command command = _arrayProperty.GetArrayElementAtIndex(index).objectReferenceValue as Command; // Add the command as a new component - Block parentBlock = command.GetComponent(); + IBlock parentBlock = command.GetComponent(); System.Type type = command.GetType(); - Command newCommand = Undo.AddComponent(parentBlock.gameObject, type) as Command; + Command newCommand = Undo.AddComponent(((Block)parentBlock).gameObject, type) as Command; newCommand.ItemId = newCommand.GetFlowchart().NextItemId(); System.Reflection.FieldInfo[] fields = type.GetFields(); foreach (System.Reflection.FieldInfo field in fields) diff --git a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs index 63794ade..5ee63a14 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs @@ -24,7 +24,7 @@ namespace Fungus // Only the first created Flowchart in the scene should have a default GameStarted block if (GameObject.FindObjectsOfType().Length > 1) { - Block block = go.GetComponent(); + IBlock block = go.GetComponent(); block._EventHandler = null; GameObject.DestroyImmediate(block._EventHandler); } diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index 26b5c3f4..c3311feb 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -12,9 +12,9 @@ namespace Fungus { public class FlowchartWindow : EditorWindow { - public static List deleteList = new List(); + public static List deleteList = new List(); - protected List windowBlockMap = new List(); + protected List windowBlockMap = new List(); // The ReorderableList control doesn't drag properly when used with GUI.DragWindow(), // so we just implement dragging ourselves. @@ -74,7 +74,7 @@ namespace Fungus { ShowBlockInspector(flowchart); } - blockInspector.block = flowchart.SelectedBlock; + blockInspector.block = (Block)flowchart.SelectedBlock; } forceRepaintCount--; @@ -117,7 +117,7 @@ namespace Fungus } // Delete any scheduled objects - foreach (Block deleteBlock in deleteList) + foreach (IBlock deleteBlock in deleteList) { bool isSelected = (flowchart.SelectedBlock == deleteBlock); @@ -126,7 +126,7 @@ namespace Fungus Undo.DestroyObjectImmediate(command); } - Undo.DestroyObjectImmediate(deleteBlock); + Undo.DestroyObjectImmediate((Block)deleteBlock); flowchart.ClearSelectedCommands(); if (isSelected) @@ -219,15 +219,21 @@ namespace Fungus protected virtual void DrawFlowchartView(Flowchart flowchart) { - Block[] blocks = flowchart.GetComponents(); + IBlock[] blocks = flowchart.GetComponents(); - foreach (Block block in blocks) + foreach (IBlock block in blocks) { + var node = block as INode; + if (node == null) + { + continue; + } + var newRect = new Rect(); - newRect.xMin = Mathf.Min(flowchart.ScrollViewRect.xMin, block._NodeRect.xMin - 400); - newRect.xMax = Mathf.Max(flowchart.ScrollViewRect.xMax, block._NodeRect.xMax + 400); - newRect.yMin = Mathf.Min(flowchart.ScrollViewRect.yMin, block._NodeRect.yMin - 400); - newRect.yMax = Mathf.Max(flowchart.ScrollViewRect.yMax, block._NodeRect.yMax + 400); + newRect.xMin = Mathf.Min(flowchart.ScrollViewRect.xMin, node._NodeRect.xMin - 400); + newRect.xMax = Mathf.Max(flowchart.ScrollViewRect.xMax, node._NodeRect.xMax + 400); + newRect.yMin = Mathf.Min(flowchart.ScrollViewRect.yMin, node._NodeRect.yMin - 400); + newRect.yMax = Mathf.Max(flowchart.ScrollViewRect.yMax, node._NodeRect.yMax + 400); flowchart.ScrollViewRect = newRect; } @@ -257,11 +263,11 @@ namespace Fungus CalcFlowchartCenter(flowchart, blocks); // Draw connections - foreach (Block block in blocks) + foreach (IBlock block in blocks) { DrawConnections(flowchart, block, false); } - foreach (Block block in blocks) + foreach (IBlock block in blocks) { DrawConnections(flowchart, block, true); } @@ -274,7 +280,7 @@ namespace Fungus windowBlockMap.Clear(); for (int i = 0; i < blocks.Length; ++i) { - Block block = blocks[i]; + IBlock block = blocks[i]; float nodeWidthA = nodeStyle.CalcSize(new GUIContent(block.BlockName)).x + 10; float nodeWidthB = 0f; @@ -282,10 +288,12 @@ namespace Fungus { nodeWidthB = nodeStyle.CalcSize(new GUIContent(block._EventHandler.GetSummary())).x + 10; } - + + var node = block as INode; + if (Event.current.button == 0) { - Rect tempRect = block._NodeRect; + Rect tempRect = node._NodeRect; tempRect.width = Mathf.Max(Mathf.Max(nodeWidthA, nodeWidthB), 120); tempRect.height = 40; @@ -304,7 +312,7 @@ namespace Fungus tempRect.x = startDragPosition.x; tempRect.y = startDragPosition.y; - Undo.RecordObject(block, "Node Position"); + Undo.RecordObject((Block)block, "Node Position"); tempRect.x = newPos.x; tempRect.y = newPos.y; @@ -313,10 +321,10 @@ namespace Fungus forceRepaintCount = 6; } - block._NodeRect = tempRect; + node._NodeRect = tempRect; } - Rect windowRect = new Rect(block._NodeRect); + Rect windowRect = new Rect(node._NodeRect); windowRect.x += flowchart.ScrollPos.x; windowRect.y += flowchart.ScrollPos.y; @@ -330,7 +338,7 @@ namespace Fungus EndWindows(); // Draw Event Handler labels - foreach (Block block in blocks) + foreach (IBlock block in blocks) { if (block._EventHandler != null) { @@ -347,8 +355,10 @@ namespace Fungus handlerStyle.margin.bottom = 0; handlerStyle.alignment = TextAnchor.MiddleCenter; - Rect rect = new Rect(block._NodeRect); - rect.height = handlerStyle.CalcHeight(new GUIContent(handlerLabel), block._NodeRect.width); + INode node = block as INode; + + Rect rect = new Rect(node._NodeRect); + rect.height = handlerStyle.CalcHeight(new GUIContent(handlerLabel), node._NodeRect.width); rect.x += flowchart.ScrollPos.x; rect.y += flowchart.ScrollPos.y - rect.height; @@ -360,7 +370,7 @@ namespace Fungus // Draw play icons beside all executing blocks if (Application.isPlaying) { - foreach (Block b in blocks) + foreach (IBlock b in blocks) { if (b.IsExecuting()) { @@ -371,7 +381,9 @@ namespace Fungus if (b.ExecutingIconTimer > Time.realtimeSinceStartup) { - Rect rect = new Rect(b._NodeRect); + INode node = b as INode; + + Rect rect = new Rect(node._NodeRect); rect.x += flowchart.ScrollPos.x - 37; rect.y += flowchart.ScrollPos.y + 3; @@ -402,7 +414,7 @@ namespace Fungus EditorZoomArea.End(); } - public virtual void CalcFlowchartCenter(Flowchart flowchart, Block[] blocks) + public virtual void CalcFlowchartCenter(Flowchart flowchart, IBlock[] blocks) { if (flowchart == null || blocks.Count() == 0) @@ -410,15 +422,17 @@ namespace Fungus return; } - Vector2 min = blocks[0]._NodeRect.min; - Vector2 max = blocks[0]._NodeRect.max; + Vector2 min = (blocks[0] as INode)._NodeRect.min; + Vector2 max = (blocks[0] as INode)._NodeRect.max; - foreach (Block block in blocks) + foreach (IBlock block in blocks) { - min.x = Mathf.Min(min.x, block._NodeRect.center.x); - min.y = Mathf.Min(min.y, block._NodeRect.center.y); - max.x = Mathf.Max(max.x, block._NodeRect.center.x); - max.y = Mathf.Max(max.y, block._NodeRect.center.y); + INode node = block as INode; + + min.x = Mathf.Min(min.x, node._NodeRect.center.x); + min.y = Mathf.Min(min.y, node._NodeRect.center.y); + max.x = Mathf.Max(max.x, node._NodeRect.center.x); + max.y = Mathf.Max(max.y, node._NodeRect.center.y); } Vector2 center = (min + max) * -0.5f; @@ -522,7 +536,7 @@ namespace Fungus } } - protected virtual void SelectBlock(Flowchart flowchart, Block block) + protected virtual void SelectBlock(Flowchart flowchart, IBlock block) { // Select the block and also select currently executing command ShowBlockInspector(flowchart); @@ -545,20 +559,20 @@ namespace Fungus return newBlock; } - protected virtual void DeleteBlock(Flowchart flowchart, Block block) + protected virtual void DeleteBlock(Flowchart flowchart, IBlock block) { foreach (Command command in block.CommandList) { Undo.DestroyObjectImmediate(command); } - Undo.DestroyObjectImmediate(block); + Undo.DestroyObjectImmediate((Block)block); flowchart.ClearSelectedCommands(); } protected virtual void DrawWindow(int windowId) { - Block block = windowBlockMap[windowId]; + IBlock block = windowBlockMap[windowId]; Flowchart flowchart = block.GetFlowchart(); if (flowchart == null) @@ -576,8 +590,11 @@ namespace Fungus Event.current.alt == false) { dragWindowId = windowId; - startDragPosition.x = block._NodeRect.x; - startDragPosition.y = block._NodeRect.y; + + var node = block as INode; + + startDragPosition.x = node._NodeRect.x; + startDragPosition.y = node._NodeRect.y; } if (windowId < windowBlockMap.Count) @@ -601,9 +618,9 @@ namespace Fungus else { // Count the number of unique connections (excluding self references) - List uniqueList = new List(); - List connectedBlocks = block.GetConnectedBlocks(); - foreach (Block connectedBlock in connectedBlocks) + List uniqueList = new List(); + List connectedBlocks = block.GetConnectedBlocks(); + foreach (IBlock connectedBlock in connectedBlocks) { if (connectedBlock == block || uniqueList.Contains(connectedBlock)) @@ -626,13 +643,14 @@ namespace Fungus nodeStyleCopy.normal.textColor = Color.black; // Make sure node is wide enough to fit the node name text + var n = block as INode; float width = nodeStyleCopy.CalcSize(new GUIContent(block.BlockName)).x; - Rect tempRect = block._NodeRect; - tempRect.width = Mathf.Max (block._NodeRect.width, width); - block._NodeRect = tempRect; + Rect tempRect = n._NodeRect; + tempRect.width = Mathf.Max (n._NodeRect.width, width); + n._NodeRect = tempRect; GUI.backgroundColor = Color.white; - GUILayout.Box(block.BlockName, nodeStyleCopy, GUILayout.Width(block._NodeRect.width), GUILayout.Height(block._NodeRect.height)); + GUILayout.Box(block.BlockName, nodeStyleCopy, GUILayout.Width(n._NodeRect.width), GUILayout.Height(n._NodeRect.height)); if (block.Description.Length > 0) { @@ -652,14 +670,14 @@ namespace Fungus } } - protected virtual void DrawConnections(Flowchart flowchart, Block block, bool highlightedOnly) + protected virtual void DrawConnections(Flowchart flowchart, IBlock block, bool highlightedOnly) { if (block == null) { return; } - List connectedBlocks = new List(); + List connectedBlocks = new List(); bool blockIsSelected = (flowchart.SelectedBlock == block); @@ -691,7 +709,7 @@ namespace Fungus connectedBlocks.Clear(); command.GetConnectedBlocks(ref connectedBlocks); - foreach (Block blockB in connectedBlocks) + foreach (IBlock blockB in connectedBlocks) { if (blockB == null || block == blockB || @@ -700,11 +718,11 @@ namespace Fungus continue; } - Rect startRect = new Rect(block._NodeRect); + Rect startRect = new Rect((block as INode)._NodeRect); startRect.x += flowchart.ScrollPos.x; startRect.y += flowchart.ScrollPos.y; - Rect endRect = new Rect(blockB._NodeRect); + Rect endRect = new Rect((blockB as INode)._NodeRect); endRect.x += flowchart.ScrollPos.x; endRect.y += flowchart.ScrollPos.y; @@ -764,7 +782,7 @@ namespace Fungus public static void DeleteBlock(object obj) { - Block block = obj as Block; + IBlock block = obj as IBlock; FlowchartWindow.deleteList.Add(block); } diff --git a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs index ae3a445c..0037dc10 100644 --- a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs @@ -44,7 +44,7 @@ namespace Fungus /// The option text to display on the button. /// If false, the option is displayed but is not selectable. /// Block to execute when the option is selected. - bool AddOption(string text, bool interactable, Block targetBlock); + bool AddOption(string text, bool interactable, IBlock targetBlock); /// /// Adds the option to the list of displayed options, calls a Lua function when selected. @@ -58,7 +58,7 @@ namespace Fungus /// /// The duration during which the player can select an option. /// Block to execute if the player does not select an option in time. - void ShowTimer(float duration, Block targetBlock); + void ShowTimer(float duration, IBlock targetBlock); /// /// Show a timer during which the player can select an option. Calls a Lua function when the timer expires. From 6097c4ee1e05ab7896899e610694e8b47e38053b Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 15:47:57 +0100 Subject: [PATCH 08/32] Refactored code to use ICommand interface where possible --- Assets/Fungus/Flowchart/Scripts/Block.cs | 14 +++++------ Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 24 +++++++++---------- Assets/Fungus/Flowchart/Scripts/IBlock.cs | 2 +- Assets/Fungus/Scripts/Commands/Else.cs | 2 +- Assets/Fungus/Scripts/Commands/ElseIf.cs | 2 +- Assets/Fungus/Scripts/Commands/If.cs | 4 ++-- Assets/Fungus/Scripts/Commands/Jump.cs | 2 +- Assets/Fungus/Scripts/Editor/BlockEditor.cs | 10 ++++---- .../Fungus/Scripts/Editor/BlockInspector.cs | 12 +++++----- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index a679ec0a..3c74d09d 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -34,7 +34,7 @@ namespace Fungus protected ExecutionState executionState; - protected Command activeCommand; + protected ICommand activeCommand; /// // Index of last command executed before the current one. @@ -66,7 +66,7 @@ namespace Fungus // Give each child command a reference back to its parent block // and tell each command its index in the list. int index = 0; - foreach (Command command in commandList) + foreach (ICommand command in commandList) { if (command == null) { @@ -92,7 +92,7 @@ namespace Fungus protected virtual void Update() { int index = 0; - foreach (Command command in commandList) + foreach (ICommand command in commandList) { if (command == null) // Null entry will be deleted automatically later { @@ -116,7 +116,7 @@ namespace Fungus public virtual EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } } - public virtual Command ActiveCommand { get { return activeCommand; } } + public virtual ICommand ActiveCommand { get { return activeCommand; } } public virtual float ExecutingIconTimer { get; set; } @@ -207,7 +207,7 @@ namespace Fungus previousActiveCommandIndex = activeCommand.CommandIndex; } - Command command = commandList[i]; + ICommand command = commandList[i]; activeCommand = command; if (flowchart.gameObject.activeInHierarchy) @@ -268,7 +268,7 @@ namespace Fungus public virtual List GetConnectedBlocks() { var connectedBlocks = new List(); - foreach (Command command in commandList) + foreach (ICommand command in commandList) { if (command != null) { @@ -292,7 +292,7 @@ namespace Fungus public virtual void UpdateIndentLevels() { int indentLevel = 0; - foreach(Command command in commandList) + foreach (ICommand command in commandList) { if (command == null) { diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index f07289bf..22f4052d 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -209,8 +209,8 @@ namespace Fungus maxId = Math.Max(maxId, block.ItemId); } - Command[] commands = GetComponents(); - foreach (Command command in commands) + var commands = GetComponents(); + foreach (var command in commands) { maxId = Math.Max(maxId, command.ItemId); } @@ -320,8 +320,8 @@ namespace Fungus usedIds.Add(block.ItemId); } - Command[] commands = GetComponents(); - foreach (Command command in commands) + var commands = GetComponents(); + foreach (var command in commands) { if (command.ItemId == -1 || usedIds.Contains(command.ItemId)) @@ -352,7 +352,7 @@ namespace Fungus } } - foreach (Command command in GetComponents()) + foreach (var command in GetComponents()) { bool found = false; foreach (IBlock block in blocks) @@ -637,7 +637,7 @@ namespace Fungus while (true) { bool collision = false; - foreach(Command command in block.CommandList) + foreach (ICommand command in block.CommandList) { Label label = command as Label; if (label == null || @@ -884,7 +884,7 @@ namespace Fungus } Command[] commands = GetComponents(); - foreach (Command command in commands) + foreach (var command in commands) { command.hideFlags = HideFlags.HideInInspector; } @@ -923,11 +923,11 @@ namespace Fungus /// /// Adds a command to the list of selected commands. /// - public virtual void AddSelectedCommand(Command command) + public virtual void AddSelectedCommand(ICommand command) { - if (!selectedCommands.Contains(command)) + if (!selectedCommands.Contains((Command)command)) { - selectedCommands.Add(command); + selectedCommands.Add((Command)command); } } @@ -938,8 +938,8 @@ namespace Fungus { if (resetCommands) { - Command[] commands = GetComponents(); - foreach (Command command in commands) + ICommand[] commands = GetComponents(); + foreach (var command in commands) { command.OnReset(); } diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Flowchart/Scripts/IBlock.cs index 7ff19109..73a9c535 100644 --- a/Assets/Fungus/Flowchart/Scripts/IBlock.cs +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs @@ -46,7 +46,7 @@ namespace Fungus /// /// The currently executing command. /// - Command ActiveCommand { get; } + ICommand ActiveCommand { get; } /// /// Timer for fading Block execution icon. diff --git a/Assets/Fungus/Scripts/Commands/Else.cs b/Assets/Fungus/Scripts/Commands/Else.cs index 0bbc3c57..35604e53 100644 --- a/Assets/Fungus/Scripts/Commands/Else.cs +++ b/Assets/Fungus/Scripts/Commands/Else.cs @@ -32,7 +32,7 @@ namespace Fungus int indent = indentLevel; for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i) { - Command command = ParentBlock.CommandList[i]; + ICommand command = ParentBlock.CommandList[i]; if (command.IndentLevel == indent) { diff --git a/Assets/Fungus/Scripts/Commands/ElseIf.cs b/Assets/Fungus/Scripts/Commands/ElseIf.cs index d41c0590..2f01c480 100644 --- a/Assets/Fungus/Scripts/Commands/ElseIf.cs +++ b/Assets/Fungus/Scripts/Commands/ElseIf.cs @@ -40,7 +40,7 @@ namespace Fungus int indent = indentLevel; for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i) { - Command command = ParentBlock.CommandList[i]; + ICommand command = ParentBlock.CommandList[i]; if (command.IndentLevel == indent) { diff --git a/Assets/Fungus/Scripts/Commands/If.cs b/Assets/Fungus/Scripts/Commands/If.cs index 81e4dffe..df7d54d5 100644 --- a/Assets/Fungus/Scripts/Commands/If.cs +++ b/Assets/Fungus/Scripts/Commands/If.cs @@ -107,7 +107,7 @@ namespace Fungus // Find the next Else, ElseIf or End command at the same indent level as this If command for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i) { - Command nextCommand = ParentBlock.CommandList[i]; + ICommand nextCommand = ParentBlock.CommandList[i]; if (nextCommand == null) { @@ -116,7 +116,7 @@ namespace Fungus // Find next command at same indent level as this If command // Skip disabled commands, comments & labels - if (!nextCommand.enabled || + if (!((Command)nextCommand).enabled || nextCommand.GetType() == typeof(Comment) || nextCommand.GetType() == typeof(Label) || nextCommand.IndentLevel != indentLevel) diff --git a/Assets/Fungus/Scripts/Commands/Jump.cs b/Assets/Fungus/Scripts/Commands/Jump.cs index e8fd6273..ff3214f2 100644 --- a/Assets/Fungus/Scripts/Commands/Jump.cs +++ b/Assets/Fungus/Scripts/Commands/Jump.cs @@ -27,7 +27,7 @@ namespace Fungus return; } - foreach (Command command in ParentBlock.CommandList) + foreach (ICommand command in ParentBlock.CommandList) { Label label = command as Label; if (label != null && diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index 7420a2a0..310f7d4e 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -103,7 +103,7 @@ namespace Fungus block.UpdateIndentLevels(); // Make sure each command has a reference to its parent block - foreach (Command command in block.CommandList) + foreach (ICommand command in block.CommandList) { if (command == null) // Will be deleted from the list later on { @@ -637,7 +637,7 @@ namespace Fungus // Use index of last selected command in list, or end of list if nothing selected. int index = -1; - foreach (Command command in flowchart.SelectedCommands) + foreach (ICommand command in flowchart.SelectedCommands) { if (command.CommandIndex + 1 > index) { @@ -732,7 +732,7 @@ namespace Fungus flowchart.ClearSelectedCommands(); - Command newCommand = Undo.AddComponent(((Block)block).gameObject, commandOperation.commandType) as Command; + ICommand newCommand = Undo.AddComponent(((Block)block).gameObject, commandOperation.commandType) as Command; block.GetFlowchart().AddSelectedCommand(newCommand); newCommand.ParentBlock = block; newCommand.ItemId = flowchart.NextItemId(); @@ -743,11 +743,11 @@ namespace Fungus Undo.RecordObject((Block)block, "Set command type"); if (commandOperation.index < block.CommandList.Count - 1) { - block.CommandList.Insert(commandOperation.index, newCommand); + block.CommandList.Insert(commandOperation.index, (Command)newCommand); } else { - block.CommandList.Add(newCommand); + block.CommandList.Add((Command)newCommand); } // Because this is an async call, we need to force prefab instances to record changes diff --git a/Assets/Fungus/Scripts/Editor/BlockInspector.cs b/Assets/Fungus/Scripts/Editor/BlockInspector.cs index 833f098a..f7221973 100644 --- a/Assets/Fungus/Scripts/Editor/BlockInspector.cs +++ b/Assets/Fungus/Scripts/Editor/BlockInspector.cs @@ -35,7 +35,7 @@ namespace Fungus // when a different block / command is selected. protected BlockEditor activeBlockEditor; protected CommandEditor activeCommandEditor; - protected Command activeCommand; // Command currently being inspected + protected ICommand activeCommand; // Command currently being inspected // Cached command editors to avoid creating / destroying editors more than necessary // This list is static so persists between @@ -101,7 +101,7 @@ namespace Fungus activeBlockEditor.DrawBlockGUI(flowchart); GUILayout.EndScrollView(); - Command inspectCommand = null; + ICommand inspectCommand = null; if (flowchart.SelectedCommands.Count == 1) { inspectCommand = flowchart.SelectedCommands[0]; @@ -143,7 +143,7 @@ namespace Fungus } } - public void DrawCommandUI(Flowchart flowchart, Command inspectCommand) + public void DrawCommandUI(Flowchart flowchart, ICommand inspectCommand) { ResizeScrollView(flowchart); @@ -156,10 +156,10 @@ namespace Fungus if (inspectCommand != null) { if (activeCommandEditor == null || - inspectCommand != activeCommandEditor.target) + !inspectCommand.Equals(activeCommandEditor.target)) { // See if we have a cached version of the command editor already, - var editors = (from e in cachedCommandEditors where (e != null && e.target == inspectCommand) select e); + var editors = (from e in cachedCommandEditors where (e != null && (e.target.Equals(inspectCommand))) select e); if (editors.Count() > 0) { @@ -169,7 +169,7 @@ namespace Fungus else { // No cached editor, so create a new one. - activeCommandEditor = Editor.CreateEditor(inspectCommand) as CommandEditor; + activeCommandEditor = Editor.CreateEditor((Command)inspectCommand) as CommandEditor; cachedCommandEditors.Add(activeCommandEditor); } } From dc0ea4355806e195c565d118fff463a6ac3c445f Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 16:48:48 +0100 Subject: [PATCH 09/32] Refactored EventHandler to use IEventHandler --- .../Fungus/Flowchart/Scripts/EventHandler.cs | 19 +++++------- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 2 +- Assets/Fungus/Flowchart/Scripts/IBlock.cs | 1 + .../Fungus/Flowchart/Scripts/IEventHandler.cs | 30 +++++++++++++++++++ .../Flowchart/Scripts/IEventHandler.cs.meta | 12 ++++++++ .../Scripts/Editor/FlowchartMenuItems.cs | 2 +- 6 files changed, 52 insertions(+), 14 deletions(-) create mode 100644 Assets/Fungus/Flowchart/Scripts/IEventHandler.cs create mode 100644 Assets/Fungus/Flowchart/Scripts/IEventHandler.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs index 332fc4be..4602439c 100644 --- a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs +++ b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs @@ -32,23 +32,19 @@ namespace Fungus /// Add an EventHandlerInfo attibute and your new EventHandler class will automatically appear in the /// 'Execute On Event' dropdown menu when a block is selected. /// - [RequireComponent(typeof(IBlock))] + [RequireComponent(typeof(Block))] [RequireComponent(typeof(Flowchart))] [AddComponentMenu("")] - public class EventHandler : MonoBehaviour + public class EventHandler : MonoBehaviour, IEventHandler { - /// - /// Returns the parent Block which owns this Event Handler. - /// - /// The parent block. [HideInInspector] [FormerlySerializedAs("parentSequence")] [SerializeField] protected Block parentBlock; + + #region IEventHandler + public virtual IBlock ParentBlock { get { return parentBlock; } set { parentBlock = (Block)value; } } - /// - /// The Event Handler should call this method when the event is detected. - /// public virtual bool ExecuteBlock() { if (parentBlock == null) @@ -72,12 +68,11 @@ namespace Fungus return flowchart.ExecuteBlock(parentBlock); } - /// - /// Returns custom summary text for the event handler. - /// public virtual string GetSummary() { return ""; } + + #endregion } } diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index 22f4052d..4dc6d5a9 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -890,7 +890,7 @@ namespace Fungus } EventHandler[] eventHandlers = GetComponents(); - foreach (EventHandler eventHandler in eventHandlers) + foreach (var eventHandler in eventHandlers) { eventHandler.hideFlags = HideFlags.HideInInspector; } diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Flowchart/Scripts/IBlock.cs index 73a9c535..ffa44332 100644 --- a/Assets/Fungus/Flowchart/Scripts/IBlock.cs +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs @@ -40,6 +40,7 @@ namespace Fungus /// /// An optional Event Handler which can execute the block when an event occurs. + /// Note: Using the concrete class instead of the interface here because of weird editor behaviour. /// EventHandler _EventHandler { get; set; } diff --git a/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs b/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs new file mode 100644 index 00000000..33998b3f --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs @@ -0,0 +1,30 @@ +using UnityEngine; + +namespace Fungus +{ + /// + /// A Block may have an associated Event Handler which starts executing commands when + /// a specific event occurs. + /// To create a custom Event Handler, simply subclass EventHandler and call the ExecuteBlock() method + /// when the event occurs. + /// Add an EventHandlerInfo attibute and your new EventHandler class will automatically appear in the + /// 'Execute On Event' dropdown menu when a block is selected. + /// + public interface IEventHandler + { + /// + /// The parent Block which owns this Event Handler. + /// + IBlock ParentBlock { get; set; } + + /// + /// The Event Handler should call this method when the event is detected to start executing the Block. + /// + bool ExecuteBlock(); + + /// + /// Returns custom summary text for the event handler. + /// + string GetSummary(); + } +} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs.meta b/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs.meta new file mode 100644 index 00000000..9c74a406 --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5ae3dddb3147c4a07a851843721affe8 +timeCreated: 1473856414 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs index 5ee63a14..168c5c71 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs @@ -25,8 +25,8 @@ namespace Fungus if (GameObject.FindObjectsOfType().Length > 1) { IBlock block = go.GetComponent(); - block._EventHandler = null; GameObject.DestroyImmediate(block._EventHandler); + block._EventHandler = null; } } From 353782e441ba4b4e0811b7c505870e6798b05017 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 14 Sep 2016 16:50:30 +0100 Subject: [PATCH 10/32] Added protected virtual to DoLoadBlock in SceneLoader --- Assets/Fungus/Flowchart/Scripts/SceneLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs b/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs index 74b8796f..a85ee1c8 100644 --- a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs +++ b/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs @@ -43,7 +43,7 @@ namespace Fungus StartCoroutine(DoLoadBlock()); } - IEnumerator DoLoadBlock() + protected virtual IEnumerator DoLoadBlock() { // Wait until loading image has been displayed in OnGUI while (loadingTexture != null && From 5c8f5f4214ddf73938b08411b2e75d19ca13c3f7 Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 15 Sep 2016 15:33:58 +0100 Subject: [PATCH 11/32] Fixed Flowchart component being hidden by accident. --- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index 4dc6d5a9..aff19c12 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -871,15 +871,13 @@ namespace Fungus { if (hideComponents) { - IBlock[] blocks = GetComponents(); - foreach (IBlock block in blocks) + Block[] blocks = GetComponents(); + foreach (Block block in blocks) { - GameObject go = ((Block)block).gameObject; - - go.hideFlags = HideFlags.HideInInspector; - if (go != gameObject) + block.hideFlags = HideFlags.HideInInspector; + if (block.gameObject != gameObject) { - go.hideFlags = HideFlags.HideInHierarchy; + block.hideFlags = HideFlags.HideInHierarchy; } } From 03fa7078510f6fba8d03bb30211c0737482521b7 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 09:50:31 +0100 Subject: [PATCH 12/32] Refactored Variable to use IVariable interface --- Assets/Fungus/Flowchart/Scripts/IVariable.cs | 25 +++++++++++++++++++ .../Flowchart/Scripts/IVariable.cs.meta | 12 +++++++++ Assets/Fungus/Flowchart/Scripts/Variable.cs | 10 ++++++-- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 Assets/Fungus/Flowchart/Scripts/IVariable.cs create mode 100644 Assets/Fungus/Flowchart/Scripts/IVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/IVariable.cs b/Assets/Fungus/Flowchart/Scripts/IVariable.cs new file mode 100644 index 00000000..72da5ff6 --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IVariable.cs @@ -0,0 +1,25 @@ +using UnityEngine; + +namespace Fungus +{ + /// + /// A Fungus variable that can be used with Commands. + /// + public interface IVariable + { + /// + /// Visibility scope for the variable. + /// + VariableScope Scope { get; } + + /// + /// String identifier for the variable. + /// + string Key { get; set; } + + /// + /// Callback to reset the variable if the Flowchart is reset. + /// + void OnReset(); + } +} diff --git a/Assets/Fungus/Flowchart/Scripts/IVariable.cs.meta b/Assets/Fungus/Flowchart/Scripts/IVariable.cs.meta new file mode 100644 index 00000000..29e4d18f --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IVariable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 75ff90e0b811142d39cc9031dbf4b992 +timeCreated: 1473856441 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Flowchart/Scripts/Variable.cs b/Assets/Fungus/Flowchart/Scripts/Variable.cs index 899d005c..4e7c28d5 100644 --- a/Assets/Fungus/Flowchart/Scripts/Variable.cs +++ b/Assets/Fungus/Flowchart/Scripts/Variable.cs @@ -57,15 +57,21 @@ namespace Fungus /// Abstract base class for variables. /// [RequireComponent(typeof(Flowchart))] - public abstract class Variable : MonoBehaviour + public abstract class Variable : MonoBehaviour, IVariable { [SerializeField] protected VariableScope scope; - public virtual VariableScope Scope { get { return scope; } } [SerializeField] protected string key = ""; + + #region IVariable implementation + + public virtual VariableScope Scope { get { return scope; } } + public virtual string Key { get { return key; } set { key = value; } } public abstract void OnReset(); + + #endregion } /// From aa66d50f37c0d00b526d8c6dea52b0eaeb2c1e18 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 09:57:47 +0100 Subject: [PATCH 13/32] Refactored FungusState to use IFungusState interface --- Assets/Fungus/Flowchart/Scripts/FungusState.cs | 5 +++++ Assets/Tests/Lua/IFungusState.cs | 17 +++++++++++++++++ Assets/Tests/Lua/IFungusState.cs.meta | 12 ++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 Assets/Tests/Lua/IFungusState.cs create mode 100644 Assets/Tests/Lua/IFungusState.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/FungusState.cs b/Assets/Fungus/Flowchart/Scripts/FungusState.cs index 65438659..a530bb1f 100644 --- a/Assets/Fungus/Flowchart/Scripts/FungusState.cs +++ b/Assets/Fungus/Flowchart/Scripts/FungusState.cs @@ -13,6 +13,11 @@ namespace Fungus public class FungusState : MonoBehaviour { [SerializeField] protected Flowchart selectedFlowchart; + + #region IFungusState implementation + public virtual Flowchart SelectedFlowchart { get { return selectedFlowchart; } set { selectedFlowchart = value; } } + + #endregion } } \ No newline at end of file diff --git a/Assets/Tests/Lua/IFungusState.cs b/Assets/Tests/Lua/IFungusState.cs new file mode 100644 index 00000000..31456586 --- /dev/null +++ b/Assets/Tests/Lua/IFungusState.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + /// + /// Used by the Flowchart window to serialize the currently active Flowchart object + /// so that the same Flowchart can be displayed while editing & playing. + /// + public interface IFungusState + { + /// + /// The currently selected Flowchart. + /// + Flowchart SelectedFlowchart { get; set; } + } +} \ No newline at end of file diff --git a/Assets/Tests/Lua/IFungusState.cs.meta b/Assets/Tests/Lua/IFungusState.cs.meta new file mode 100644 index 00000000..50745bf6 --- /dev/null +++ b/Assets/Tests/Lua/IFungusState.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 36cb688eedcc4436780e68405a4ba494 +timeCreated: 1474015940 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 940d1e44ee0b12ab55c9c6c244e5cfeeb2609712 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 10:07:56 +0100 Subject: [PATCH 14/32] FungusState inherits from IFungusState --- Assets/Fungus/Flowchart/Scripts/FungusState.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Fungus/Flowchart/Scripts/FungusState.cs b/Assets/Fungus/Flowchart/Scripts/FungusState.cs index a530bb1f..af544577 100644 --- a/Assets/Fungus/Flowchart/Scripts/FungusState.cs +++ b/Assets/Fungus/Flowchart/Scripts/FungusState.cs @@ -10,7 +10,7 @@ namespace Fungus /// so that the same Flowchart can be displayed while editing & playing. /// [AddComponentMenu("")] - public class FungusState : MonoBehaviour + public class FungusState : MonoBehaviour, IFungusState { [SerializeField] protected Flowchart selectedFlowchart; From cdeab7b3a4aebc66e18290bb81ae0e76475fda44 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 12:08:04 +0100 Subject: [PATCH 15/32] Refactored Flowchart to use IFlowchart interface --- Assets/Fungus/Flowchart/Scripts/Block.cs | 2 +- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 426 ++++++------------ Assets/Fungus/Flowchart/Scripts/IFlowchart.cs | 289 ++++++++++++ .../Flowchart/Scripts/IFlowchart.cs.meta | 12 + .../Fungus/Flowchart/Scripts/IUpdateable.cs | 15 + .../Flowchart/Scripts/IUpdateable.cs.meta | 12 + 6 files changed, 463 insertions(+), 293 deletions(-) create mode 100644 Assets/Fungus/Flowchart/Scripts/IFlowchart.cs create mode 100644 Assets/Fungus/Flowchart/Scripts/IFlowchart.cs.meta create mode 100644 Assets/Fungus/Flowchart/Scripts/IUpdateable.cs create mode 100644 Assets/Fungus/Flowchart/Scripts/IUpdateable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 3c74d09d..245fe83e 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -210,7 +210,7 @@ namespace Fungus ICommand command = commandList[i]; activeCommand = command; - if (flowchart.gameObject.activeInHierarchy) + if (flowchart.IsActive()) { // Auto select a command in some situations if ((flowchart.SelectedCommands.Count == 0 && i == 0) || diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index aff19c12..a3878e98 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -12,22 +12,12 @@ using System.Text.RegularExpressions; namespace Fungus { - /// - /// Interface for Flowchart components which can be updated when the - /// scene loads in the editor. This is used to maintain backwards - /// compatibility with earlier versions of Fungus. - /// - interface IUpdateable - { - void UpdateToVersion(int oldVersion, int newVersion); - } - /// /// Visual scripting controller for the Flowchart programming language. /// Flowchart objects may be edited visually using the Flowchart editor window. /// [ExecuteInEditMode] - public class Flowchart : MonoBehaviour, ISubstitutionHandler + public class Flowchart : MonoBehaviour, IFlowchart, ISubstitutionHandler { /// /// The current version of the Flowchart. Used for updating components. @@ -39,184 +29,91 @@ namespace Fungus /// public const string DEFAULT_BLOCK_NAME = "New Block"; - /// - /// Variable to track flowchart's version so components can update to new versions. - /// [HideInInspector] [SerializeField] protected int version = 0; // Default to 0 to always trigger an update for older versions of Fungus. - public int Version { set { version = value; } } - /// - /// Scroll position of Flowchart editor window. - /// [HideInInspector] [SerializeField] protected Vector2 scrollPos; - public virtual Vector2 ScrollPos { get { return scrollPos; } set { scrollPos = value; } } - /// - /// Scroll position of Flowchart variables window. - /// [HideInInspector] [SerializeField] protected Vector2 variablesScrollPos; - public virtual Vector2 VariablesScrollPos { get { return variablesScrollPos; } set { variablesScrollPos = value; } } - /// - /// Show the variables pane. - /// [HideInInspector] [SerializeField] protected bool variablesExpanded = true; - public virtual bool VariablesExpanded { get { return variablesExpanded; } set { variablesExpanded = value; } } - /// - /// Height of command block view in inspector. - /// [HideInInspector] [SerializeField] protected float blockViewHeight = 400; - public virtual float BlockViewHeight { get { return blockViewHeight; } set { blockViewHeight = value; } } - /// - /// Zoom level of Flowchart editor window. - /// [HideInInspector] [SerializeField] protected float zoom = 1f; - public virtual float Zoom { get { return zoom; } set { zoom = value; } } - /// - /// Scrollable area for Flowchart editor window. - /// [HideInInspector] [SerializeField] protected Rect scrollViewRect; - public virtual Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } } - /// - /// Currently selected block in the Flowchart editor. - /// [HideInInspector] [FormerlySerializedAs("selectedSequence")] [SerializeField] protected Block selectedBlock; - public virtual IBlock SelectedBlock { get { return selectedBlock; } set { selectedBlock = (Block)value; } } - /// - /// Currently selected command in the Flowchart editor. - /// [HideInInspector] [SerializeField] protected List selectedCommands = new List(); - public virtual List SelectedCommands { get { return selectedCommands; } } - /// - /// The list of variables that can be accessed by the Flowchart. - /// [HideInInspector] [SerializeField] protected List variables = new List(); - public virtual List Variables { get { return variables; } } - /// - /// Description text displayed in the Flowchart editor window - /// [TextArea(3, 5)] [Tooltip("Description text displayed in the Flowchart editor window")] [SerializeField] protected string description = ""; - public virtual string Description { get { return description; } } - /// - /// Slow down execution in the editor to make it easier to visualise program flow. - /// [Range(0f, 5f)] [Tooltip("Adds a pause after each execution step to make it easier to visualise program flow. Editor only, has no effect in platform builds.")] [SerializeField] protected float stepPause = 0f; - public virtual float StepPause { get { return stepPause; } } - /// - /// Use command color when displaying the command list in the inspector. - /// [Tooltip("Use command color when displaying the command list in the Fungus Editor window")] [SerializeField] protected bool colorCommands = true; - public virtual bool ColorCommands { get { return colorCommands; } } - - /// - /// Hides the Flowchart block and command components in the inspector. - /// Deselect to inspect the block and command components that make up the Flowchart. - /// + [Tooltip("Hides the Flowchart block and command components in the inspector. Deselect to inspect the block and command components that make up the Flowchart.")] [SerializeField] protected bool hideComponents = true; - /// - /// Saves the selected block and commands when saving the scene. Helps avoid version control conflicts if you've only changed the active selection. - /// [Tooltip("Saves the selected block and commands when saving the scene. Helps avoid version control conflicts if you've only changed the active selection.")] [SerializeField] protected bool saveSelection = true; - public virtual bool SaveSelection { get { return saveSelection; } } - /// - /// Unique identifier for identifying this flowchart in localized string keys. - /// [Tooltip("Unique identifier for this flowchart in localized string keys. If no id is specified then the name of the Flowchart object will be used.")] [SerializeField] protected string localizationId = ""; - public virtual string LocalizationId { get { return localizationId; } } - /// - /// Display line numbers in the command list in the Block inspector. - /// [Tooltip("Display line numbers in the command list in the Block inspector.")] [SerializeField] protected bool showLineNumbers = false; - public virtual bool ShowLineNumbers { get { return showLineNumbers; } } - /// - /// List of commands to hide in the Add Command menu. Use this to restrict the set of commands available when editing a Flowchart. - /// [Tooltip("List of commands to hide in the Add Command menu. Use this to restrict the set of commands available when editing a Flowchart.")] [SerializeField] protected List hideCommands = new List(); - /// - /// Lua Environment to be used by default for all Execute Lua commands in this Flowchart. - /// [Tooltip("Lua Environment to be used by default for all Execute Lua commands in this Flowchart")] [SerializeField] protected LuaEnvironment luaEnvironment; - public virtual ILuaEnvironment LuaEnv { get { return luaEnvironment; } } - /// - /// The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing. - /// [Tooltip("The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.")] [SerializeField] protected string luaBindingName = "flowchart"; - public virtual string LuaBindingName { get { return luaBindingName; } } - - /// - /// Position in the center of all blocks in the flowchart. - /// - public virtual Vector2 CenterPosition { set; get; } /// /// Cached list of flowchart objects in the scene for fast lookup. /// public static List cachedFlowcharts = new List(); - protected static bool eventSystemPresent; - - protected StringSubstituter stringSubstituer; - /// - /// Returns the next id to assign to a new flowchart item. - /// Item ids increase monotically so they are guaranteed to - /// be unique within a Flowchart. + /// Sends a message to all Flowchart objects in the current scene. + /// Any block with a matching MessageReceived event handler will start executing. /// - public int NextItemId() + public static void BroadcastFungusMessage(string messageName) { - int maxId = -1; - IBlock[] blocks = GetComponents(); - foreach (IBlock block in blocks) - { - maxId = Math.Max(maxId, block.ItemId); - } - - var commands = GetComponents(); - foreach (var command in commands) + MessageReceived[] eventHandlers = UnityEngine.Object.FindObjectsOfType(); + foreach (MessageReceived eventHandler in eventHandlers) { - maxId = Math.Max(maxId, command.ItemId); + eventHandler.OnSendFungusMessage(messageName); } - return maxId + 1; } + protected static bool eventSystemPresent; + + protected StringSubstituter stringSubstituer; + #if UNITY_5_4_OR_NEWER protected virtual void Awake() { @@ -266,7 +163,7 @@ namespace Fungus eventSystemPresent = true; } - public virtual void OnEnable() + protected virtual void OnEnable() { if (!cachedFlowcharts.Contains(this)) { @@ -299,7 +196,7 @@ namespace Fungus version = CURRENT_VERSION; } - public virtual void OnDisable() + protected virtual void OnDisable() { cachedFlowcharts.Remove(this); } @@ -395,9 +292,68 @@ namespace Fungus return block; } - /// - /// Create a new block node which you can then add commands to. - /// + #region IFlowchart implementation + + public virtual Vector2 ScrollPos { get { return scrollPos; } set { scrollPos = value; } } + + public virtual Vector2 VariablesScrollPos { get { return variablesScrollPos; } set { variablesScrollPos = value; } } + + public virtual bool VariablesExpanded { get { return variablesExpanded; } set { variablesExpanded = value; } } + + public virtual float BlockViewHeight { get { return blockViewHeight; } set { blockViewHeight = value; } } + + public virtual float Zoom { get { return zoom; } set { zoom = value; } } + + public virtual Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } } + + public virtual IBlock SelectedBlock { get { return selectedBlock; } set { selectedBlock = (Block)value; } } + + public virtual List SelectedCommands { get { return selectedCommands; } } + + public virtual List Variables { get { return variables; } } + + public virtual string Description { get { return description; } } + + public virtual float StepPause { get { return stepPause; } } + + public virtual bool ColorCommands { get { return colorCommands; } } + + public virtual bool SaveSelection { get { return saveSelection; } } + + public virtual string LocalizationId { get { return localizationId; } } + + public virtual bool ShowLineNumbers { get { return showLineNumbers; } } + + public virtual ILuaEnvironment LuaEnv { get { return luaEnvironment; } } + + public virtual string LuaBindingName { get { return luaBindingName; } } + + public virtual Vector2 CenterPosition { set; get; } + + public int Version { set { version = value; } } + + public bool IsActive() + { + return gameObject.activeInHierarchy; + } + + public int NextItemId() + { + int maxId = -1; + IBlock[] blocks = GetComponents(); + foreach (IBlock block in blocks) + { + maxId = Math.Max(maxId, block.ItemId); + } + + var commands = GetComponents(); + foreach (var command in commands) + { + maxId = Math.Max(maxId, command.ItemId); + } + return maxId + 1; + } + public virtual Block CreateBlock(Vector2 position) { Block b = CreateBlockComponent(gameObject); @@ -408,9 +364,6 @@ namespace Fungus return b; } - /// - /// Returns the named Block in the flowchart, or null if not found. - /// public virtual IBlock FindBlock(string blockName) { IBlock [] blocks = GetComponents(); @@ -421,13 +374,10 @@ namespace Fungus return block; } } - + return null; } - /// - /// Execute a child block in the Flowchart. - /// You can use this method in a UI event. e.g. to handle a button click. public virtual void ExecuteBlock(string blockName) { IBlock block = null; @@ -452,12 +402,6 @@ namespace Fungus } } - /// - /// Execute a child block in the flowchart. - /// The block must be in an idle state to be executed. - /// This version provides extra options to control how the block is executed. - /// Returns true if the Block started execution. - /// public virtual bool ExecuteBlock(IBlock block, int commandIndex = 0, Action onComplete = null) { if (block == null) @@ -484,9 +428,6 @@ namespace Fungus return true; } - /// - /// Stop all executing Blocks in this Flowchart. - /// public virtual void StopAllBlocks() { IBlock [] blocks = GetComponents(); @@ -499,10 +440,6 @@ namespace Fungus } } - /// - /// Sends a message to this Flowchart only. - /// Any block with a matching MessageReceived event handler will start executing. - /// public virtual void SendFungusMessage(string messageName) { MessageReceived[] eventHandlers = GetComponents(); @@ -512,22 +449,6 @@ namespace Fungus } } - /// - /// Sends a message to all Flowchart objects in the current scene. - /// Any block with a matching MessageReceived event handler will start executing. - /// - public static void BroadcastFungusMessage(string messageName) - { - MessageReceived[] eventHandlers = UnityEngine.Object.FindObjectsOfType(); - foreach (MessageReceived eventHandler in eventHandlers) - { - eventHandler.OnSendFungusMessage(messageName); - } - } - - /// - /// Returns a new variable key that is guaranteed not to clash with any existing variable in the list. - /// public virtual string GetUniqueVariableKey(string originalKey, Variable ignoreVariable = null) { int suffix = 0; @@ -566,7 +487,7 @@ namespace Fungus key = baseKey + suffix; } } - + if (!collision) { return key; @@ -574,14 +495,11 @@ namespace Fungus } } - /// - /// Returns a new Block key that is guaranteed not to clash with any existing Block in the Flowchart. - /// public virtual string GetUniqueBlockKey(string originalKey, IBlock ignoreBlock = null) { int suffix = 0; string baseKey = originalKey.Trim(); - + // No empty keys allowed if (baseKey.Length == 0) { @@ -601,7 +519,7 @@ namespace Fungus { continue; } - + if (block.BlockName.Equals(key, StringComparison.CurrentCultureIgnoreCase)) { collision = true; @@ -609,7 +527,7 @@ namespace Fungus key = baseKey + suffix; } } - + if (!collision) { return key; @@ -617,22 +535,19 @@ namespace Fungus } } - /// - /// Returns a new Label key that is guaranteed not to clash with any existing Label in the Block. - /// public virtual string GetUniqueLabelKey(string originalKey, Label ignoreLabel) { int suffix = 0; string baseKey = originalKey.Trim(); - + // No empty keys allowed if (baseKey.Length == 0) { baseKey = "New Label"; } - + IBlock block = ignoreLabel.ParentBlock; - + string key = baseKey; while (true) { @@ -645,7 +560,7 @@ namespace Fungus { continue; } - + if (label.Key.Equals(key, StringComparison.CurrentCultureIgnoreCase)) { collision = true; @@ -653,21 +568,14 @@ namespace Fungus key = baseKey + suffix; } } - + if (!collision) { return key; } } } - - /// - /// Returns the variable with the specified key, or null if the key is not found. - /// You will need to cast the returned variable to the correct sub-type. - /// You can then access the variable's value using the Value property. e.g. - /// BooleanVariable boolVar = flowchart.GetVariable("MyBool") as BooleanVariable; - /// boolVar.Value = false; - /// + public Variable GetVariable(string key) { foreach (Variable variable in variables) @@ -681,12 +589,6 @@ namespace Fungus return null; } - /// - /// Returns the variable with the specified key, or null if the key is not found. - /// You can then access the variable's value using the Value property. e.g. - /// BooleanVariable boolVar = flowchart.GetVariable("MyBool"); - /// boolVar.Value = false; - /// public T GetVariable(string key) where T : Variable { foreach (Variable variable in variables) @@ -701,10 +603,6 @@ namespace Fungus return null; } - /// - /// Register a new variable with the Flowchart at runtime. - /// The variable should be added as a component on the Flowchart game object. - /// public void SetVariable(string key, T newvariable) where T : Variable { foreach (Variable v in variables) @@ -723,9 +621,6 @@ namespace Fungus Debug.LogWarning("Variable " + key + " not found."); } - /// - /// Gets a list of all variables with public scope in this Flowchart. - /// public virtual List GetPublicVariables() { List publicVariables = new List(); @@ -740,10 +635,6 @@ namespace Fungus return publicVariables; } - /// - /// Gets the value of a boolean variable. - /// Returns false if the variable key does not exist. - /// public virtual bool GetBooleanVariable(string key) { BooleanVariable variable = GetVariable(key); @@ -758,10 +649,6 @@ namespace Fungus } } - /// - /// Sets the value of a boolean variable. - /// The variable must already be added to the list of variables for this Flowchart. - /// public virtual void SetBooleanVariable(string key, bool value) { BooleanVariable variable = GetVariable(key); @@ -771,10 +658,6 @@ namespace Fungus } } - /// - /// Gets the value of an integer variable. - /// Returns 0 if the variable key does not exist. - /// public virtual int GetIntegerVariable(string key) { IntegerVariable variable = GetVariable(key); @@ -789,10 +672,6 @@ namespace Fungus } } - /// - /// Sets the value of an integer variable. - /// The variable must already be added to the list of variables for this Flowchart. - /// public virtual void SetIntegerVariable(string key, int value) { IntegerVariable variable = GetVariable(key); @@ -802,10 +681,6 @@ namespace Fungus } } - /// - /// Gets the value of a float variable. - /// Returns 0 if the variable key does not exist. - /// public virtual float GetFloatVariable(string key) { FloatVariable variable = GetVariable(key); @@ -820,10 +695,6 @@ namespace Fungus } } - /// - /// Sets the value of a float variable. - /// The variable must already be added to the list of variables for this Flowchart. - /// public virtual void SetFloatVariable(string key, float value) { FloatVariable variable = GetVariable(key); @@ -833,10 +704,6 @@ namespace Fungus } } - /// - /// Gets the value of a string variable. - /// Returns the empty string if the variable key does not exist. - /// public virtual string GetStringVariable(string key) { StringVariable variable = GetVariable(key); @@ -851,10 +718,6 @@ namespace Fungus } } - /// - /// Sets the value of a string variable. - /// The variable must already be added to the list of variables for this Flowchart. - /// public virtual void SetStringVariable(string key, string value) { StringVariable variable = GetVariable(key); @@ -864,9 +727,6 @@ namespace Fungus } } - /// - /// Set the block objects to be hidden or visible depending on the hideComponents property. - /// public virtual void UpdateHideFlags() { if (hideComponents) @@ -910,17 +770,11 @@ namespace Fungus } - /// - /// Clears the list of selected commands. - /// public virtual void ClearSelectedCommands() { selectedCommands.Clear(); } - - /// - /// Adds a command to the list of selected commands. - /// + public virtual void AddSelectedCommand(ICommand command) { if (!selectedCommands.Contains((Command)command)) @@ -929,9 +783,6 @@ namespace Fungus } } - /// - /// Reset the commands and variables in the Flowchart. - /// public virtual void Reset(bool resetCommands, bool resetVariables) { if (resetCommands) @@ -952,9 +803,6 @@ namespace Fungus } } - /// - /// Override this in a Flowchart subclass to filter which commands are shown in the Add Command list. - /// public virtual bool IsCommandSupported(CommandInfoAttribute commandInfo) { foreach (string key in hideCommands) @@ -970,9 +818,6 @@ namespace Fungus return true; } - /// - /// Returns true if there are any executing blocks in this Flowchart. - /// public virtual bool HasExecutingBlocks() { IBlock[] blocks = GetComponents(); @@ -986,9 +831,6 @@ namespace Fungus return false; } - /// - /// Returns a list of all executing blocks in this Flowchart. - /// public virtual List GetExecutingBlocks() { List executingBlocks = new List(); @@ -1005,51 +847,6 @@ namespace Fungus return executingBlocks; } - /// - /// Implementation of StringSubstituter.ISubstitutionHandler which matches any public variable in the Flowchart. - /// To perform full variable substitution with all substitution handlers in the scene, you should - /// use the SubstituteVariables() method instead. - /// - [MoonSharp.Interpreter.MoonSharpHidden] - public virtual bool SubstituteStrings(StringBuilder input) - { - // Instantiate the regular expression object. - Regex r = new Regex("{\\$.*?}"); - - bool modified = false; - - // Match the regular expression pattern against a text string. - var results = r.Matches(input.ToString()); - foreach (Match match in results) - { - string key = match.Value.Substring(2, match.Value.Length - 3); - - // Look for any matching public variables in this Flowchart - foreach (Variable variable in variables) - { - if (variable == null) - continue; - - if (variable.Scope == VariableScope.Public && - variable.Key == key) - { - string value = variable.ToString(); - input.Replace(match.Value, value); - - modified = true; - } - } - } - - return modified; - } - - /// - /// Substitute variables in the input text with the format {$VarName} - /// This will first match with private variables in this Flowchart, and then - /// with public variables in all Flowcharts in the scene (and any component - /// in the scene that implements StringSubstituter.ISubstitutionHandler). - /// public virtual string SubstituteVariables(string input) { if (stringSubstituer == null) @@ -1062,7 +859,7 @@ namespace Fungus StringBuilder sb = stringSubstituer._StringBuilder; sb.Length = 0; sb.Append(input); - + // Instantiate the regular expression object. Regex r = new Regex("{\\$.*?}"); @@ -1102,5 +899,50 @@ namespace Fungus return input; } } + + #endregion + + #region IStringSubstituter implementation + + /// + /// Implementation of StringSubstituter.ISubstitutionHandler which matches any public variable in the Flowchart. + /// To perform full variable substitution with all substitution handlers in the scene, you should + /// use the SubstituteVariables() method instead. + /// + [MoonSharp.Interpreter.MoonSharpHidden] + public virtual bool SubstituteStrings(StringBuilder input) + { + // Instantiate the regular expression object. + Regex r = new Regex("{\\$.*?}"); + + bool modified = false; + + // Match the regular expression pattern against a text string. + var results = r.Matches(input.ToString()); + foreach (Match match in results) + { + string key = match.Value.Substring(2, match.Value.Length - 3); + + // Look for any matching public variables in this Flowchart + foreach (Variable variable in variables) + { + if (variable == null) + continue; + + if (variable.Scope == VariableScope.Public && + variable.Key == key) + { + string value = variable.ToString(); + input.Replace(match.Value, value); + + modified = true; + } + } + } + + return modified; + } + + #endregion } } \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs new file mode 100644 index 00000000..4638696f --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs @@ -0,0 +1,289 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +namespace Fungus +{ + /// + /// Visual scripting controller for the Flowchart programming language. + /// Flowchart objects may be edited visually using the Flowchart editor window. + /// + public interface IFlowchart + { + /// + /// Scroll position of Flowchart editor window. + /// + Vector2 ScrollPos { get; set; } + + /// + /// Scroll position of Flowchart variables window. + /// + Vector2 VariablesScrollPos { get; set; } + + /// + /// Show the variables pane. + /// + bool VariablesExpanded { get; set; } + + /// + /// Height of command block view in inspector. + /// + float BlockViewHeight { get; set; } + + /// + /// Zoom level of Flowchart editor window. + /// + float Zoom { get; set; } + + /// + /// Scrollable area for Flowchart editor window. + /// + Rect ScrollViewRect { get; set; } + + /// + /// Currently selected block in the Flowchart editor. + /// + IBlock SelectedBlock { get; set; } + + /// + /// Currently selected command in the Flowchart editor. + /// + List SelectedCommands { get; } + + /// + /// The list of variables that can be accessed by the Flowchart. + /// + List Variables { get; } + + /// + /// Description text displayed in the Flowchart editor window + /// + string Description { get; } + + /// + /// Slow down execution in the editor to make it easier to visualise program flow. + /// + float StepPause { get; } + + /// + /// Use command color when displaying the command list in the inspector. + /// + bool ColorCommands { get; } + + /// + /// Saves the selected block and commands when saving the scene. Helps avoid version control conflicts if you've only changed the active selection. + /// + bool SaveSelection { get; } + + /// + /// Unique identifier for identifying this flowchart in localized string keys. + /// + string LocalizationId { get; } + + /// + /// Display line numbers in the command list in the Block inspector. + /// + bool ShowLineNumbers { get; } + + /// + /// Lua Environment to be used by default for all Execute Lua commands in this Flowchart. + /// + ILuaEnvironment LuaEnv { get; } + + /// + /// The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing. + /// + string LuaBindingName { get; } + + /// + /// Position in the center of all blocks in the flowchart. + /// + Vector2 CenterPosition { set; get; } + + /// + /// Variable to track flowchart's version so components can update to new versions. + /// + int Version { set; } + + /// + /// Returns the next id to assign to a new flowchart item. + /// Item ids increase monotically so they are guaranteed to + /// be unique within a Flowchart. + /// + int NextItemId(); + + /// + /// Returns true if the Flowchart gameobject is active. + /// + /// true if this instance is active; otherwise, false. + bool IsActive(); + + /// + /// Create a new block node which you can then add commands to. + /// + Block CreateBlock(Vector2 position); + + /// + /// Returns the named Block in the flowchart, or null if not found. + /// + IBlock FindBlock(string blockName); + + /// + /// Execute a child block in the Flowchart. + /// You can use this method in a UI event. e.g. to handle a button click. + void ExecuteBlock(string blockName); + + /// + /// Execute a child block in the flowchart. + /// The block must be in an idle state to be executed. + /// This version provides extra options to control how the block is executed. + /// Returns true if the Block started execution. + /// + bool ExecuteBlock(IBlock block, int commandIndex = 0, System.Action onComplete = null); + + /// + /// Stop all executing Blocks in this Flowchart. + /// + void StopAllBlocks(); + + /// + /// Sends a message to this Flowchart only. + /// Any block with a matching MessageReceived event handler will start executing. + /// + void SendFungusMessage(string messageName); + + /// + /// Returns a new variable key that is guaranteed not to clash with any existing variable in the list. + /// + string GetUniqueVariableKey(string originalKey, Variable ignoreVariable = null); + + /// + /// Returns a new Block key that is guaranteed not to clash with any existing Block in the Flowchart. + /// + string GetUniqueBlockKey(string originalKey, IBlock ignoreBlock = null); + + /// + /// Returns a new Label key that is guaranteed not to clash with any existing Label in the Block. + /// + string GetUniqueLabelKey(string originalKey, Label ignoreLabel); + + /// + /// Returns the variable with the specified key, or null if the key is not found. + /// You will need to cast the returned variable to the correct sub-type. + /// You can then access the variable's value using the Value property. e.g. + /// BooleanVariable boolVar = flowchart.GetVariable("MyBool") as BooleanVariable; + /// boolVar.Value = false; + /// + Variable GetVariable(string key); + + /// + /// Returns the variable with the specified key, or null if the key is not found. + /// You can then access the variable's value using the Value property. e.g. + /// BooleanVariable boolVar = flowchart.GetVariable("MyBool"); + /// boolVar.Value = false; + /// + T GetVariable(string key) where T : Variable; + + /// + /// Register a new variable with the Flowchart at runtime. + /// The variable should be added as a component on the Flowchart game object. + /// + void SetVariable(string key, T newvariable) where T : Variable; + + /// + /// Gets a list of all variables with public scope in this Flowchart. + /// + List GetPublicVariables(); + + /// + /// Gets the value of a boolean variable. + /// Returns false if the variable key does not exist. + /// + bool GetBooleanVariable(string key); + + /// + /// Sets the value of a boolean variable. + /// The variable must already be added to the list of variables for this Flowchart. + /// + void SetBooleanVariable(string key, bool value); + + /// + /// Gets the value of an integer variable. + /// Returns 0 if the variable key does not exist. + /// + int GetIntegerVariable(string key); + + /// + /// Sets the value of an integer variable. + /// The variable must already be added to the list of variables for this Flowchart. + /// + void SetIntegerVariable(string key, int value); + + /// + /// Gets the value of a float variable. + /// Returns 0 if the variable key does not exist. + /// + float GetFloatVariable(string key); + + /// + /// Sets the value of a float variable. + /// The variable must already be added to the list of variables for this Flowchart. + /// + void SetFloatVariable(string key, float value); + + /// + /// Gets the value of a string variable. + /// Returns the empty string if the variable key does not exist. + /// + string GetStringVariable(string key); + + /// + /// Sets the value of a string variable. + /// The variable must already be added to the list of variables for this Flowchart. + /// + void SetStringVariable(string key, string value); + + /// + /// Set the block objects to be hidden or visible depending on the hideComponents property. + /// + void UpdateHideFlags(); + + /// + /// Clears the list of selected commands. + /// + void ClearSelectedCommands(); + + /// + /// Adds a command to the list of selected commands. + /// + void AddSelectedCommand(ICommand command); + + /// + /// Reset the commands and variables in the Flowchart. + /// + void Reset(bool resetCommands, bool resetVariables); + + /// + /// Override this in a Flowchart subclass to filter which commands are shown in the Add Command list. + /// + bool IsCommandSupported(CommandInfoAttribute commandInfo); + + /// + /// Returns true if there are any executing blocks in this Flowchart. + /// + bool HasExecutingBlocks(); + + /// + /// Returns a list of all executing blocks in this Flowchart. + /// + List GetExecutingBlocks(); + + /// + /// Substitute variables in the input text with the format {$VarName} + /// This will first match with private variables in this Flowchart, and then + /// with public variables in all Flowcharts in the scene (and any component + /// in the scene that implements StringSubstituter.ISubstitutionHandler). + /// + string SubstituteVariables(string input); + } +} diff --git a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs.meta b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs.meta new file mode 100644 index 00000000..295020cd --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e0dd617b954d242bdb37e9c5de4f63cc +timeCreated: 1473856422 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs b/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs new file mode 100644 index 00000000..2f736011 --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + /// + /// Interface for Flowchart components which can be updated when the + /// scene loads in the editor. This is used to maintain backwards + /// compatibility with earlier versions of Fungus. + /// + interface IUpdateable + { + void UpdateToVersion(int oldVersion, int newVersion); + } +} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs.meta b/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs.meta new file mode 100644 index 00000000..e92074e3 --- /dev/null +++ b/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5c893a3523cc1497090726522c805cb8 +timeCreated: 1474016919 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 04b56ab0c71b99fa3ece3261e2a91f5677951eea Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 12:45:23 +0100 Subject: [PATCH 16/32] Refactored runtime code to use IFlowchart exclusively --- Assets/Fungus/Flowchart/Scripts/Block.cs | 6 ++--- Assets/Fungus/Flowchart/Scripts/Command.cs | 10 ++++---- .../Fungus/Flowchart/Scripts/EventHandler.cs | 2 +- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 5 ++++ Assets/Fungus/Flowchart/Scripts/IBlock.cs | 2 +- Assets/Fungus/Flowchart/Scripts/ICommand.cs | 2 +- Assets/Fungus/Flowchart/Scripts/IFlowchart.cs | 6 ++++- Assets/Fungus/Scripts/Commands/Call.cs | 4 ++-- .../Fungus/Scripts/Commands/Conversation.cs | 2 +- Assets/Fungus/Scripts/Commands/DebugLog.cs | 2 +- .../Fungus/Scripts/Commands/DeleteSaveKey.cs | 2 +- Assets/Fungus/Scripts/Commands/ExecuteLua.cs | 2 +- .../Fungus/Scripts/Commands/LoadVariable.cs | 2 +- Assets/Fungus/Scripts/Commands/Menu.cs | 2 +- .../Fungus/Scripts/Commands/SaveVariable.cs | 2 +- Assets/Fungus/Scripts/Commands/Say.cs | 2 +- Assets/Fungus/Scripts/Commands/SendMessage.cs | 4 +--- Assets/Fungus/Scripts/Commands/SetText.cs | 2 +- Assets/Fungus/Scripts/Commands/StopBlock.cs | 2 +- .../Fungus/Scripts/Commands/StopFlowchart.cs | 4 ++-- Assets/Fungus/Scripts/Commands/Write.cs | 2 +- .../Fungus/Scripts/Components/Localization.cs | 4 ++-- .../Fungus/Scripts/Components/MenuDialog.cs | 2 +- Assets/Fungus/Scripts/Components/SayDialog.cs | 2 +- Assets/Fungus/Scripts/Editor/BlockEditor.cs | 24 +++++++++---------- .../Fungus/Scripts/Editor/BlockInspector.cs | 2 +- Assets/Fungus/Scripts/Editor/CallEditor.cs | 2 +- Assets/Fungus/Scripts/Editor/CommandEditor.cs | 2 +- .../Scripts/Editor/CommandListAdaptor.cs | 2 +- .../Fungus/Scripts/Editor/FlowchartEditor.cs | 6 ++--- .../Scripts/Editor/FlowchartMenuItems.cs | 2 +- .../Fungus/Scripts/Editor/FlowchartWindow.cs | 12 +++++----- Assets/Fungus/Scripts/Editor/IfEditor.cs | 2 +- Assets/Fungus/Scripts/Editor/LabelEditor.cs | 2 +- Assets/Fungus/Scripts/Editor/MenuEditor.cs | 2 +- .../Fungus/Scripts/Editor/MenuTimerEditor.cs | 2 +- .../Scripts/Editor/SetVariableEditor.cs | 2 +- .../Fungus/Scripts/Editor/VariableEditor.cs | 2 +- .../Scripts/Editor/VariableListAdaptor.cs | 2 +- Assets/Fungus/Scripts/Editor/ViewEditor.cs | 2 +- .../Fungus/Scripts/Interfaces/ISayDialog.cs | 2 +- 41 files changed, 76 insertions(+), 69 deletions(-) diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 245fe83e..a765bb7a 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -124,9 +124,9 @@ namespace Fungus public virtual int JumpToCommandIndex { set { jumpToCommandIndex = value; } } - public virtual Flowchart GetFlowchart() + public virtual IFlowchart GetFlowchart() { - return GetComponent(); + return GetComponent(); } public virtual bool IsExecuting() @@ -158,7 +158,7 @@ namespace Fungus executionCount++; - Flowchart flowchart = GetFlowchart(); + IFlowchart flowchart = GetFlowchart(); executionState = ExecutionState.Executing; #if UNITY_EDITOR diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Flowchart/Scripts/Command.cs index 7d60a857..a5089f5b 100644 --- a/Assets/Fungus/Flowchart/Scripts/Command.cs +++ b/Assets/Fungus/Flowchart/Scripts/Command.cs @@ -92,13 +92,13 @@ namespace Fungus /// /// Returns the Flowchart that this command belongs to. /// - public virtual Flowchart GetFlowchart() + public virtual IFlowchart GetFlowchart() { - Flowchart flowchart = GetComponent(); + IFlowchart flowchart = GetComponent(); if (flowchart == null && transform.parent != null) { - flowchart = transform.parent.GetComponent(); + flowchart = transform.parent.GetComponent(); } return flowchart; } @@ -267,7 +267,7 @@ namespace Fungus public virtual string GetFlowchartLocalizationId() { // If no localization id has been set then use the Flowchart name - Flowchart flowchart = GetFlowchart(); + IFlowchart flowchart = GetFlowchart(); if (flowchart == null) { return ""; @@ -276,7 +276,7 @@ namespace Fungus string localizationId = GetFlowchart().LocalizationId; if (localizationId.Length == 0) { - localizationId = flowchart.name; + localizationId = flowchart.GetName(); } return localizationId; diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs index 4602439c..00cd860d 100644 --- a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs +++ b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs @@ -57,7 +57,7 @@ namespace Fungus return false; } - Flowchart flowchart = parentBlock.GetFlowchart(); + var flowchart = parentBlock.GetFlowchart(); // Auto-follow the executing block if none is currently selected if (flowchart.SelectedBlock == null) diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index a3878e98..5cb07404 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -337,6 +337,11 @@ namespace Fungus return gameObject.activeInHierarchy; } + public string GetName() + { + return gameObject.name; + } + public int NextItemId() { int maxId = -1; diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Flowchart/Scripts/IBlock.cs index ffa44332..a313036d 100644 --- a/Assets/Fungus/Flowchart/Scripts/IBlock.cs +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs @@ -67,7 +67,7 @@ namespace Fungus /// /// Returns the parent Flowchart for this Block. /// - Flowchart GetFlowchart(); + IFlowchart GetFlowchart(); /// /// Returns true if the Block is executing a command. diff --git a/Assets/Fungus/Flowchart/Scripts/ICommand.cs b/Assets/Fungus/Flowchart/Scripts/ICommand.cs index 3dd97655..636da53d 100644 --- a/Assets/Fungus/Flowchart/Scripts/ICommand.cs +++ b/Assets/Fungus/Flowchart/Scripts/ICommand.cs @@ -50,7 +50,7 @@ namespace Fungus /// /// Returns the Flowchart that this command belongs to. /// - Flowchart GetFlowchart(); + IFlowchart GetFlowchart(); /// /// Execute the command. diff --git a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs index 4638696f..e13e2b5c 100644 --- a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs @@ -115,9 +115,13 @@ namespace Fungus /// /// Returns true if the Flowchart gameobject is active. /// - /// true if this instance is active; otherwise, false. bool IsActive(); + /// + /// Returns the Flowchart gameobject name. + /// + string GetName(); + /// /// Create a new block node which you can then add commands to. /// diff --git a/Assets/Fungus/Scripts/Commands/Call.cs b/Assets/Fungus/Scripts/Commands/Call.cs index 223eae26..de22fe8e 100644 --- a/Assets/Fungus/Scripts/Commands/Call.cs +++ b/Assets/Fungus/Scripts/Commands/Call.cs @@ -40,7 +40,7 @@ namespace Fungus public override void OnEnter() { - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); if (targetBlock != null) { @@ -63,7 +63,7 @@ namespace Fungus } if (targetFlowchart == null || - targetFlowchart == GetFlowchart()) + targetFlowchart.Equals(GetFlowchart())) { // If the executing block is currently selected then follow the execution // onto the next block in the inspector. diff --git a/Assets/Fungus/Scripts/Commands/Conversation.cs b/Assets/Fungus/Scripts/Commands/Conversation.cs index 49a565a0..f826af87 100644 --- a/Assets/Fungus/Scripts/Commands/Conversation.cs +++ b/Assets/Fungus/Scripts/Commands/Conversation.cs @@ -32,7 +32,7 @@ namespace Fungus protected virtual IEnumerator DoConversation() { - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); string subbedText = flowchart.SubstituteVariables(conversationText.Value); yield return StartCoroutine(conversationManager.DoConversation(subbedText)); diff --git a/Assets/Fungus/Scripts/Commands/DebugLog.cs b/Assets/Fungus/Scripts/Commands/DebugLog.cs index f5b8979d..5d8ca659 100644 --- a/Assets/Fungus/Scripts/Commands/DebugLog.cs +++ b/Assets/Fungus/Scripts/Commands/DebugLog.cs @@ -29,7 +29,7 @@ namespace Fungus public override void OnEnter () { - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); string message = flowchart.SubstituteVariables(logMessage.Value); switch (logType) diff --git a/Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs b/Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs index c7c3c122..7b75eca4 100644 --- a/Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs +++ b/Assets/Fungus/Scripts/Commands/DeleteSaveKey.cs @@ -25,7 +25,7 @@ namespace Fungus return; } - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); // Prepend the current save profile (if any) string prefsKey = SetSaveProfile.saveProfile + "_" + flowchart.SubstituteVariables(key); diff --git a/Assets/Fungus/Scripts/Commands/ExecuteLua.cs b/Assets/Fungus/Scripts/Commands/ExecuteLua.cs index ef0e3e93..359bf425 100644 --- a/Assets/Fungus/Scripts/Commands/ExecuteLua.cs +++ b/Assets/Fungus/Scripts/Commands/ExecuteLua.cs @@ -61,7 +61,7 @@ namespace Fungus // Cache a descriptive name to use in Lua error messages friendlyName = gameObject.name + "." + ParentBlock.BlockName + "." + "ExecuteLua #" + CommandIndex.ToString(); - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); // See if a Lua Environment has been assigned to this Flowchart if (luaEnvironment == null) diff --git a/Assets/Fungus/Scripts/Commands/LoadVariable.cs b/Assets/Fungus/Scripts/Commands/LoadVariable.cs index 05367de0..d5f277ed 100644 --- a/Assets/Fungus/Scripts/Commands/LoadVariable.cs +++ b/Assets/Fungus/Scripts/Commands/LoadVariable.cs @@ -33,7 +33,7 @@ namespace Fungus return; } - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); // Prepend the current save profile (if any) string prefsKey = SetSaveProfile.saveProfile + "_" + flowchart.SubstituteVariables(key); diff --git a/Assets/Fungus/Scripts/Commands/Menu.cs b/Assets/Fungus/Scripts/Commands/Menu.cs index c29167a9..96b0fb58 100644 --- a/Assets/Fungus/Scripts/Commands/Menu.cs +++ b/Assets/Fungus/Scripts/Commands/Menu.cs @@ -52,7 +52,7 @@ namespace Fungus { menuDialog.SetActive(true); - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); string displayText = flowchart.SubstituteVariables(text); menuDialog.AddOption(displayText, interactable, targetBlock); diff --git a/Assets/Fungus/Scripts/Commands/SaveVariable.cs b/Assets/Fungus/Scripts/Commands/SaveVariable.cs index 9aeb505f..f7da07f2 100644 --- a/Assets/Fungus/Scripts/Commands/SaveVariable.cs +++ b/Assets/Fungus/Scripts/Commands/SaveVariable.cs @@ -37,7 +37,7 @@ namespace Fungus return; } - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); // Prepend the current save profile (if any) string prefsKey = SetSaveProfile.saveProfile + "_" + flowchart.SubstituteVariables(key); diff --git a/Assets/Fungus/Scripts/Commands/Say.cs b/Assets/Fungus/Scripts/Commands/Say.cs index 7d594719..def5cfec 100644 --- a/Assets/Fungus/Scripts/Commands/Say.cs +++ b/Assets/Fungus/Scripts/Commands/Say.cs @@ -85,7 +85,7 @@ namespace Fungus return; } - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); sayDialog.SetActive(true); diff --git a/Assets/Fungus/Scripts/Commands/SendMessage.cs b/Assets/Fungus/Scripts/Commands/SendMessage.cs index 7e26c73e..ec5ca954 100644 --- a/Assets/Fungus/Scripts/Commands/SendMessage.cs +++ b/Assets/Fungus/Scripts/Commands/SendMessage.cs @@ -36,12 +36,10 @@ namespace Fungus return; } - Flowchart flowchart = GetFlowchart(); - MessageReceived[] receivers = null; if (messageTarget == MessageTarget.SameFlowchart) { - receivers = flowchart.GetComponents(); + receivers = GetComponents(); } else { diff --git a/Assets/Fungus/Scripts/Commands/SetText.cs b/Assets/Fungus/Scripts/Commands/SetText.cs index 8dde092a..34893fab 100644 --- a/Assets/Fungus/Scripts/Commands/SetText.cs +++ b/Assets/Fungus/Scripts/Commands/SetText.cs @@ -28,7 +28,7 @@ namespace Fungus public override void OnEnter() { - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); string newText = flowchart.SubstituteVariables(text.Value); if (targetTextObject == null) diff --git a/Assets/Fungus/Scripts/Commands/StopBlock.cs b/Assets/Fungus/Scripts/Commands/StopBlock.cs index 3afcefd4..8d40e98e 100644 --- a/Assets/Fungus/Scripts/Commands/StopBlock.cs +++ b/Assets/Fungus/Scripts/Commands/StopBlock.cs @@ -28,7 +28,7 @@ namespace Fungus if (flowchart == null) { - flowchart = GetFlowchart(); + flowchart = (Flowchart)GetFlowchart(); } IBlock block = flowchart.FindBlock(blockName.Value); diff --git a/Assets/Fungus/Scripts/Commands/StopFlowchart.cs b/Assets/Fungus/Scripts/Commands/StopFlowchart.cs index 938d89ba..41c012cc 100644 --- a/Assets/Fungus/Scripts/Commands/StopFlowchart.cs +++ b/Assets/Fungus/Scripts/Commands/StopFlowchart.cs @@ -23,14 +23,14 @@ namespace Fungus public override void OnEnter() { - Flowchart flowchart = GetFlowchart(); + IFlowchart flowchart = GetFlowchart(); if (stopParentFlowchart) { flowchart.StopAllBlocks(); } - foreach (Flowchart f in targetFlowcharts) + foreach (IFlowchart f in targetFlowcharts) { if (f == flowchart) { diff --git a/Assets/Fungus/Scripts/Commands/Write.cs b/Assets/Fungus/Scripts/Commands/Write.cs index c2c5f856..c92fa412 100644 --- a/Assets/Fungus/Scripts/Commands/Write.cs +++ b/Assets/Fungus/Scripts/Commands/Write.cs @@ -82,7 +82,7 @@ namespace Fungus break; } - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); string newText = flowchart.SubstituteVariables(text.Value); if (!waitUntilFinished) diff --git a/Assets/Fungus/Scripts/Components/Localization.cs b/Assets/Fungus/Scripts/Components/Localization.cs index 375e884b..429b20ec 100644 --- a/Assets/Fungus/Scripts/Components/Localization.cs +++ b/Assets/Fungus/Scripts/Components/Localization.cs @@ -135,8 +135,8 @@ namespace Fungus // Add localizable commands in same order as command list to make it // easier to localise / edit standard text. - Flowchart[] flowcharts = GameObject.FindObjectsOfType(); - foreach (Flowchart flowchart in flowcharts) + var flowcharts = GameObject.FindObjectsOfType(); + foreach (var flowchart in flowcharts) { IBlock[] blocks = flowchart.GetComponents(); foreach (IBlock block in blocks) diff --git a/Assets/Fungus/Scripts/Components/MenuDialog.cs b/Assets/Fungus/Scripts/Components/MenuDialog.cs index 2f0a6b52..52a1a16a 100644 --- a/Assets/Fungus/Scripts/Components/MenuDialog.cs +++ b/Assets/Fungus/Scripts/Components/MenuDialog.cs @@ -184,7 +184,7 @@ namespace Fungus { #if UNITY_EDITOR // Select the new target block in the Flowchart window - Flowchart flowchart = block.GetFlowchart(); + var flowchart = block.GetFlowchart(); flowchart.SelectedBlock = block; #endif diff --git a/Assets/Fungus/Scripts/Components/SayDialog.cs b/Assets/Fungus/Scripts/Components/SayDialog.cs index d7ebeb43..3a6775a8 100644 --- a/Assets/Fungus/Scripts/Components/SayDialog.cs +++ b/Assets/Fungus/Scripts/Components/SayDialog.cs @@ -245,7 +245,7 @@ namespace Fungus gameObject.SetActive(state); } - public virtual void SetCharacter(Character character, Flowchart flowchart = null) + public virtual void SetCharacter(Character character, IFlowchart flowchart = null) { if (character == null) { diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index 310f7d4e..2bae7892 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -633,7 +633,7 @@ namespace Fungus { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); // Use index of last selected command in list, or end of list if nothing selected. int index = -1; @@ -728,7 +728,7 @@ namespace Fungus return; } - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); flowchart.ClearSelectedCommands(); @@ -757,7 +757,7 @@ namespace Fungus public virtual void ShowContextMenu() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null) { @@ -845,7 +845,7 @@ namespace Fungus protected void SelectAll() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || flowchart.SelectedBlock == null) @@ -866,7 +866,7 @@ namespace Fungus protected void SelectNone() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || flowchart.SelectedBlock == null) @@ -889,7 +889,7 @@ namespace Fungus protected void Copy() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || flowchart.SelectedBlock == null) @@ -919,7 +919,7 @@ namespace Fungus protected void Paste() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || flowchart.SelectedBlock == null) @@ -978,7 +978,7 @@ namespace Fungus protected void Delete() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || flowchart.SelectedBlock == null) @@ -1023,7 +1023,7 @@ namespace Fungus protected void PlayCommand() { IBlock targetBlock = target as IBlock; - Flowchart flowchart = targetBlock.GetFlowchart(); + var flowchart = (Flowchart)targetBlock.GetFlowchart(); Command command = flowchart.SelectedCommands[0]; if (targetBlock.IsExecuting()) { @@ -1043,7 +1043,7 @@ namespace Fungus protected void StopAllPlayCommand() { IBlock targetBlock = target as IBlock; - Flowchart flowchart = targetBlock.GetFlowchart(); + var flowchart = (Flowchart)targetBlock.GetFlowchart(); Command command = flowchart.SelectedCommands[0]; // Stop all active blocks then run the selected block. @@ -1060,7 +1060,7 @@ namespace Fungus protected void SelectPrevious() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); int firstSelectedIndex = flowchart.SelectedBlock.CommandList.Count; bool firstSelectedCommandFound = false; @@ -1100,7 +1100,7 @@ namespace Fungus protected void SelectNext() { IBlock block = target as IBlock; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); int lastSelectedIndex = -1; if (flowchart.SelectedCommands.Count > 0) diff --git a/Assets/Fungus/Scripts/Editor/BlockInspector.cs b/Assets/Fungus/Scripts/Editor/BlockInspector.cs index f7221973..f7accb2f 100644 --- a/Assets/Fungus/Scripts/Editor/BlockInspector.cs +++ b/Assets/Fungus/Scripts/Editor/BlockInspector.cs @@ -77,7 +77,7 @@ namespace Fungus IBlock block = blockInspector.block; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (activeBlockEditor == null || !block.Equals(activeBlockEditor.target)) diff --git a/Assets/Fungus/Scripts/Editor/CallEditor.cs b/Assets/Fungus/Scripts/Editor/CallEditor.cs index 8be7baac..96e4500b 100644 --- a/Assets/Fungus/Scripts/Editor/CallEditor.cs +++ b/Assets/Fungus/Scripts/Editor/CallEditor.cs @@ -34,7 +34,7 @@ namespace Fungus Flowchart flowchart = null; if (targetFlowchartProp.objectReferenceValue == null) { - flowchart = t.GetFlowchart(); + flowchart = (Flowchart)t.GetFlowchart(); } else { diff --git a/Assets/Fungus/Scripts/Editor/CommandEditor.cs b/Assets/Fungus/Scripts/Editor/CommandEditor.cs index d5f6d64c..93e1137f 100644 --- a/Assets/Fungus/Scripts/Editor/CommandEditor.cs +++ b/Assets/Fungus/Scripts/Editor/CommandEditor.cs @@ -37,7 +37,7 @@ namespace Fungus return; } - Flowchart flowchart = t.GetFlowchart(); + var flowchart = (Flowchart)t.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs index 0dd64147..37ff844e 100644 --- a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs @@ -167,7 +167,7 @@ namespace Fungus return; } - Flowchart flowchart = command.GetFlowchart(); + var flowchart = (Flowchart)command.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/FlowchartEditor.cs b/Assets/Fungus/Scripts/Editor/FlowchartEditor.cs index 8edf66d0..00ef1225 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartEditor.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartEditor.cs @@ -57,7 +57,7 @@ namespace Fungus { serializedObject.Update(); - Flowchart flowchart = target as Flowchart; + var flowchart = target as Flowchart; flowchart.UpdateHideFlags(); @@ -100,7 +100,7 @@ namespace Fungus { serializedObject.Update(); - Flowchart t = target as Flowchart; + var t = target as Flowchart; if (t.Variables.Count == 0) { @@ -240,7 +240,7 @@ namespace Fungus return; } - Flowchart flowchart = addVariableInfo.flowchart; + var flowchart = addVariableInfo.flowchart; System.Type variableType = addVariableInfo.variableType; Undo.RecordObject(flowchart, "Add Variable"); diff --git a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs index 168c5c71..3ddaf290 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs @@ -15,7 +15,7 @@ namespace Fungus go.transform.position = Vector3.zero; // This is the latest version of Flowchart, so no need to update. - Flowchart flowchart = go.GetComponent(); + var flowchart = go.GetComponent(); if (flowchart != null) { flowchart.Version = Flowchart.CURRENT_VERSION; diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index c3311feb..00adf021 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -61,7 +61,7 @@ namespace Fungus protected virtual void OnInspectorUpdate() { // Ensure the Block Inspector is always showing the currently selected block - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); if (flowchart == null) { return; @@ -97,7 +97,7 @@ namespace Fungus if (Selection.activeGameObject != null) { - Flowchart fs = Selection.activeGameObject.GetComponent(); + var fs = Selection.activeGameObject.GetComponent(); if (fs != null) { fungusState.SelectedFlowchart = fs; @@ -109,7 +109,7 @@ namespace Fungus protected virtual void OnGUI() { - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); if (flowchart == null) { GUILayout.Label("No Flowchart scene object selected"); @@ -573,7 +573,7 @@ namespace Fungus protected virtual void DrawWindow(int windowId) { IBlock block = windowBlockMap[windowId]; - Flowchart flowchart = block.GetFlowchart(); + var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null) { @@ -713,7 +713,7 @@ namespace Fungus { if (blockB == null || block == blockB || - blockB.GetFlowchart() != flowchart) + !blockB.GetFlowchart().Equals(flowchart)) { continue; } @@ -788,7 +788,7 @@ namespace Fungus protected static void DuplicateBlock(object obj) { - Flowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); Block block = obj as Block; Vector2 newPosition = new Vector2(block._NodeRect.position.x + diff --git a/Assets/Fungus/Scripts/Editor/IfEditor.cs b/Assets/Fungus/Scripts/Editor/IfEditor.cs index 9bcffefc..856e154d 100644 --- a/Assets/Fungus/Scripts/Editor/IfEditor.cs +++ b/Assets/Fungus/Scripts/Editor/IfEditor.cs @@ -36,7 +36,7 @@ namespace Fungus If t = target as If; - Flowchart flowchart = t.GetFlowchart(); + var flowchart = (Flowchart)t.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/LabelEditor.cs b/Assets/Fungus/Scripts/Editor/LabelEditor.cs index 2ecedcfa..f330f4fb 100644 --- a/Assets/Fungus/Scripts/Editor/LabelEditor.cs +++ b/Assets/Fungus/Scripts/Editor/LabelEditor.cs @@ -62,7 +62,7 @@ namespace Fungus { Label t = target as Label; - Flowchart flowchart = t.GetFlowchart(); + var flowchart = (Flowchart)t.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/MenuEditor.cs b/Assets/Fungus/Scripts/Editor/MenuEditor.cs index 60f9a001..53b3eff7 100644 --- a/Assets/Fungus/Scripts/Editor/MenuEditor.cs +++ b/Assets/Fungus/Scripts/Editor/MenuEditor.cs @@ -31,7 +31,7 @@ namespace Fungus public override void DrawCommandGUI() { - Flowchart flowchart = FlowchartWindow.GetFlowchart(); + var flowchart = FlowchartWindow.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs b/Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs index 37e0bcee..6766418d 100644 --- a/Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs +++ b/Assets/Fungus/Scripts/Editor/MenuTimerEditor.cs @@ -23,7 +23,7 @@ namespace Fungus public override void DrawCommandGUI() { - Flowchart flowchart = FlowchartWindow.GetFlowchart(); + var flowchart = FlowchartWindow.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/SetVariableEditor.cs b/Assets/Fungus/Scripts/Editor/SetVariableEditor.cs index ad761a86..2efba94b 100644 --- a/Assets/Fungus/Scripts/Editor/SetVariableEditor.cs +++ b/Assets/Fungus/Scripts/Editor/SetVariableEditor.cs @@ -37,7 +37,7 @@ namespace Fungus SetVariable t = target as SetVariable; - Flowchart flowchart = t.GetFlowchart(); + var flowchart = (Flowchart)t.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/VariableEditor.cs b/Assets/Fungus/Scripts/Editor/VariableEditor.cs index 73ad21b3..7a30aac8 100644 --- a/Assets/Fungus/Scripts/Editor/VariableEditor.cs +++ b/Assets/Fungus/Scripts/Editor/VariableEditor.cs @@ -203,7 +203,7 @@ namespace Fungus return; } - Flowchart flowchart = command.GetFlowchart() as Flowchart; + var flowchart = command.GetFlowchart() as Flowchart; if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs b/Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs index e3f7e290..e1fe8319 100644 --- a/Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs +++ b/Assets/Fungus/Scripts/Editor/VariableListAdaptor.cs @@ -123,7 +123,7 @@ namespace Fungus return; } - Flowchart flowchart = FlowchartWindow.GetFlowchart(); + var flowchart = FlowchartWindow.GetFlowchart(); if (flowchart == null) { return; diff --git a/Assets/Fungus/Scripts/Editor/ViewEditor.cs b/Assets/Fungus/Scripts/Editor/ViewEditor.cs index 9ebcbadd..f1e7d724 100644 --- a/Assets/Fungus/Scripts/Editor/ViewEditor.cs +++ b/Assets/Fungus/Scripts/Editor/ViewEditor.cs @@ -168,7 +168,7 @@ namespace Fungus bool highlight = Selection.activeGameObject == view.gameObject; - Flowchart flowchart = FlowchartWindow.GetFlowchart(); + var flowchart = FlowchartWindow.GetFlowchart(); if (flowchart != null) { foreach (Command command in flowchart.SelectedCommands) diff --git a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs index 319ef96e..51ac8808 100644 --- a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs @@ -18,7 +18,7 @@ namespace Fungus /// /// The active speaking character. /// An optional Flowchart to use for variable substitution in the character name string. - void SetCharacter(Character character, Flowchart flowchart = null); + void SetCharacter(Character character, IFlowchart flowchart = null); /// /// Sets the character image to display on the Say Dialog. From 43d59a805957a0fbe403d40326b3db2aa41d49c9 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 12:55:45 +0100 Subject: [PATCH 17/32] Using concrete Block class for safety with editor code --- Assets/Fungus/Flowchart/Scripts/Block.cs | 6 +++--- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 6 +++--- Assets/Fungus/Flowchart/Scripts/IBlock.cs | 2 +- Assets/Fungus/Flowchart/Scripts/IFlowchart.cs | 2 +- Assets/Fungus/Scripts/Editor/BlockEditor.cs | 4 ++-- Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index a765bb7a..6bfb3d65 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -34,7 +34,7 @@ namespace Fungus protected ExecutionState executionState; - protected ICommand activeCommand; + protected Command activeCommand; /// // Index of last command executed before the current one. @@ -116,7 +116,7 @@ namespace Fungus public virtual EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } } - public virtual ICommand ActiveCommand { get { return activeCommand; } } + public virtual Command ActiveCommand { get { return activeCommand; } } public virtual float ExecutingIconTimer { get; set; } @@ -207,7 +207,7 @@ namespace Fungus previousActiveCommandIndex = activeCommand.CommandIndex; } - ICommand command = commandList[i]; + var command = commandList[i]; activeCommand = command; if (flowchart.IsActive()) diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index 5cb07404..fcf212e3 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -780,11 +780,11 @@ namespace Fungus selectedCommands.Clear(); } - public virtual void AddSelectedCommand(ICommand command) + public virtual void AddSelectedCommand(Command command) { - if (!selectedCommands.Contains((Command)command)) + if (!selectedCommands.Contains(command)) { - selectedCommands.Add((Command)command); + selectedCommands.Add(command); } } diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Flowchart/Scripts/IBlock.cs index a313036d..417ff2fe 100644 --- a/Assets/Fungus/Flowchart/Scripts/IBlock.cs +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs @@ -47,7 +47,7 @@ namespace Fungus /// /// The currently executing command. /// - ICommand ActiveCommand { get; } + Command ActiveCommand { get; } /// /// Timer for fading Block execution icon. diff --git a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs index e13e2b5c..2ea2f0b9 100644 --- a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs @@ -260,7 +260,7 @@ namespace Fungus /// /// Adds a command to the list of selected commands. /// - void AddSelectedCommand(ICommand command); + void AddSelectedCommand(Command command); /// /// Reset the commands and variables in the Flowchart. diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index 2bae7892..9d197d35 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -732,7 +732,7 @@ namespace Fungus flowchart.ClearSelectedCommands(); - ICommand newCommand = Undo.AddComponent(((Block)block).gameObject, commandOperation.commandType) as Command; + var newCommand = Undo.AddComponent(((Block)block).gameObject, commandOperation.commandType) as Command; block.GetFlowchart().AddSelectedCommand(newCommand); newCommand.ParentBlock = block; newCommand.ItemId = flowchart.NextItemId(); @@ -1013,7 +1013,7 @@ namespace Fungus if (lastSelectedIndex < flowchart.SelectedBlock.CommandList.Count) { - Command nextCommand = flowchart.SelectedBlock.CommandList[lastSelectedIndex]; + var nextCommand = flowchart.SelectedBlock.CommandList[lastSelectedIndex]; block.GetFlowchart().AddSelectedCommand(nextCommand); } diff --git a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs index 37ff844e..1ef9add6 100644 --- a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs @@ -90,7 +90,7 @@ namespace Fungus return null; } - Command newCommand = Undo.AddComponent(((Block)block).gameObject) as Command; + var newCommand = Undo.AddComponent(((Block)block).gameObject) as Command; newCommand.ItemId = flowchart.NextItemId(); flowchart.ClearSelectedCommands(); flowchart.AddSelectedCommand(newCommand); @@ -355,7 +355,7 @@ namespace Fungus for (int i = Math.Min(firstSelectedIndex, lastSelectedIndex); i < Math.Max(firstSelectedIndex, lastSelectedIndex); ++i) { - Command selectedCommand = flowchart.SelectedBlock.CommandList[i]; + var selectedCommand = flowchart.SelectedBlock.CommandList[i]; BlockEditor.actionList.Add ( delegate { flowchart.AddSelectedCommand(selectedCommand); }); From 0d33e6a0266faa6c07caca3d82442deccb5144b4 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 15:36:10 +0100 Subject: [PATCH 18/32] Use concrete classes for Block and Command to ensure editor code is robust. --- Assets/Fungus/Flowchart/Scripts/Block.cs | 6 +- Assets/Fungus/Flowchart/Scripts/Command.cs | 8 +- .../Fungus/Flowchart/Scripts/EventHandler.cs | 12 +-- Assets/Fungus/Flowchart/Scripts/Flowchart.cs | 49 ++++----- Assets/Fungus/Flowchart/Scripts/IBlock.cs | 2 +- Assets/Fungus/Flowchart/Scripts/ICommand.cs | 8 +- .../Fungus/Flowchart/Scripts/IEventHandler.cs | 2 +- Assets/Fungus/Flowchart/Scripts/IFlowchart.cs | 2 +- Assets/Fungus/Flowchart/Scripts/INode.cs | 15 --- Assets/Fungus/Flowchart/Scripts/INode.cs.meta | 12 --- Assets/Fungus/Flowchart/Scripts/Node.cs | 4 +- Assets/Fungus/Scripts/Commands/Call.cs | 4 +- .../Fungus/Scripts/Commands/ControlStage.cs | 2 +- Assets/Fungus/Scripts/Commands/If.cs | 2 +- Assets/Fungus/Scripts/Commands/Jump.cs | 2 +- Assets/Fungus/Scripts/Commands/Menu.cs | 2 +- Assets/Fungus/Scripts/Commands/MenuTimer.cs | 2 +- Assets/Fungus/Scripts/Commands/Portrait.cs | 2 +- .../Scripts/Commands/SetInteractable.cs | 2 +- .../Fungus/Scripts/Commands/SetSpriteOrder.cs | 2 +- Assets/Fungus/Scripts/Commands/TweenUI.cs | 2 +- .../Fungus/Scripts/Components/Localization.cs | 6 +- .../Fungus/Scripts/Components/MenuDialog.cs | 8 +- Assets/Fungus/Scripts/Editor/BlockEditor.cs | 68 ++++++------ .../Fungus/Scripts/Editor/BlockInspector.cs | 16 +-- .../Scripts/Editor/CommandListAdaptor.cs | 8 +- .../Scripts/Editor/FlowchartMenuItems.cs | 2 +- .../Fungus/Scripts/Editor/FlowchartWindow.cs | 102 +++++++++--------- .../Fungus/Scripts/Interfaces/IMenuDialog.cs | 4 +- .../FungusLua/Scripts/LuaBindings.cs | 2 +- 30 files changed, 160 insertions(+), 198 deletions(-) delete mode 100644 Assets/Fungus/Flowchart/Scripts/INode.cs delete mode 100644 Assets/Fungus/Flowchart/Scripts/INode.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 6bfb3d65..f007a31b 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -265,10 +265,10 @@ namespace Fungus jumpToCommandIndex = int.MaxValue; } - public virtual List GetConnectedBlocks() + public virtual List GetConnectedBlocks() { - var connectedBlocks = new List(); - foreach (ICommand command in commandList) + var connectedBlocks = new List(); + foreach (var command in commandList) { if (command != null) { diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Flowchart/Scripts/Command.cs index a5089f5b..059af20f 100644 --- a/Assets/Fungus/Flowchart/Scripts/Command.cs +++ b/Assets/Fungus/Flowchart/Scripts/Command.cs @@ -87,7 +87,7 @@ namespace Fungus /// This reference is only populated at runtime and in the editor when the /// block is selected. /// - public virtual IBlock ParentBlock { get; set; } + public virtual Block ParentBlock { get; set; } /// /// Returns the Flowchart that this command belongs to. @@ -160,13 +160,13 @@ namespace Fungus /// /// Called when the new command is added to a block in the editor. /// - public virtual void OnCommandAdded(IBlock parentBlock) + public virtual void OnCommandAdded(Block parentBlock) {} /// /// Called when the command is deleted from a block in the editor. /// - public virtual void OnCommandRemoved(IBlock parentBlock) + public virtual void OnCommandRemoved(Block parentBlock) {} /// @@ -190,7 +190,7 @@ namespace Fungus /// /// Populates a list with the Blocks that this command references. /// - public virtual void GetConnectedBlocks(ref List connectedBlocks) + public virtual void GetConnectedBlocks(ref List connectedBlocks) {} /// diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs index 00cd860d..6699cc39 100644 --- a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs +++ b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs @@ -43,29 +43,29 @@ namespace Fungus #region IEventHandler - public virtual IBlock ParentBlock { get { return parentBlock; } set { parentBlock = (Block)value; } } + public virtual Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } } public virtual bool ExecuteBlock() { - if (parentBlock == null) + if (ParentBlock == null) { return false; } - if (parentBlock._EventHandler != this) + if (ParentBlock._EventHandler != this) { return false; } - var flowchart = parentBlock.GetFlowchart(); + var flowchart = ParentBlock.GetFlowchart(); // Auto-follow the executing block if none is currently selected if (flowchart.SelectedBlock == null) { - flowchart.SelectedBlock = parentBlock; + flowchart.SelectedBlock = ParentBlock; } - return flowchart.ExecuteBlock(parentBlock); + return flowchart.ExecuteBlock(ParentBlock); } public virtual string GetSummary() diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index fcf212e3..28bb1843 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -206,8 +206,8 @@ namespace Fungus // Make sure item ids are unique and monotonically increasing. // This should always be the case, but some legacy Flowcharts may have issues. List usedIds = new List(); - IBlock[] blocks = GetComponents(); - foreach (IBlock block in blocks) + var blocks = GetComponents(); + foreach (var block in blocks) { if (block.ItemId == -1 || usedIds.Contains(block.ItemId)) @@ -235,8 +235,6 @@ namespace Fungus // Unreferenced components don't have any effect on the flowchart behavior, but // they waste memory so should be cleared out periodically. - IBlock[] blocks = GetComponents(); - // Remove any null entries in the variables list // It shouldn't happen but it seemed to occur for a user on the forum variables.RemoveAll(item => item == null); @@ -249,10 +247,12 @@ namespace Fungus } } + var blocks = GetComponents(); + foreach (var command in GetComponents()) { bool found = false; - foreach (IBlock block in blocks) + foreach (var block in blocks) { if (block.CommandList.Contains(command)) { @@ -270,7 +270,7 @@ namespace Fungus foreach (EventHandler eventHandler in GetComponents()) { bool found = false; - foreach (IBlock block in blocks) + foreach (var block in blocks) { if (block._EventHandler == eventHandler) { @@ -306,7 +306,7 @@ namespace Fungus public virtual Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } } - public virtual IBlock SelectedBlock { get { return selectedBlock; } set { selectedBlock = (Block)value; } } + public virtual Block SelectedBlock { get { return selectedBlock; } set { selectedBlock = value; } } public virtual List SelectedCommands { get { return selectedCommands; } } @@ -345,8 +345,8 @@ namespace Fungus public int NextItemId() { int maxId = -1; - IBlock[] blocks = GetComponents(); - foreach (IBlock block in blocks) + var blocks = GetComponents(); + foreach (var block in blocks) { maxId = Math.Max(maxId, block.ItemId); } @@ -371,8 +371,8 @@ namespace Fungus public virtual IBlock FindBlock(string blockName) { - IBlock [] blocks = GetComponents(); - foreach (Block block in blocks) + var blocks = GetComponents(); + foreach (var block in blocks) { if (block.BlockName == blockName) { @@ -385,15 +385,7 @@ namespace Fungus public virtual void ExecuteBlock(string blockName) { - IBlock block = null; - foreach (IBlock b in GetComponents()) - { - if (b.BlockName == blockName) - { - block = b; - break; - } - } + var block = FindBlock(blockName); if (block == null) { @@ -435,7 +427,7 @@ namespace Fungus public virtual void StopAllBlocks() { - IBlock [] blocks = GetComponents(); + var blocks = GetComponents(); foreach (IBlock block in blocks) { if (block.IsExecuting()) @@ -511,13 +503,13 @@ namespace Fungus baseKey = "New Block"; } - IBlock[] blocks = GetComponents(); + var blocks = GetComponents(); string key = baseKey; while (true) { bool collision = false; - foreach(IBlock block in blocks) + foreach (var block in blocks) { if (block == ignoreBlock || block.BlockName == null) @@ -557,7 +549,7 @@ namespace Fungus while (true) { bool collision = false; - foreach (ICommand command in block.CommandList) + foreach (var command in block.CommandList) { Label label = command as Label; if (label == null || @@ -825,7 +817,7 @@ namespace Fungus public virtual bool HasExecutingBlocks() { - IBlock[] blocks = GetComponents(); + var blocks = GetComponents(); foreach (IBlock block in blocks) { if (block.IsExecuting()) @@ -838,10 +830,9 @@ namespace Fungus public virtual List GetExecutingBlocks() { - List executingBlocks = new List(); - - IBlock[] blocks = GetComponents(); - foreach (IBlock block in blocks) + var executingBlocks = new List(); + var blocks = GetComponents(); + foreach (var block in blocks) { if (block.IsExecuting()) { diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Flowchart/Scripts/IBlock.cs index 417ff2fe..a23e1a34 100644 --- a/Assets/Fungus/Flowchart/Scripts/IBlock.cs +++ b/Assets/Fungus/Flowchart/Scripts/IBlock.cs @@ -99,7 +99,7 @@ namespace Fungus /// /// Returns a list of all Blocks connected to this one. /// - List GetConnectedBlocks(); + List GetConnectedBlocks(); /// /// Returns the type of the previously executing command. diff --git a/Assets/Fungus/Flowchart/Scripts/ICommand.cs b/Assets/Fungus/Flowchart/Scripts/ICommand.cs index 636da53d..600e7071 100644 --- a/Assets/Fungus/Flowchart/Scripts/ICommand.cs +++ b/Assets/Fungus/Flowchart/Scripts/ICommand.cs @@ -45,7 +45,7 @@ namespace Fungus /// This reference is only populated at runtime and in the editor when the /// block is selected. /// - IBlock ParentBlock { get; set; } + Block ParentBlock { get; set; } /// /// Returns the Flowchart that this command belongs to. @@ -84,12 +84,12 @@ namespace Fungus /// /// Called when the new command is added to a block in the editor. /// - void OnCommandAdded(IBlock parentBlock); + void OnCommandAdded(Block parentBlock); /// /// Called when the command is deleted from a block in the editor. /// - void OnCommandRemoved(IBlock parentBlock); + void OnCommandRemoved(Block parentBlock); /// /// Called when this command starts execution. @@ -109,7 +109,7 @@ namespace Fungus /// /// Populates a list with the Blocks that this command references. /// - void GetConnectedBlocks(ref List connectedBlocks); + void GetConnectedBlocks(ref List connectedBlocks); /// /// Returns true if this command references the variable. diff --git a/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs b/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs index 33998b3f..649340a5 100644 --- a/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs +++ b/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs @@ -15,7 +15,7 @@ namespace Fungus /// /// The parent Block which owns this Event Handler. /// - IBlock ParentBlock { get; set; } + Block ParentBlock { get; set; } /// /// The Event Handler should call this method when the event is detected to start executing the Block. diff --git a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs index 2ea2f0b9..7bb76d01 100644 --- a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs @@ -43,7 +43,7 @@ namespace Fungus /// /// Currently selected block in the Flowchart editor. /// - IBlock SelectedBlock { get; set; } + Block SelectedBlock { get; set; } /// /// Currently selected command in the Flowchart editor. diff --git a/Assets/Fungus/Flowchart/Scripts/INode.cs b/Assets/Fungus/Flowchart/Scripts/INode.cs deleted file mode 100644 index 0285a067..00000000 --- a/Assets/Fungus/Flowchart/Scripts/INode.cs +++ /dev/null @@ -1,15 +0,0 @@ -using UnityEngine; - -namespace Fungus -{ - /// - /// Flowchart nodes. - /// - public interface INode - { - /// - /// Returns the display rect. - /// - Rect _NodeRect { get; set; } - } -} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/INode.cs.meta b/Assets/Fungus/Flowchart/Scripts/INode.cs.meta deleted file mode 100644 index 9be7487a..00000000 --- a/Assets/Fungus/Flowchart/Scripts/INode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e9eea916a931c4fed81b254bae8c0b93 -timeCreated: 1473862805 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Fungus/Flowchart/Scripts/Node.cs b/Assets/Fungus/Flowchart/Scripts/Node.cs index 268b45a9..83908412 100644 --- a/Assets/Fungus/Flowchart/Scripts/Node.cs +++ b/Assets/Fungus/Flowchart/Scripts/Node.cs @@ -9,11 +9,11 @@ namespace Fungus /// Base class for Flowchart nodes. /// [AddComponentMenu("")] - public class Node : MonoBehaviour, INode + public class Node : MonoBehaviour { [SerializeField] protected Rect nodeRect = new Rect(0, 0, 120, 30); - #region INode implementation + #region Public methods public virtual Rect _NodeRect { get { return nodeRect; } set { nodeRect = value; } } diff --git a/Assets/Fungus/Scripts/Commands/Call.cs b/Assets/Fungus/Scripts/Commands/Call.cs index de22fe8e..3780a5c8 100644 --- a/Assets/Fungus/Scripts/Commands/Call.cs +++ b/Assets/Fungus/Scripts/Commands/Call.cs @@ -45,7 +45,7 @@ namespace Fungus if (targetBlock != null) { // Check if calling your own parent block - if (ParentBlock.Equals(targetBlock)) + if (ParentBlock != null && ParentBlock.Equals(targetBlock)) { // Just ignore the callmode in this case, and jump to first command in list Continue(0); @@ -91,7 +91,7 @@ namespace Fungus } } - public override void GetConnectedBlocks(ref List connectedBlocks) + public override void GetConnectedBlocks(ref List connectedBlocks) { if (targetBlock != null) { diff --git a/Assets/Fungus/Scripts/Commands/ControlStage.cs b/Assets/Fungus/Scripts/Commands/ControlStage.cs index 73e67ef8..d0c43dbd 100644 --- a/Assets/Fungus/Scripts/Commands/ControlStage.cs +++ b/Assets/Fungus/Scripts/Commands/ControlStage.cs @@ -197,7 +197,7 @@ namespace Fungus return new Color32(230, 200, 250, 255); } - public override void OnCommandAdded(IBlock parentBlock) + public override void OnCommandAdded(Block parentBlock) { //Default to display type: show display = StageDisplayType.Show; diff --git a/Assets/Fungus/Scripts/Commands/If.cs b/Assets/Fungus/Scripts/Commands/If.cs index df7d54d5..52b98ce0 100644 --- a/Assets/Fungus/Scripts/Commands/If.cs +++ b/Assets/Fungus/Scripts/Commands/If.cs @@ -107,7 +107,7 @@ namespace Fungus // Find the next Else, ElseIf or End command at the same indent level as this If command for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i) { - ICommand nextCommand = ParentBlock.CommandList[i]; + Command nextCommand = ParentBlock.CommandList[i]; if (nextCommand == null) { diff --git a/Assets/Fungus/Scripts/Commands/Jump.cs b/Assets/Fungus/Scripts/Commands/Jump.cs index ff3214f2..65b193e6 100644 --- a/Assets/Fungus/Scripts/Commands/Jump.cs +++ b/Assets/Fungus/Scripts/Commands/Jump.cs @@ -27,7 +27,7 @@ namespace Fungus return; } - foreach (ICommand command in ParentBlock.CommandList) + foreach (var command in ParentBlock.CommandList) { Label label = command as Label; if (label != null && diff --git a/Assets/Fungus/Scripts/Commands/Menu.cs b/Assets/Fungus/Scripts/Commands/Menu.cs index 96b0fb58..845a62a5 100644 --- a/Assets/Fungus/Scripts/Commands/Menu.cs +++ b/Assets/Fungus/Scripts/Commands/Menu.cs @@ -62,7 +62,7 @@ namespace Fungus Continue(); } - public override void GetConnectedBlocks(ref List connectedBlocks) + public override void GetConnectedBlocks(ref List connectedBlocks) { if (targetBlock != null) { diff --git a/Assets/Fungus/Scripts/Commands/MenuTimer.cs b/Assets/Fungus/Scripts/Commands/MenuTimer.cs index 24ceb68a..4e17ed81 100644 --- a/Assets/Fungus/Scripts/Commands/MenuTimer.cs +++ b/Assets/Fungus/Scripts/Commands/MenuTimer.cs @@ -37,7 +37,7 @@ namespace Fungus Continue(); } - public override void GetConnectedBlocks(ref List connectedBlocks) + public override void GetConnectedBlocks(ref List connectedBlocks) { if (targetBlock != null) { diff --git a/Assets/Fungus/Scripts/Commands/Portrait.cs b/Assets/Fungus/Scripts/Commands/Portrait.cs index f1600d92..4e119220 100644 --- a/Assets/Fungus/Scripts/Commands/Portrait.cs +++ b/Assets/Fungus/Scripts/Commands/Portrait.cs @@ -207,7 +207,7 @@ namespace Fungus return new Color32(230, 200, 250, 255); } - public override void OnCommandAdded(IBlock parentBlock) + public override void OnCommandAdded(Block parentBlock) { //Default to display type: show display = DisplayType.Show; diff --git a/Assets/Fungus/Scripts/Commands/SetInteractable.cs b/Assets/Fungus/Scripts/Commands/SetInteractable.cs index b967b4df..5357c2ab 100644 --- a/Assets/Fungus/Scripts/Commands/SetInteractable.cs +++ b/Assets/Fungus/Scripts/Commands/SetInteractable.cs @@ -81,7 +81,7 @@ namespace Fungus return new Color32(180, 250, 250, 255); } - public override void OnCommandAdded(IBlock parentBlock) + public override void OnCommandAdded(Block parentBlock) { targetObjects.Add(null); } diff --git a/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs b/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs index 8fe4f663..06f615f1 100644 --- a/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs +++ b/Assets/Fungus/Scripts/Commands/SetSpriteOrder.cs @@ -72,7 +72,7 @@ namespace Fungus return false; } - public override void OnCommandAdded(IBlock parentBlock) + public override void OnCommandAdded(Block parentBlock) { // Add a default empty entry targetSprites.Add(null); diff --git a/Assets/Fungus/Scripts/Commands/TweenUI.cs b/Assets/Fungus/Scripts/Commands/TweenUI.cs index 6a56e2ed..4cba1bf7 100644 --- a/Assets/Fungus/Scripts/Commands/TweenUI.cs +++ b/Assets/Fungus/Scripts/Commands/TweenUI.cs @@ -65,7 +65,7 @@ namespace Fungus Continue(); } - public override void OnCommandAdded(IBlock parentBlock) + public override void OnCommandAdded(Block parentBlock) { // Add an empty slot by default. Saves an unnecessary user click. if (targetObjects.Count == 0) diff --git a/Assets/Fungus/Scripts/Components/Localization.cs b/Assets/Fungus/Scripts/Components/Localization.cs index 429b20ec..38f53bc3 100644 --- a/Assets/Fungus/Scripts/Components/Localization.cs +++ b/Assets/Fungus/Scripts/Components/Localization.cs @@ -138,10 +138,10 @@ namespace Fungus var flowcharts = GameObject.FindObjectsOfType(); foreach (var flowchart in flowcharts) { - IBlock[] blocks = flowchart.GetComponents(); - foreach (IBlock block in blocks) + var blocks = flowchart.GetComponents(); + foreach (var block in blocks) { - foreach (Command command in block.CommandList) + foreach (var command in block.CommandList) { ILocalizable localizable = command as ILocalizable; if (localizable != null) diff --git a/Assets/Fungus/Scripts/Components/MenuDialog.cs b/Assets/Fungus/Scripts/Components/MenuDialog.cs index 52a1a16a..841e9bc6 100644 --- a/Assets/Fungus/Scripts/Components/MenuDialog.cs +++ b/Assets/Fungus/Scripts/Components/MenuDialog.cs @@ -72,7 +72,7 @@ namespace Fungus Canvas.ForceUpdateCanvases(); } - protected virtual IEnumerator WaitForTimeout(float timeoutDuration, IBlock targetBlock) + protected virtual IEnumerator WaitForTimeout(float timeoutDuration, Block targetBlock) { float elapsedTime = 0; @@ -147,7 +147,7 @@ namespace Fungus } } - public virtual bool AddOption(string text, bool interactable, IBlock targetBlock) + public virtual bool AddOption(string text, bool interactable, Block targetBlock) { bool addedOption = false; foreach (Button button in cachedButtons) @@ -169,7 +169,7 @@ namespace Fungus textComponent.text = text; } - IBlock block = targetBlock; + var block = targetBlock; button.onClick.AddListener(delegate { @@ -244,7 +244,7 @@ namespace Fungus return addedOption; } - public virtual void ShowTimer(float duration, IBlock targetBlock) + public virtual void ShowTimer(float duration, Block targetBlock) { if (cachedSlider != null) { diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index 9d197d35..acc8f36b 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -20,13 +20,13 @@ namespace Fungus { protected class SetEventHandlerOperation { - public IBlock block; + public Block block; public Type eventHandlerType; } protected class AddCommandOperation { - public IBlock block; + public Block block; public Type commandType; public int index; } @@ -59,7 +59,7 @@ namespace Fungus EditorGUI.PropertyField(blockNameRect, blockNameProperty, new GUIContent("")); // Ensure block name is unique for this Flowchart - IBlock block = target as IBlock; + var block = target as Block; string uniqueName = flowchart.GetUniqueBlockKey(blockNameProperty.stringValue, block); if (uniqueName != block.BlockName) { @@ -89,7 +89,7 @@ namespace Fungus actionList.Clear(); } - IBlock block = target as IBlock; + var block = target as Block; SerializedProperty commandListProperty = serializedObject.FindProperty("commandList"); @@ -103,7 +103,7 @@ namespace Fungus block.UpdateIndentLevels(); // Make sure each command has a reference to its parent block - foreach (ICommand command in block.CommandList) + foreach (var command in block.CommandList) { if (command == null) // Will be deleted from the list later on { @@ -114,7 +114,7 @@ namespace Fungus ReorderableListGUI.Title("Commands"); CommandListAdaptor adaptor = new CommandListAdaptor(commandListProperty, 0); - adaptor.nodeRect = (block as INode)._NodeRect; + adaptor.nodeRect = block._NodeRect; ReorderableListFlags flags = ReorderableListFlags.HideAddButton | ReorderableListFlags.HideRemoveButtons | ReorderableListFlags.DisableContextMenu; @@ -305,7 +305,7 @@ namespace Fungus // event handler selected. List eventHandlerTypes = EditorExtensions.FindDerivedTypes(typeof(EventHandler)).ToList(); - IBlock block = target as IBlock; + Block block = target as Block; System.Type currentType = null; if (block._EventHandler != null) { @@ -382,14 +382,14 @@ namespace Fungus protected void OnSelectEventHandler(object obj) { SetEventHandlerOperation operation = obj as SetEventHandlerOperation; - IBlock block = operation.block; + Block block = operation.block; System.Type selectedType = operation.eventHandlerType; if (block == null) { return; } - Undo.RecordObject((Block)block, "Set Event Handler"); + Undo.RecordObject(block, "Set Event Handler"); if (block._EventHandler != null) { @@ -398,13 +398,13 @@ namespace Fungus if (selectedType != null) { - EventHandler newHandler = Undo.AddComponent(((Block)block).gameObject, selectedType) as EventHandler; + EventHandler newHandler = Undo.AddComponent(block.gameObject, selectedType) as EventHandler; newHandler.ParentBlock = block; block._EventHandler = newHandler; } // Because this is an async call, we need to force prefab instances to record changes - PrefabUtility.RecordPrefabInstancePropertyModifications((Block)block); + PrefabUtility.RecordPrefabInstancePropertyModifications(block); } static public void BlockField(SerializedProperty property, GUIContent label, GUIContent nullLabel, Flowchart flowchart) @@ -414,14 +414,14 @@ namespace Fungus return; } - IBlock block = property.objectReferenceValue as IBlock; + var block = property.objectReferenceValue as Block; // Build dictionary of child blocks List blockNames = new List(); int selectedIndex = 0; blockNames.Add(nullLabel); - IBlock[] blocks = flowchart.GetComponents(); + var blocks = flowchart.GetComponents(); for (int i = 0; i < blocks.Length; ++i) { blockNames.Add(new GUIContent(blocks[i].BlockName)); @@ -442,7 +442,7 @@ namespace Fungus block = blocks[selectedIndex - 1]; } - property.objectReferenceValue = (Block)block; + property.objectReferenceValue = block; } static public Block BlockField(Rect position, GUIContent nullLabel, Flowchart flowchart, Block block) @@ -631,13 +631,13 @@ namespace Fungus protected virtual void ShowCommandMenu() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); // Use index of last selected command in list, or end of list if nothing selected. int index = -1; - foreach (ICommand command in flowchart.SelectedCommands) + foreach (var command in flowchart.SelectedCommands) { if (command.CommandIndex + 1 > index) { @@ -722,7 +722,7 @@ namespace Fungus { AddCommandOperation commandOperation = obj as AddCommandOperation; - IBlock block = commandOperation.block; + var block = commandOperation.block; if (block == null) { return; @@ -732,7 +732,7 @@ namespace Fungus flowchart.ClearSelectedCommands(); - var newCommand = Undo.AddComponent(((Block)block).gameObject, commandOperation.commandType) as Command; + var newCommand = Undo.AddComponent(block.gameObject, commandOperation.commandType) as Command; block.GetFlowchart().AddSelectedCommand(newCommand); newCommand.ParentBlock = block; newCommand.ItemId = flowchart.NextItemId(); @@ -740,23 +740,23 @@ namespace Fungus // Let command know it has just been added to the block newCommand.OnCommandAdded(block); - Undo.RecordObject((Block)block, "Set command type"); + Undo.RecordObject(block, "Set command type"); if (commandOperation.index < block.CommandList.Count - 1) { - block.CommandList.Insert(commandOperation.index, (Command)newCommand); + block.CommandList.Insert(commandOperation.index, newCommand); } else { - block.CommandList.Add((Command)newCommand); + block.CommandList.Add(newCommand); } // Because this is an async call, we need to force prefab instances to record changes - PrefabUtility.RecordPrefabInstancePropertyModifications((Block)block); + PrefabUtility.RecordPrefabInstancePropertyModifications(block); } public virtual void ShowContextMenu() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null) @@ -844,7 +844,7 @@ namespace Fungus protected void SelectAll() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || @@ -865,7 +865,7 @@ namespace Fungus protected void SelectNone() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || @@ -888,7 +888,7 @@ namespace Fungus protected void Copy() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || @@ -918,7 +918,7 @@ namespace Fungus protected void Paste() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || @@ -970,14 +970,14 @@ namespace Fungus } // Because this is an async call, we need to force prefab instances to record changes - PrefabUtility.RecordPrefabInstancePropertyModifications((Block)block); + PrefabUtility.RecordPrefabInstancePropertyModifications(block); Repaint(); } protected void Delete() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null || @@ -1022,7 +1022,7 @@ namespace Fungus protected void PlayCommand() { - IBlock targetBlock = target as IBlock; + var targetBlock = target as Block; var flowchart = (Flowchart)targetBlock.GetFlowchart(); Command command = flowchart.SelectedCommands[0]; if (targetBlock.IsExecuting()) @@ -1042,7 +1042,7 @@ namespace Fungus protected void StopAllPlayCommand() { - IBlock targetBlock = target as IBlock; + var targetBlock = target as Block; var flowchart = (Flowchart)targetBlock.GetFlowchart(); Command command = flowchart.SelectedCommands[0]; @@ -1051,7 +1051,7 @@ namespace Fungus flowchart.StartCoroutine(RunBlock(flowchart, targetBlock, command.CommandIndex, 0.2f)); } - protected IEnumerator RunBlock(Flowchart flowchart, IBlock targetBlock, int commandIndex, float delay) + protected IEnumerator RunBlock(Flowchart flowchart, Block targetBlock, int commandIndex, float delay) { yield return new WaitForSeconds(delay); flowchart.ExecuteBlock(targetBlock, commandIndex); @@ -1059,7 +1059,7 @@ namespace Fungus protected void SelectPrevious() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); int firstSelectedIndex = flowchart.SelectedBlock.CommandList.Count; @@ -1099,7 +1099,7 @@ namespace Fungus protected void SelectNext() { - IBlock block = target as IBlock; + var block = target as Block; var flowchart = (Flowchart)block.GetFlowchart(); int lastSelectedIndex = -1; diff --git a/Assets/Fungus/Scripts/Editor/BlockInspector.cs b/Assets/Fungus/Scripts/Editor/BlockInspector.cs index f7accb2f..c14e82f9 100644 --- a/Assets/Fungus/Scripts/Editor/BlockInspector.cs +++ b/Assets/Fungus/Scripts/Editor/BlockInspector.cs @@ -35,7 +35,7 @@ namespace Fungus // when a different block / command is selected. protected BlockEditor activeBlockEditor; protected CommandEditor activeCommandEditor; - protected ICommand activeCommand; // Command currently being inspected + protected Command activeCommand; // Command currently being inspected // Cached command editors to avoid creating / destroying editors more than necessary // This list is static so persists between @@ -75,7 +75,11 @@ namespace Fungus return; } - IBlock block = blockInspector.block; + var block = blockInspector.block; + if (block == null) + { + return; + } var flowchart = (Flowchart)block.GetFlowchart(); @@ -83,7 +87,7 @@ namespace Fungus !block.Equals(activeBlockEditor.target)) { DestroyImmediate(activeBlockEditor); - activeBlockEditor = Editor.CreateEditor((Block)block) as BlockEditor; + activeBlockEditor = Editor.CreateEditor(block) as BlockEditor; } activeBlockEditor.DrawBlockName(flowchart); @@ -101,7 +105,7 @@ namespace Fungus activeBlockEditor.DrawBlockGUI(flowchart); GUILayout.EndScrollView(); - ICommand inspectCommand = null; + Command inspectCommand = null; if (flowchart.SelectedCommands.Count == 1) { inspectCommand = flowchart.SelectedCommands[0]; @@ -109,7 +113,7 @@ namespace Fungus if (Application.isPlaying && inspectCommand != null && - inspectCommand.ParentBlock != block) + !inspectCommand.ParentBlock.Equals(block)) { GUILayout.EndArea(); Repaint(); @@ -143,7 +147,7 @@ namespace Fungus } } - public void DrawCommandUI(Flowchart flowchart, ICommand inspectCommand) + public void DrawCommandUI(Flowchart flowchart, Command inspectCommand) { ResizeScrollView(flowchart); diff --git a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs index 1ef9add6..a6d5be45 100644 --- a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs @@ -84,13 +84,13 @@ namespace Fungus return null; } - IBlock block = flowchart.SelectedBlock; + var block = flowchart.SelectedBlock; if (block == null) { return null; } - var newCommand = Undo.AddComponent(((Block)block).gameObject) as Command; + var newCommand = Undo.AddComponent(block.gameObject) as Command; newCommand.ItemId = flowchart.NextItemId(); flowchart.ClearSelectedCommands(); flowchart.AddSelectedCommand(newCommand); @@ -103,10 +103,10 @@ namespace Fungus Command command = _arrayProperty.GetArrayElementAtIndex(index).objectReferenceValue as Command; // Add the command as a new component - IBlock parentBlock = command.GetComponent(); + var parentBlock = command.GetComponent(); System.Type type = command.GetType(); - Command newCommand = Undo.AddComponent(((Block)parentBlock).gameObject, type) as Command; + Command newCommand = Undo.AddComponent(parentBlock.gameObject, type) as Command; newCommand.ItemId = newCommand.GetFlowchart().NextItemId(); System.Reflection.FieldInfo[] fields = type.GetFields(); foreach (System.Reflection.FieldInfo field in fields) diff --git a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs index 3ddaf290..26af4ccd 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs @@ -24,7 +24,7 @@ namespace Fungus // Only the first created Flowchart in the scene should have a default GameStarted block if (GameObject.FindObjectsOfType().Length > 1) { - IBlock block = go.GetComponent(); + var block = go.GetComponent(); GameObject.DestroyImmediate(block._EventHandler); block._EventHandler = null; } diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index 00adf021..2b6669cd 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -12,9 +12,9 @@ namespace Fungus { public class FlowchartWindow : EditorWindow { - public static List deleteList = new List(); + public static List deleteList = new List(); - protected List windowBlockMap = new List(); + protected List windowBlockMap = new List(); // The ReorderableList control doesn't drag properly when used with GUI.DragWindow(), // so we just implement dragging ourselves. @@ -117,7 +117,7 @@ namespace Fungus } // Delete any scheduled objects - foreach (IBlock deleteBlock in deleteList) + foreach (var deleteBlock in deleteList) { bool isSelected = (flowchart.SelectedBlock == deleteBlock); @@ -219,11 +219,11 @@ namespace Fungus protected virtual void DrawFlowchartView(Flowchart flowchart) { - IBlock[] blocks = flowchart.GetComponents(); + Block[] blocks = flowchart.GetComponents(); - foreach (IBlock block in blocks) + foreach (var block in blocks) { - var node = block as INode; + var node = block as Node; if (node == null) { continue; @@ -263,11 +263,11 @@ namespace Fungus CalcFlowchartCenter(flowchart, blocks); // Draw connections - foreach (IBlock block in blocks) + foreach (var block in blocks) { DrawConnections(flowchart, block, false); } - foreach (IBlock block in blocks) + foreach (var block in blocks) { DrawConnections(flowchart, block, true); } @@ -280,7 +280,7 @@ namespace Fungus windowBlockMap.Clear(); for (int i = 0; i < blocks.Length; ++i) { - IBlock block = blocks[i]; + var block = blocks[i]; float nodeWidthA = nodeStyle.CalcSize(new GUIContent(block.BlockName)).x + 10; float nodeWidthB = 0f; @@ -289,11 +289,9 @@ namespace Fungus nodeWidthB = nodeStyle.CalcSize(new GUIContent(block._EventHandler.GetSummary())).x + 10; } - var node = block as INode; - if (Event.current.button == 0) { - Rect tempRect = node._NodeRect; + Rect tempRect = block._NodeRect; tempRect.width = Mathf.Max(Mathf.Max(nodeWidthA, nodeWidthB), 120); tempRect.height = 40; @@ -321,10 +319,10 @@ namespace Fungus forceRepaintCount = 6; } - node._NodeRect = tempRect; + block._NodeRect = tempRect; } - Rect windowRect = new Rect(node._NodeRect); + Rect windowRect = new Rect(block._NodeRect); windowRect.x += flowchart.ScrollPos.x; windowRect.y += flowchart.ScrollPos.y; @@ -338,7 +336,7 @@ namespace Fungus EndWindows(); // Draw Event Handler labels - foreach (IBlock block in blocks) + foreach (var block in blocks) { if (block._EventHandler != null) { @@ -355,22 +353,19 @@ namespace Fungus handlerStyle.margin.bottom = 0; handlerStyle.alignment = TextAnchor.MiddleCenter; - INode node = block as INode; - - Rect rect = new Rect(node._NodeRect); - rect.height = handlerStyle.CalcHeight(new GUIContent(handlerLabel), node._NodeRect.width); + Rect rect = new Rect(block._NodeRect); + rect.height = handlerStyle.CalcHeight(new GUIContent(handlerLabel), block._NodeRect.width); rect.x += flowchart.ScrollPos.x; rect.y += flowchart.ScrollPos.y - rect.height; GUI.Label(rect, handlerLabel, handlerStyle); } } - - + // Draw play icons beside all executing blocks if (Application.isPlaying) { - foreach (IBlock b in blocks) + foreach (var b in blocks) { if (b.IsExecuting()) { @@ -381,9 +376,7 @@ namespace Fungus if (b.ExecutingIconTimer > Time.realtimeSinceStartup) { - INode node = b as INode; - - Rect rect = new Rect(node._NodeRect); + Rect rect = new Rect(b._NodeRect); rect.x += flowchart.ScrollPos.x - 37; rect.y += flowchart.ScrollPos.y + 3; @@ -414,7 +407,7 @@ namespace Fungus EditorZoomArea.End(); } - public virtual void CalcFlowchartCenter(Flowchart flowchart, IBlock[] blocks) + public virtual void CalcFlowchartCenter(Flowchart flowchart, Block[] blocks) { if (flowchart == null || blocks.Count() == 0) @@ -422,17 +415,15 @@ namespace Fungus return; } - Vector2 min = (blocks[0] as INode)._NodeRect.min; - Vector2 max = (blocks[0] as INode)._NodeRect.max; + Vector2 min = blocks[0]._NodeRect.min; + Vector2 max = blocks[0]._NodeRect.max; - foreach (IBlock block in blocks) + foreach (var block in blocks) { - INode node = block as INode; - - min.x = Mathf.Min(min.x, node._NodeRect.center.x); - min.y = Mathf.Min(min.y, node._NodeRect.center.y); - max.x = Mathf.Max(max.x, node._NodeRect.center.x); - max.y = Mathf.Max(max.y, node._NodeRect.center.y); + min.x = Mathf.Min(min.x, block._NodeRect.center.x); + min.y = Mathf.Min(min.y, block._NodeRect.center.y); + max.x = Mathf.Max(max.x, block._NodeRect.center.x); + max.y = Mathf.Max(max.y, block._NodeRect.center.y); } Vector2 center = (min + max) * -0.5f; @@ -536,7 +527,7 @@ namespace Fungus } } - protected virtual void SelectBlock(Flowchart flowchart, IBlock block) + protected virtual void SelectBlock(Flowchart flowchart, Block block) { // Select the block and also select currently executing command ShowBlockInspector(flowchart); @@ -561,7 +552,7 @@ namespace Fungus protected virtual void DeleteBlock(Flowchart flowchart, IBlock block) { - foreach (Command command in block.CommandList) + foreach (var command in block.CommandList) { Undo.DestroyObjectImmediate(command); } @@ -572,7 +563,7 @@ namespace Fungus protected virtual void DrawWindow(int windowId) { - IBlock block = windowBlockMap[windowId]; + var block = windowBlockMap[windowId]; var flowchart = (Flowchart)block.GetFlowchart(); if (flowchart == null) @@ -591,10 +582,8 @@ namespace Fungus { dragWindowId = windowId; - var node = block as INode; - - startDragPosition.x = node._NodeRect.x; - startDragPosition.y = node._NodeRect.y; + startDragPosition.x = block._NodeRect.x; + startDragPosition.y = block._NodeRect.y; } if (windowId < windowBlockMap.Count) @@ -607,7 +596,12 @@ namespace Fungus } } - bool selected = (flowchart.SelectedBlock == block); + bool selected = false; + if (flowchart.SelectedBlock != null && + flowchart.SelectedBlock.Equals(block)) + { + selected = true; + } GUIStyle nodeStyleCopy = new GUIStyle(nodeStyle); @@ -618,9 +612,9 @@ namespace Fungus else { // Count the number of unique connections (excluding self references) - List uniqueList = new List(); - List connectedBlocks = block.GetConnectedBlocks(); - foreach (IBlock connectedBlock in connectedBlocks) + var uniqueList = new List(); + var connectedBlocks = block.GetConnectedBlocks(); + foreach (Block connectedBlock in connectedBlocks) { if (connectedBlock == block || uniqueList.Contains(connectedBlock)) @@ -643,7 +637,7 @@ namespace Fungus nodeStyleCopy.normal.textColor = Color.black; // Make sure node is wide enough to fit the node name text - var n = block as INode; + var n = block as Node; float width = nodeStyleCopy.CalcSize(new GUIContent(block.BlockName)).x; Rect tempRect = n._NodeRect; tempRect.width = Mathf.Max (n._NodeRect.width, width); @@ -670,16 +664,16 @@ namespace Fungus } } - protected virtual void DrawConnections(Flowchart flowchart, IBlock block, bool highlightedOnly) + protected virtual void DrawConnections(Flowchart flowchart, Block block, bool highlightedOnly) { if (block == null) { return; } - List connectedBlocks = new List(); + var connectedBlocks = new List(); - bool blockIsSelected = (flowchart.SelectedBlock == block); + bool blockIsSelected = (flowchart.SelectedBlock != block); foreach (Command command in block.CommandList) { @@ -709,7 +703,7 @@ namespace Fungus connectedBlocks.Clear(); command.GetConnectedBlocks(ref connectedBlocks); - foreach (IBlock blockB in connectedBlocks) + foreach (Block blockB in connectedBlocks) { if (blockB == null || block == blockB || @@ -718,11 +712,11 @@ namespace Fungus continue; } - Rect startRect = new Rect((block as INode)._NodeRect); + Rect startRect = new Rect(block._NodeRect); startRect.x += flowchart.ScrollPos.x; startRect.y += flowchart.ScrollPos.y; - Rect endRect = new Rect((blockB as INode)._NodeRect); + Rect endRect = new Rect(blockB._NodeRect); endRect.x += flowchart.ScrollPos.x; endRect.y += flowchart.ScrollPos.y; @@ -782,7 +776,7 @@ namespace Fungus public static void DeleteBlock(object obj) { - IBlock block = obj as IBlock; + var block = obj as Block; FlowchartWindow.deleteList.Add(block); } diff --git a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs index 0037dc10..ae3a445c 100644 --- a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs @@ -44,7 +44,7 @@ namespace Fungus /// The option text to display on the button. /// If false, the option is displayed but is not selectable. /// Block to execute when the option is selected. - bool AddOption(string text, bool interactable, IBlock targetBlock); + bool AddOption(string text, bool interactable, Block targetBlock); /// /// Adds the option to the list of displayed options, calls a Lua function when selected. @@ -58,7 +58,7 @@ namespace Fungus /// /// The duration during which the player can select an option. /// Block to execute if the player does not select an option in time. - void ShowTimer(float duration, IBlock targetBlock); + void ShowTimer(float duration, Block targetBlock); /// /// Show a timer during which the player can select an option. Calls a Lua function when the timer expires. diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs index 5b0aab3b..9013ea6e 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs @@ -84,7 +84,7 @@ namespace Fungus public override void AddBindings(ILuaEnvironment luaEnv) { if (!allEnvironments && - !luaEnvironment.Equals(luaEnv)) + (luaEnvironment != null && !luaEnvironment.Equals(luaEnv))) { // Don't add bindings to this environment return; From d3baaff505de3e513e37762c1c2cb03de39390c0 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 15:49:01 +0100 Subject: [PATCH 19/32] Use var --- Assets/Fungus/Flowchart/Scripts/Block.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index f007a31b..1c9711e9 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -158,7 +158,7 @@ namespace Fungus executionCount++; - IFlowchart flowchart = GetFlowchart(); + var flowchart = GetFlowchart(); executionState = ExecutionState.Executing; #if UNITY_EDITOR From 34dc2db353d34dd9172b5db2f37285f38a15964f Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 15:49:31 +0100 Subject: [PATCH 20/32] SayDialog.SetCharacter uses ICharacter interface --- Assets/Fungus/Scripts/Components/Character.cs | 11 +++-------- Assets/Fungus/Scripts/Components/SayDialog.cs | 12 ++++++------ Assets/Fungus/Scripts/Interfaces/ICharacter.cs | 5 +++++ Assets/Fungus/Scripts/Interfaces/ISayDialog.cs | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Assets/Fungus/Scripts/Components/Character.cs b/Assets/Fungus/Scripts/Components/Character.cs index 21dd72b9..8c3634ee 100644 --- a/Assets/Fungus/Scripts/Components/Character.cs +++ b/Assets/Fungus/Scripts/Components/Character.cs @@ -71,19 +71,14 @@ namespace Fungus public virtual ISayDialog SetSayDialog { get { return setSayDialog; } } - /// - /// Returns true if the character name starts with the specified string. Case insensitive. - /// - public bool NameStartsWith(string matchString) + public string GetObjectName() { return gameObject.name; } + + public virtual bool NameStartsWith(string matchString) { return name.StartsWith(matchString, true, System.Globalization.CultureInfo.CurrentCulture) || nameText.StartsWith(matchString, true, System.Globalization.CultureInfo.CurrentCulture); } - /// - /// Looks for a portrait by name on a character - /// If none is found, give a warning and return a blank sprite - /// public virtual Sprite GetPortrait(string portraitString) { if (String.IsNullOrEmpty(portraitString)) diff --git a/Assets/Fungus/Scripts/Components/SayDialog.cs b/Assets/Fungus/Scripts/Components/SayDialog.cs index 3a6775a8..a7d400e6 100644 --- a/Assets/Fungus/Scripts/Components/SayDialog.cs +++ b/Assets/Fungus/Scripts/Components/SayDialog.cs @@ -17,7 +17,7 @@ namespace Fungus public static ISayDialog activeSayDialog; // Most recent speaking character - public static Character speakingCharacter; + public static ICharacter speakingCharacter; [Tooltip("Duration to fade dialogue in/out")] [SerializeField] protected float fadeDuration = 0.25f; @@ -245,7 +245,7 @@ namespace Fungus gameObject.SetActive(state); } - public virtual void SetCharacter(Character character, IFlowchart flowchart = null) + public virtual void SetCharacter(ICharacter character, IFlowchart flowchart = null) { if (character == null) { @@ -261,7 +261,7 @@ namespace Fungus } else { - Character prevSpeakingCharacter = speakingCharacter; + ICharacter prevSpeakingCharacter = speakingCharacter; speakingCharacter = character; // Dim portraits of non-speaking characters @@ -270,11 +270,11 @@ namespace Fungus if (stage.DimPortraits) { - foreach (Character c in stage.CharactersOnStage) + foreach (var c in stage.CharactersOnStage) { if (prevSpeakingCharacter != speakingCharacter) { - if (c != speakingCharacter) + if (c != null && !c.Equals(speakingCharacter)) { stage.SetDimmed(c, true); } @@ -292,7 +292,7 @@ namespace Fungus if (characterName == "") { // Use game object name as default - characterName = character.name; + characterName = character.GetObjectName(); } if (flowchart != null) diff --git a/Assets/Fungus/Scripts/Interfaces/ICharacter.cs b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs index 3039e231..e721e215 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICharacter.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs @@ -52,6 +52,11 @@ namespace Fungus /// ISayDialog SetSayDialog { get; } + /// + /// Returns the name of the game object. + /// + string GetObjectName(); + /// /// Returns true if the character name starts with the specified string. Case insensitive. /// diff --git a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs index 51ac8808..c37aecb7 100644 --- a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs @@ -18,7 +18,7 @@ namespace Fungus /// /// The active speaking character. /// An optional Flowchart to use for variable substitution in the character name string. - void SetCharacter(Character character, IFlowchart flowchart = null); + void SetCharacter(ICharacter character, IFlowchart flowchart = null); /// /// Sets the character image to display on the Say Dialog. From 7a0f51a01a7bc84c6aba5bd7dfc6bbcc365d0da7 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 15:50:52 +0100 Subject: [PATCH 21/32] StringFormatter class is now static --- Assets/Fungus/Flowchart/Scripts/StringFormatter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs b/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs index 5168f6fa..f932001c 100644 --- a/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs +++ b/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs @@ -9,7 +9,7 @@ namespace Fungus /// /// Misc string formatting functions. /// - public class StringFormatter + public static class StringFormatter { public static string[] FormatEnumNames(Enum e, string firstLabel) { From 13b3e31085cfccc4c7fe0c9989f39cdfbb44362d Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 15:55:26 +0100 Subject: [PATCH 22/32] Moved Flowchart scripts into main Scripts folder --- Assets/Fungus/Flowchart.meta | 5 ----- Assets/Fungus/Flowchart/Scripts.meta | 5 ----- .../{Flowchart/Scripts => Scripts/Components}/Block.cs | 0 .../{Flowchart/Scripts => Scripts/Components}/Block.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Components}/Command.cs | 0 .../Scripts => Scripts/Components}/Command.cs.meta | 0 .../Scripts => Scripts/Components}/CommandCopyBuffer.cs | 0 .../Scripts => Scripts/Components}/CommandCopyBuffer.cs.meta | 0 .../Scripts => Scripts/Components}/EventHandler.cs | 0 .../Scripts => Scripts/Components}/EventHandler.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Components}/Flowchart.cs | 0 .../Scripts => Scripts/Components}/Flowchart.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Components}/FungusState.cs | 0 .../Scripts => Scripts/Components}/FungusState.cs.meta | 0 .../Fungus/{Flowchart/Scripts => Scripts/Components}/Node.cs | 0 .../{Flowchart/Scripts => Scripts/Components}/Node.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Components}/SceneLoader.cs | 0 .../Scripts => Scripts/Components}/SceneLoader.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Components}/Variable.cs | 0 .../Scripts => Scripts/Components}/Variable.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Interfaces}/IBlock.cs | 0 .../{Flowchart/Scripts => Scripts/Interfaces}/IBlock.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Interfaces}/ICommand.cs | 0 .../Scripts => Scripts/Interfaces}/ICommand.cs.meta | 0 .../Scripts => Scripts/Interfaces}/IEventHandler.cs | 0 .../Scripts => Scripts/Interfaces}/IEventHandler.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Interfaces}/IFlowchart.cs | 0 .../Scripts => Scripts/Interfaces}/IFlowchart.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Interfaces}/IUpdateable.cs | 0 .../Scripts => Scripts/Interfaces}/IUpdateable.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Interfaces}/IVariable.cs | 0 .../Scripts => Scripts/Interfaces}/IVariable.cs.meta | 0 .../{Flowchart/Scripts => Scripts/Utils}/StringFormatter.cs | 0 .../Scripts => Scripts/Utils}/StringFormatter.cs.meta | 0 34 files changed, 10 deletions(-) delete mode 100644 Assets/Fungus/Flowchart.meta delete mode 100644 Assets/Fungus/Flowchart/Scripts.meta rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Block.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Block.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Command.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Command.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/CommandCopyBuffer.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/CommandCopyBuffer.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/EventHandler.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/EventHandler.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Flowchart.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Flowchart.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/FungusState.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/FungusState.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Node.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Node.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/SceneLoader.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/SceneLoader.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Variable.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Components}/Variable.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IBlock.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IBlock.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/ICommand.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/ICommand.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IEventHandler.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IEventHandler.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IFlowchart.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IFlowchart.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IUpdateable.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IUpdateable.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IVariable.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Interfaces}/IVariable.cs.meta (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Utils}/StringFormatter.cs (100%) rename Assets/Fungus/{Flowchart/Scripts => Scripts/Utils}/StringFormatter.cs.meta (100%) diff --git a/Assets/Fungus/Flowchart.meta b/Assets/Fungus/Flowchart.meta deleted file mode 100644 index cfb6c7a3..00000000 --- a/Assets/Fungus/Flowchart.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 57bf29b4215da4cf9b7c331fe6283c12 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Flowchart/Scripts.meta b/Assets/Fungus/Flowchart/Scripts.meta deleted file mode 100644 index 2a6bae06..00000000 --- a/Assets/Fungus/Flowchart/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 791c611829c954bc8bacad62f4ed4b71 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Scripts/Components/Block.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Block.cs rename to Assets/Fungus/Scripts/Components/Block.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs.meta b/Assets/Fungus/Scripts/Components/Block.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Block.cs.meta rename to Assets/Fungus/Scripts/Components/Block.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Scripts/Components/Command.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Command.cs rename to Assets/Fungus/Scripts/Components/Command.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs.meta b/Assets/Fungus/Scripts/Components/Command.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Command.cs.meta rename to Assets/Fungus/Scripts/Components/Command.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs b/Assets/Fungus/Scripts/Components/CommandCopyBuffer.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs rename to Assets/Fungus/Scripts/Components/CommandCopyBuffer.cs diff --git a/Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs.meta b/Assets/Fungus/Scripts/Components/CommandCopyBuffer.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs.meta rename to Assets/Fungus/Scripts/Components/CommandCopyBuffer.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs b/Assets/Fungus/Scripts/Components/EventHandler.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandler.cs rename to Assets/Fungus/Scripts/Components/EventHandler.cs diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs.meta b/Assets/Fungus/Scripts/Components/EventHandler.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/EventHandler.cs.meta rename to Assets/Fungus/Scripts/Components/EventHandler.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Scripts/Components/Flowchart.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Flowchart.cs rename to Assets/Fungus/Scripts/Components/Flowchart.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs.meta b/Assets/Fungus/Scripts/Components/Flowchart.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Flowchart.cs.meta rename to Assets/Fungus/Scripts/Components/Flowchart.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/FungusState.cs b/Assets/Fungus/Scripts/Components/FungusState.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/FungusState.cs rename to Assets/Fungus/Scripts/Components/FungusState.cs diff --git a/Assets/Fungus/Flowchart/Scripts/FungusState.cs.meta b/Assets/Fungus/Scripts/Components/FungusState.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/FungusState.cs.meta rename to Assets/Fungus/Scripts/Components/FungusState.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Node.cs b/Assets/Fungus/Scripts/Components/Node.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Node.cs rename to Assets/Fungus/Scripts/Components/Node.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Node.cs.meta b/Assets/Fungus/Scripts/Components/Node.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Node.cs.meta rename to Assets/Fungus/Scripts/Components/Node.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs b/Assets/Fungus/Scripts/Components/SceneLoader.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/SceneLoader.cs rename to Assets/Fungus/Scripts/Components/SceneLoader.cs diff --git a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs.meta b/Assets/Fungus/Scripts/Components/SceneLoader.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/SceneLoader.cs.meta rename to Assets/Fungus/Scripts/Components/SceneLoader.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Variable.cs b/Assets/Fungus/Scripts/Components/Variable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Variable.cs rename to Assets/Fungus/Scripts/Components/Variable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/Variable.cs.meta b/Assets/Fungus/Scripts/Components/Variable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/Variable.cs.meta rename to Assets/Fungus/Scripts/Components/Variable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs b/Assets/Fungus/Scripts/Interfaces/IBlock.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IBlock.cs rename to Assets/Fungus/Scripts/Interfaces/IBlock.cs diff --git a/Assets/Fungus/Flowchart/Scripts/IBlock.cs.meta b/Assets/Fungus/Scripts/Interfaces/IBlock.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IBlock.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IBlock.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/ICommand.cs b/Assets/Fungus/Scripts/Interfaces/ICommand.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/ICommand.cs rename to Assets/Fungus/Scripts/Interfaces/ICommand.cs diff --git a/Assets/Fungus/Flowchart/Scripts/ICommand.cs.meta b/Assets/Fungus/Scripts/Interfaces/ICommand.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/ICommand.cs.meta rename to Assets/Fungus/Scripts/Interfaces/ICommand.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IEventHandler.cs rename to Assets/Fungus/Scripts/Interfaces/IEventHandler.cs diff --git a/Assets/Fungus/Flowchart/Scripts/IEventHandler.cs.meta b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IEventHandler.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IEventHandler.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs b/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IFlowchart.cs rename to Assets/Fungus/Scripts/Interfaces/IFlowchart.cs diff --git a/Assets/Fungus/Flowchart/Scripts/IFlowchart.cs.meta b/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IFlowchart.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IFlowchart.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs b/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IUpdateable.cs rename to Assets/Fungus/Scripts/Interfaces/IUpdateable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/IUpdateable.cs.meta b/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IUpdateable.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IUpdateable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/IVariable.cs b/Assets/Fungus/Scripts/Interfaces/IVariable.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IVariable.cs rename to Assets/Fungus/Scripts/Interfaces/IVariable.cs diff --git a/Assets/Fungus/Flowchart/Scripts/IVariable.cs.meta b/Assets/Fungus/Scripts/Interfaces/IVariable.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/IVariable.cs.meta rename to Assets/Fungus/Scripts/Interfaces/IVariable.cs.meta diff --git a/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs b/Assets/Fungus/Scripts/Utils/StringFormatter.cs similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/StringFormatter.cs rename to Assets/Fungus/Scripts/Utils/StringFormatter.cs diff --git a/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs.meta b/Assets/Fungus/Scripts/Utils/StringFormatter.cs.meta similarity index 100% rename from Assets/Fungus/Flowchart/Scripts/StringFormatter.cs.meta rename to Assets/Fungus/Scripts/Utils/StringFormatter.cs.meta From 5b66e9659c6b4548e372091fdf4c8a5db6f75551 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 16:07:48 +0100 Subject: [PATCH 23/32] Moved editor resources to the main resources folder --- .../{Scripts/Editor => }/Resources/GLLineDraw.mat | 0 .../Editor => }/Resources/GLLineDraw.mat.meta | 0 .../Editor => }/Resources/GLLineDraw.shader | 0 .../Editor => }/Resources/GLLineDraw.shader.meta | 0 .../{Scripts/Editor => }/Resources/Icons.meta | 0 .../Editor => }/Resources/Icons/ResizeHandle.png | Bin .../Resources/Icons/ResizeHandle.png.meta | 0 .../{Scripts/Editor => }/Resources/Icons/add.png | Bin .../Editor => }/Resources/Icons/add.png.meta | 0 .../Editor => }/Resources/Icons/add_small.png | Bin .../Editor => }/Resources/Icons/add_small.png.meta | 0 .../{Scripts/Editor => }/Resources/Icons/delete.png | Bin .../Editor => }/Resources/Icons/delete.png.meta | 0 .../{Scripts/Editor => }/Resources/Icons/down.png | Bin .../Editor => }/Resources/Icons/down.png.meta | 0 .../Editor => }/Resources/Icons/duplicate.png | Bin .../Editor => }/Resources/Icons/duplicate.png.meta | 0 .../{Scripts/Editor => }/Resources/Icons/left.png | Bin .../Editor => }/Resources/Icons/left.png.meta | 0 .../{Scripts/Editor => }/Resources/Icons/right.png | Bin .../Editor => }/Resources/Icons/right.png.meta | 0 .../{Scripts/Editor => }/Resources/Icons/up.png | Bin .../Editor => }/Resources/Icons/up.png.meta | 0 Assets/Fungus/Scripts/Editor/Resources.meta | 5 ----- 24 files changed, 5 deletions(-) rename Assets/Fungus/{Scripts/Editor => }/Resources/GLLineDraw.mat (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/GLLineDraw.mat.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/GLLineDraw.shader (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/GLLineDraw.shader.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/ResizeHandle.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/ResizeHandle.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/add.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/add.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/add_small.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/add_small.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/delete.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/delete.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/down.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/down.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/duplicate.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/duplicate.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/left.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/left.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/right.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/right.png.meta (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/up.png (100%) rename Assets/Fungus/{Scripts/Editor => }/Resources/Icons/up.png.meta (100%) delete mode 100644 Assets/Fungus/Scripts/Editor/Resources.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat b/Assets/Fungus/Resources/GLLineDraw.mat similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat rename to Assets/Fungus/Resources/GLLineDraw.mat diff --git a/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat.meta b/Assets/Fungus/Resources/GLLineDraw.mat.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.mat.meta rename to Assets/Fungus/Resources/GLLineDraw.mat.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader b/Assets/Fungus/Resources/GLLineDraw.shader similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader rename to Assets/Fungus/Resources/GLLineDraw.shader diff --git a/Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader.meta b/Assets/Fungus/Resources/GLLineDraw.shader.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/GLLineDraw.shader.meta rename to Assets/Fungus/Resources/GLLineDraw.shader.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons.meta b/Assets/Fungus/Resources/Icons.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons.meta rename to Assets/Fungus/Resources/Icons.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png b/Assets/Fungus/Resources/Icons/ResizeHandle.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png rename to Assets/Fungus/Resources/Icons/ResizeHandle.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png.meta b/Assets/Fungus/Resources/Icons/ResizeHandle.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/ResizeHandle.png.meta rename to Assets/Fungus/Resources/Icons/ResizeHandle.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/add.png b/Assets/Fungus/Resources/Icons/add.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/add.png rename to Assets/Fungus/Resources/Icons/add.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/add.png.meta b/Assets/Fungus/Resources/Icons/add.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/add.png.meta rename to Assets/Fungus/Resources/Icons/add.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png b/Assets/Fungus/Resources/Icons/add_small.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png rename to Assets/Fungus/Resources/Icons/add_small.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png.meta b/Assets/Fungus/Resources/Icons/add_small.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/add_small.png.meta rename to Assets/Fungus/Resources/Icons/add_small.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png b/Assets/Fungus/Resources/Icons/delete.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png rename to Assets/Fungus/Resources/Icons/delete.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png.meta b/Assets/Fungus/Resources/Icons/delete.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/delete.png.meta rename to Assets/Fungus/Resources/Icons/delete.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/down.png b/Assets/Fungus/Resources/Icons/down.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/down.png rename to Assets/Fungus/Resources/Icons/down.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/down.png.meta b/Assets/Fungus/Resources/Icons/down.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/down.png.meta rename to Assets/Fungus/Resources/Icons/down.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png b/Assets/Fungus/Resources/Icons/duplicate.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png rename to Assets/Fungus/Resources/Icons/duplicate.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png.meta b/Assets/Fungus/Resources/Icons/duplicate.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/duplicate.png.meta rename to Assets/Fungus/Resources/Icons/duplicate.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/left.png b/Assets/Fungus/Resources/Icons/left.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/left.png rename to Assets/Fungus/Resources/Icons/left.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/left.png.meta b/Assets/Fungus/Resources/Icons/left.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/left.png.meta rename to Assets/Fungus/Resources/Icons/left.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/right.png b/Assets/Fungus/Resources/Icons/right.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/right.png rename to Assets/Fungus/Resources/Icons/right.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/right.png.meta b/Assets/Fungus/Resources/Icons/right.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/right.png.meta rename to Assets/Fungus/Resources/Icons/right.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/up.png b/Assets/Fungus/Resources/Icons/up.png similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/up.png rename to Assets/Fungus/Resources/Icons/up.png diff --git a/Assets/Fungus/Scripts/Editor/Resources/Icons/up.png.meta b/Assets/Fungus/Resources/Icons/up.png.meta similarity index 100% rename from Assets/Fungus/Scripts/Editor/Resources/Icons/up.png.meta rename to Assets/Fungus/Resources/Icons/up.png.meta diff --git a/Assets/Fungus/Scripts/Editor/Resources.meta b/Assets/Fungus/Scripts/Editor/Resources.meta deleted file mode 100644 index a1990301..00000000 --- a/Assets/Fungus/Scripts/Editor/Resources.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 10357f1ebe4137642ab1716a03b5737c -folderAsset: yes -DefaultImporter: - userData: From 9f5c72669981f4d63048e043b93d4b4fd3945654 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 16:44:20 +0100 Subject: [PATCH 24/32] Grouped static members together --- Assets/Fungus/Scripts/Components/Flowchart.cs | 8 +- .../Fungus/Scripts/Components/Localization.cs | 14 +-- .../Fungus/Scripts/Components/MenuDialog.cs | 6 +- .../Scripts/Components/PortraitController.cs | 26 ++--- .../Scripts/Utils/ConversationManager.cs | 94 +++++++++---------- .../Scripts/VariableTypes/AnimatorVariable.cs | 12 +-- .../VariableTypes/AudioSourceVariable.cs | 10 +- 7 files changed, 85 insertions(+), 85 deletions(-) diff --git a/Assets/Fungus/Scripts/Components/Flowchart.cs b/Assets/Fungus/Scripts/Components/Flowchart.cs index 28bb1843..8328e213 100644 --- a/Assets/Fungus/Scripts/Components/Flowchart.cs +++ b/Assets/Fungus/Scripts/Components/Flowchart.cs @@ -92,6 +92,10 @@ namespace Fungus [Tooltip("The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.")] [SerializeField] protected string luaBindingName = "flowchart"; + protected static bool eventSystemPresent; + + protected StringSubstituter stringSubstituer; + /// /// Cached list of flowchart objects in the scene for fast lookup. /// @@ -110,10 +114,6 @@ namespace Fungus } } - protected static bool eventSystemPresent; - - protected StringSubstituter stringSubstituer; - #if UNITY_5_4_OR_NEWER protected virtual void Awake() { diff --git a/Assets/Fungus/Scripts/Components/Localization.cs b/Assets/Fungus/Scripts/Components/Localization.cs index 38f53bc3..5b776e43 100644 --- a/Assets/Fungus/Scripts/Components/Localization.cs +++ b/Assets/Fungus/Scripts/Components/Localization.cs @@ -17,13 +17,6 @@ namespace Fungus /// public class Localization : MonoBehaviour, ILocalization, ISubstitutionHandler { - [Tooltip("Language to use at startup, usually defined by a two letter language code (e.g DE = German)")] - [SerializeField] protected string activeLanguage = ""; - - protected static Dictionary localizedStrings = new Dictionary(); - - protected Dictionary localizeableObjects = new Dictionary(); - /// /// Temp storage for a single item of standard text and its localizations. /// @@ -34,13 +27,20 @@ namespace Fungus public Dictionary localizedStrings = new Dictionary(); } + [Tooltip("Language to use at startup, usually defined by a two letter language code (e.g DE = German)")] + [SerializeField] protected string activeLanguage = ""; + [Tooltip("CSV file containing localization data which can be easily edited in a spreadsheet tool")] [SerializeField] protected TextAsset localizationFile; + protected Dictionary localizeableObjects = new Dictionary(); + protected string notificationText = ""; protected bool initialized; + protected static Dictionary localizedStrings = new Dictionary(); + #if UNITY_5_4_OR_NEWER protected virtual void Awake() { diff --git a/Assets/Fungus/Scripts/Components/MenuDialog.cs b/Assets/Fungus/Scripts/Components/MenuDialog.cs index 841e9bc6..3a081fd0 100644 --- a/Assets/Fungus/Scripts/Components/MenuDialog.cs +++ b/Assets/Fungus/Scripts/Components/MenuDialog.cs @@ -12,9 +12,6 @@ namespace Fungus { public class MenuDialog : MonoBehaviour, IMenuDialog { - // Currently active Menu Dialog used to display Menu options - public static IMenuDialog activeMenuDialog; - [Tooltip("Automatically select the first interactable button when the menu is shown.")] [SerializeField] protected bool autoSelectFirstButton = false; @@ -22,6 +19,9 @@ namespace Fungus protected Slider cachedSlider; + // Currently active Menu Dialog used to display Menu options + public static IMenuDialog activeMenuDialog; + public static IMenuDialog GetMenuDialog() { if (activeMenuDialog == null) diff --git a/Assets/Fungus/Scripts/Components/PortraitController.cs b/Assets/Fungus/Scripts/Components/PortraitController.cs index e723ef03..c68c0a08 100644 --- a/Assets/Fungus/Scripts/Components/PortraitController.cs +++ b/Assets/Fungus/Scripts/Components/PortraitController.cs @@ -19,6 +19,19 @@ namespace Fungus protected Stage stage; + public static void SetRectTransform(RectTransform oldRectTransform, RectTransform newRectTransform) + { + oldRectTransform.eulerAngles = newRectTransform.eulerAngles; + oldRectTransform.position = newRectTransform.position; + oldRectTransform.rotation = newRectTransform.rotation; + oldRectTransform.anchoredPosition = newRectTransform.anchoredPosition; + oldRectTransform.sizeDelta = newRectTransform.sizeDelta; + oldRectTransform.anchorMax = newRectTransform.anchorMax; + oldRectTransform.anchorMin = newRectTransform.anchorMin; + oldRectTransform.pivot = newRectTransform.pivot; + oldRectTransform.localScale = newRectTransform.localScale; + } + protected virtual void Awake() { stage = GetComponentInParent(); @@ -207,19 +220,6 @@ namespace Fungus } } - public static void SetRectTransform(RectTransform oldRectTransform, RectTransform newRectTransform) - { - oldRectTransform.eulerAngles = newRectTransform.eulerAngles; - oldRectTransform.position = newRectTransform.position; - oldRectTransform.rotation = newRectTransform.rotation; - oldRectTransform.anchoredPosition = newRectTransform.anchoredPosition; - oldRectTransform.sizeDelta = newRectTransform.sizeDelta; - oldRectTransform.anchorMax = newRectTransform.anchorMax; - oldRectTransform.anchorMin = newRectTransform.anchorMin; - oldRectTransform.pivot = newRectTransform.pivot; - oldRectTransform.localScale = newRectTransform.localScale; - } - protected virtual void DoMoveTween(Character character, RectTransform fromPosition, RectTransform toPosition, float moveDuration, Boolean waitUntilFinished) { PortraitOptions options = new PortraitOptions(true); diff --git a/Assets/Fungus/Scripts/Utils/ConversationManager.cs b/Assets/Fungus/Scripts/Utils/ConversationManager.cs index f2b83cc4..42437fab 100644 --- a/Assets/Fungus/Scripts/Utils/ConversationManager.cs +++ b/Assets/Fungus/Scripts/Utils/ConversationManager.cs @@ -23,6 +23,53 @@ namespace Fungus protected bool exitSayWait; + /// + /// Splits the string passed in by the delimiters passed in. + /// Quoted sections are not split, and all tokens have whitespace + /// trimmed from the start and end. + protected static string[] Split(string stringToSplit) + { + var results = new List(); + + bool inQuote = false; + var currentToken = new StringBuilder(); + for (int index = 0; index < stringToSplit.Length; ++index) + { + char currentCharacter = stringToSplit[index]; + if (currentCharacter == '"') + { + // When we see a ", we need to decide whether we are + // at the start or send of a quoted section... + inQuote = !inQuote; + } + else if (char.IsWhiteSpace(currentCharacter) && !inQuote) + { + // We've come to the end of a token, so we find the token, + // trim it and add it to the collection of results... + string result = currentToken.ToString().Trim( new [] { ' ', '\n', '\t', '\"'} ); + if (result != "") results.Add(result); + + // We start a new token... + currentToken = new StringBuilder(); + } + else + { + // We've got a 'normal' character, so we add it to + // the curent token... + currentToken.Append(currentCharacter); + } + } + + // We've come to the end of the string, so we add the last token... + string lastResult = currentToken.ToString().Trim(); + if (lastResult != "") + { + results.Add(lastResult); + } + + return results.ToArray(); + } + protected ISayDialog GetSayDialog(Character character) { ISayDialog sayDialog = null; @@ -208,53 +255,6 @@ namespace Fungus return item; } - /// - /// Splits the string passed in by the delimiters passed in. - /// Quoted sections are not split, and all tokens have whitespace - /// trimmed from the start and end. - protected static string[] Split(string stringToSplit) - { - var results = new List(); - - bool inQuote = false; - var currentToken = new StringBuilder(); - for (int index = 0; index < stringToSplit.Length; ++index) - { - char currentCharacter = stringToSplit[index]; - if (currentCharacter == '"') - { - // When we see a ", we need to decide whether we are - // at the start or send of a quoted section... - inQuote = !inQuote; - } - else if (char.IsWhiteSpace(currentCharacter) && !inQuote) - { - // We've come to the end of a token, so we find the token, - // trim it and add it to the collection of results... - string result = currentToken.ToString().Trim( new [] { ' ', '\n', '\t', '\"'} ); - if (result != "") results.Add(result); - - // We start a new token... - currentToken = new StringBuilder(); - } - else - { - // We've got a 'normal' character, so we add it to - // the curent token... - currentToken.Append(currentCharacter); - } - } - - // We've come to the end of the string, so we add the last token... - string lastResult = currentToken.ToString().Trim(); - if (lastResult != "") - { - results.Add(lastResult); - } - - return results.ToArray(); - } - #region IConversationManager public void PopulateCharacterCache() diff --git a/Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs b/Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs index 4747a5ad..39a411e0 100644 --- a/Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs +++ b/Assets/Fungus/Scripts/VariableTypes/AnimatorVariable.cs @@ -27,17 +27,17 @@ namespace Fungus [SerializeField] public Animator animatorVal; - public AnimatorData(Animator v) - { - animatorVal = v; - animatorRef = null; - } - public static implicit operator Animator(AnimatorData animatorData) { return animatorData.Value; } + public AnimatorData(Animator v) + { + animatorVal = v; + animatorRef = null; + } + public Animator Value { get { return (animatorRef == null) ? animatorVal : animatorRef.Value; } diff --git a/Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs b/Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs index a3e4bb34..5727e4a4 100644 --- a/Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs +++ b/Assets/Fungus/Scripts/VariableTypes/AudioSourceVariable.cs @@ -27,16 +27,16 @@ namespace Fungus [SerializeField] public AudioSource audioSourceVal; + public static implicit operator AudioSource(AudioSourceData audioSourceData) + { + return audioSourceData.Value; + } + public AudioSourceData(AudioSource v) { audioSourceVal = v; audioSourceRef = null; } - - public static implicit operator AudioSource(AudioSourceData audioSourceData) - { - return audioSourceData.Value; - } public AudioSource Value { From ce2f2d2b36ce62d5524679e74ed25f9ba58823b7 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 16:46:50 +0100 Subject: [PATCH 25/32] Moved static members in SayDialog --- Assets/Fungus/Scripts/Components/SayDialog.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Fungus/Scripts/Components/SayDialog.cs b/Assets/Fungus/Scripts/Components/SayDialog.cs index a7d400e6..b8aa103d 100644 --- a/Assets/Fungus/Scripts/Components/SayDialog.cs +++ b/Assets/Fungus/Scripts/Components/SayDialog.cs @@ -13,12 +13,6 @@ namespace Fungus /// public class SayDialog : MonoBehaviour, ISayDialog { - // Currently active Say Dialog used to display Say text - public static ISayDialog activeSayDialog; - - // Most recent speaking character - public static ICharacter speakingCharacter; - [Tooltip("Duration to fade dialogue in/out")] [SerializeField] protected float fadeDuration = 0.25f; @@ -55,6 +49,12 @@ namespace Fungus protected Sprite currentCharacterImage; + // Currently active Say Dialog used to display Say text + public static ISayDialog activeSayDialog; + + // Most recent speaking character + public static ICharacter speakingCharacter; + public static ISayDialog GetSayDialog() { if (activeSayDialog == null) From 245500fd2531c97eae972d0515d546e16e1ed74f Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 16 Sep 2016 16:59:02 +0100 Subject: [PATCH 26/32] Moved global constants to FungusConstants static class. --- Assets/Fungus/Scripts/Components/Block.cs | 7 +----- Assets/Fungus/Scripts/Components/Flowchart.cs | 18 ++++----------- .../Scripts/Editor/CommandListAdaptor.cs | 2 +- .../Scripts/Editor/FlowchartMenuItems.cs | 2 +- .../Fungus/Scripts/Editor/FlowchartWindow.cs | 6 ++--- .../Fungus/Scripts/Utils/FungusConstants.cs | 23 +++++++++++++++++++ .../Scripts/Utils/FungusConstants.cs.meta | 12 ++++++++++ 7 files changed, 45 insertions(+), 25 deletions(-) create mode 100644 Assets/Fungus/Scripts/Utils/FungusConstants.cs create mode 100644 Assets/Fungus/Scripts/Utils/FungusConstants.cs.meta diff --git a/Assets/Fungus/Scripts/Components/Block.cs b/Assets/Fungus/Scripts/Components/Block.cs index 1c9711e9..2cb2835a 100644 --- a/Assets/Fungus/Scripts/Components/Block.cs +++ b/Assets/Fungus/Scripts/Components/Block.cs @@ -44,11 +44,6 @@ namespace Fungus protected int jumpToCommandIndex = -1; - /// - /// Duration of fade for executing icon displayed beside blocks & commands. - /// - public const float executingIconFadeTime = 0.5f; - protected int executionCount; protected bool executionInfoSet = false; @@ -224,7 +219,7 @@ namespace Fungus command.IsExecuting = true; // This icon timer is managed by the FlowchartWindow class, but we also need to // set it here in case a command starts and finishes execution before the next window update. - command.ExecutingIconTimer = Time.realtimeSinceStartup + executingIconFadeTime; + command.ExecutingIconTimer = Time.realtimeSinceStartup + FungusConstants.ExecutingIconFadeTime; command.Execute(); // Wait until the executing command sets another command to jump to via Command.Continue() diff --git a/Assets/Fungus/Scripts/Components/Flowchart.cs b/Assets/Fungus/Scripts/Components/Flowchart.cs index 8328e213..083b334b 100644 --- a/Assets/Fungus/Scripts/Components/Flowchart.cs +++ b/Assets/Fungus/Scripts/Components/Flowchart.cs @@ -19,16 +19,6 @@ namespace Fungus [ExecuteInEditMode] public class Flowchart : MonoBehaviour, IFlowchart, ISubstitutionHandler { - /// - /// The current version of the Flowchart. Used for updating components. - /// - public const int CURRENT_VERSION = 1; - - /// - /// The name of the initial block in a new flowchart. - /// - public const string DEFAULT_BLOCK_NAME = "New Block"; - [HideInInspector] [SerializeField] protected int version = 0; // Default to 0 to always trigger an update for older versions of Fungus. @@ -177,7 +167,7 @@ namespace Fungus protected virtual void UpdateVersion() { - if (version == CURRENT_VERSION) + if (version == FungusConstants.CurrentVersion) { // No need to update return; @@ -189,11 +179,11 @@ namespace Fungus IUpdateable u = component as IUpdateable; if (u != null) { - u.UpdateToVersion(version, CURRENT_VERSION); + u.UpdateToVersion(version, FungusConstants.CurrentVersion); } } - version = CURRENT_VERSION; + version = FungusConstants.CurrentVersion; } protected virtual void OnDisable() @@ -500,7 +490,7 @@ namespace Fungus // No empty keys allowed if (baseKey.Length == 0) { - baseKey = "New Block"; + baseKey = FungusConstants.DefaultBlockName; } var blocks = GetComponents(); diff --git a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs index a6d5be45..b3a0f33a 100644 --- a/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs +++ b/Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs @@ -416,7 +416,7 @@ namespace Fungus Color storeColor = GUI.color; - float alpha = (command.ExecutingIconTimer - Time.realtimeSinceStartup) / Block.executingIconFadeTime; + float alpha = (command.ExecutingIconTimer - Time.realtimeSinceStartup) / FungusConstants.ExecutingIconFadeTime; alpha = Mathf.Clamp01(alpha); GUI.color = new Color(1f, 1f, 1f, alpha); diff --git a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs index 26af4ccd..b71d8413 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartMenuItems.cs @@ -18,7 +18,7 @@ namespace Fungus var flowchart = go.GetComponent(); if (flowchart != null) { - flowchart.Version = Flowchart.CURRENT_VERSION; + flowchart.Version = FungusConstants.CurrentVersion; } // Only the first created Flowchart in the scene should have a default GameStarted block diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index 2b6669cd..13e88e1d 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -369,8 +369,8 @@ namespace Fungus { if (b.IsExecuting()) { - b.ExecutingIconTimer = Time.realtimeSinceStartup + Block.executingIconFadeTime; - b.ActiveCommand.ExecutingIconTimer = Time.realtimeSinceStartup + Block.executingIconFadeTime; + b.ExecutingIconTimer = Time.realtimeSinceStartup + FungusConstants.ExecutingIconFadeTime; + b.ActiveCommand.ExecutingIconTimer = Time.realtimeSinceStartup + FungusConstants.ExecutingIconFadeTime; forceRepaintCount = 6; } @@ -385,7 +385,7 @@ namespace Fungus if (!b.IsExecuting()) { - float alpha = (b.ExecutingIconTimer - Time.realtimeSinceStartup) / Block.executingIconFadeTime; + float alpha = (b.ExecutingIconTimer - Time.realtimeSinceStartup) / FungusConstants.ExecutingIconFadeTime; alpha = Mathf.Clamp01(alpha); GUI.color = new Color(1f, 1f, 1f, alpha); } diff --git a/Assets/Fungus/Scripts/Utils/FungusConstants.cs b/Assets/Fungus/Scripts/Utils/FungusConstants.cs new file mode 100644 index 00000000..d53dffb2 --- /dev/null +++ b/Assets/Fungus/Scripts/Utils/FungusConstants.cs @@ -0,0 +1,23 @@ +namespace Fungus +{ + /// + /// Global constants used in various parts of Fungus. + /// + public static class FungusConstants + { + /// + /// Duration of fade for executing icon displayed beside blocks & commands. + /// + public const float ExecutingIconFadeTime = 0.5f; + + /// + /// The current version of the Flowchart. Used for updating components. + /// + public const int CurrentVersion = 1; + + /// + /// The name of the initial block in a new flowchart. + /// + public const string DefaultBlockName = "New Block"; + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Utils/FungusConstants.cs.meta b/Assets/Fungus/Scripts/Utils/FungusConstants.cs.meta new file mode 100644 index 00000000..1771d92b --- /dev/null +++ b/Assets/Fungus/Scripts/Utils/FungusConstants.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f5c033627e6d6426ebdf267bb6b6a242 +timeCreated: 1474040740 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 4207ef5d55d231572124e773ea827ca4c9c8e79e Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 17 Sep 2016 11:02:24 +0100 Subject: [PATCH 27/32] Added missing copyright headers, tidied up enums --- Assets/Fungus/Scripts/Commands/Call.cs | 16 ++++++++-------- .../Fungus/Scripts/Components/SelectOnEnable.cs | 5 ++++- Assets/Fungus/Scripts/Components/Variable.cs | 9 --------- Assets/Fungus/Scripts/Components/WriterAudio.cs | 12 ++++++------ Assets/Fungus/Scripts/Interfaces/IBlock.cs | 4 +++- .../Scripts/Interfaces/ICameraController.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/ICharacter.cs | 6 ++++-- Assets/Fungus/Scripts/Interfaces/IClickable2D.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/ICommand.cs | 5 ++++- .../Scripts/Interfaces/IConversationManager.cs | 4 +++- Assets/Fungus/Scripts/Interfaces/ICustomTag.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IDialogInput.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs | 4 ++-- .../Fungus/Scripts/Interfaces/IEventHandler.cs | 3 ++- Assets/Fungus/Scripts/Interfaces/IFlowchart.cs | 6 ++++-- .../Fungus/Scripts/Interfaces/ILocalization.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs | 5 ++++- .../Scripts/Interfaces/IMusicController.cs | 5 ++++- .../Scripts/Interfaces/IPortraitController.cs | 4 +++- Assets/Fungus/Scripts/Interfaces/ISayDialog.cs | 5 ++++- Assets/Fungus/Scripts/Interfaces/IStage.cs | 5 ++++- .../Fungus/Scripts/Interfaces/ITextTagParser.cs | 5 +++-- Assets/Fungus/Scripts/Interfaces/IUpdateable.cs | 4 ++-- Assets/Fungus/Scripts/Interfaces/IVariable.cs | 12 +++++++++++- Assets/Fungus/Scripts/Interfaces/IView.cs | 6 ++++-- Assets/Fungus/Scripts/Interfaces/IWriter.cs | 5 ++++- .../Fungus/Scripts/Utils/ConversationManager.cs | 5 ++++- Assets/Fungus/Scripts/Utils/FungusConstants.cs | 5 ++++- Assets/Fungus/Scripts/Utils/PortraitUtils.cs | 5 ++++- Assets/Fungus/Scripts/Utils/TextTagToken.cs | 5 ++++- 30 files changed, 119 insertions(+), 56 deletions(-) diff --git a/Assets/Fungus/Scripts/Commands/Call.cs b/Assets/Fungus/Scripts/Commands/Call.cs index 3780a5c8..0464e5ec 100644 --- a/Assets/Fungus/Scripts/Commands/Call.cs +++ b/Assets/Fungus/Scripts/Commands/Call.cs @@ -16,7 +16,14 @@ namespace Fungus "Execute another block in the same Flowchart as the command, or in a different Flowchart.")] [AddComponentMenu("")] public class Call : Command - { + { + public enum CallMode + { + Stop, // Stop executing the current block after calling + Continue, // Continue executing the current block after calling + WaitUntilFinished // Wait until the called block finishes executing, then continue executing current block + } + [Tooltip("Flowchart which contains the block to execute. If none is specified then the current Flowchart is used.")] [SerializeField] protected Flowchart targetFlowchart; @@ -28,13 +35,6 @@ namespace Fungus [FormerlySerializedAs("commandIndex")] [SerializeField] protected int startIndex; - public enum CallMode - { - Stop, // Stop executing the current block after calling - Continue, // Continue executing the current block after calling - WaitUntilFinished // Wait until the called block finishes executing, then continue executing current block - } - [Tooltip("Select if the calling block should stop or continue executing commands, or wait until the called block finishes.")] [SerializeField] protected CallMode callMode; diff --git a/Assets/Fungus/Scripts/Components/SelectOnEnable.cs b/Assets/Fungus/Scripts/Components/SelectOnEnable.cs index 8b61c4a1..c7a0095b 100644 --- a/Assets/Fungus/Scripts/Components/SelectOnEnable.cs +++ b/Assets/Fungus/Scripts/Components/SelectOnEnable.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using UnityEngine.UI; namespace Fungus diff --git a/Assets/Fungus/Scripts/Components/Variable.cs b/Assets/Fungus/Scripts/Components/Variable.cs index 4e7c28d5..6f8969d1 100644 --- a/Assets/Fungus/Scripts/Components/Variable.cs +++ b/Assets/Fungus/Scripts/Components/Variable.cs @@ -6,15 +6,6 @@ using System; namespace Fungus { - /// - /// Scope types for Variables. - /// - public enum VariableScope - { - Private, - Public - } - /// /// Attribute class for variables. /// diff --git a/Assets/Fungus/Scripts/Components/WriterAudio.cs b/Assets/Fungus/Scripts/Components/WriterAudio.cs index 9290b59b..e8242954 100644 --- a/Assets/Fungus/Scripts/Components/WriterAudio.cs +++ b/Assets/Fungus/Scripts/Components/WriterAudio.cs @@ -11,6 +11,12 @@ namespace Fungus /// public class WriterAudio : MonoBehaviour, IWriterListener { + public enum AudioMode + { + Beeps, // Use short beep sound effects + SoundEffect, // Use long looping sound effect + } + [Tooltip("Volume level of writing sound effects")] [Range(0,1)] [SerializeField] protected float volume = 1f; @@ -22,12 +28,6 @@ namespace Fungus [Tooltip("AudioSource to use for playing sound effects. If none is selected then one will be created.")] [SerializeField] protected AudioSource targetAudioSource; - public enum AudioMode - { - Beeps, // Use short beep sound effects - SoundEffect, // Use long looping sound effect - } - [Tooltip("Type of sound effect to play when writing text")] [SerializeField] protected AudioMode audioMode = AudioMode.Beeps; diff --git a/Assets/Fungus/Scripts/Interfaces/IBlock.cs b/Assets/Fungus/Scripts/Interfaces/IBlock.cs index a23e1a34..ad6f5c6a 100644 --- a/Assets/Fungus/Scripts/Interfaces/IBlock.cs +++ b/Assets/Fungus/Scripts/Interfaces/IBlock.cs @@ -1,4 +1,6 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using System.Collections; using System.Collections.Generic; diff --git a/Assets/Fungus/Scripts/Interfaces/ICameraController.cs b/Assets/Fungus/Scripts/Interfaces/ICameraController.cs index 636c5da9..977d20da 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICameraController.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICameraController.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/ICharacter.cs b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs index e721e215..fda47b83 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICharacter.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICharacter.cs @@ -1,5 +1,7 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs b/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs index 8d0e23df..d43d67c1 100644 --- a/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs +++ b/Assets/Fungus/Scripts/Interfaces/IClickable2D.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Detects mouse clicks and touches on a Game Object, and sends an event to all Flowchart event handlers in the scene. diff --git a/Assets/Fungus/Scripts/Interfaces/ICommand.cs b/Assets/Fungus/Scripts/Interfaces/ICommand.cs index 600e7071..796450b2 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICommand.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICommand.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs b/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs index 00d1495c..594748bc 100644 --- a/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs +++ b/Assets/Fungus/Scripts/Interfaces/IConversationManager.cs @@ -1,4 +1,6 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using System.Collections; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs b/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs index d0f38781..778791cf 100644 --- a/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs +++ b/Assets/Fungus/Scripts/Interfaces/ICustomTag.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Create custom tags for use in Say text. diff --git a/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs b/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs index d8676de9..aa4d5a85 100644 --- a/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs +++ b/Assets/Fungus/Scripts/Interfaces/IDialogInput.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Input handler for say dialogues. diff --git a/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs b/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs index d01d6cb6..9070cd03 100644 --- a/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs +++ b/Assets/Fungus/Scripts/Interfaces/IDraggable2D.cs @@ -1,5 +1,5 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs index 649340a5..4baa1669 100644 --- a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs +++ b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs @@ -1,4 +1,5 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs b/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs index 7bb76d01..5116cd34 100644 --- a/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs +++ b/Assets/Fungus/Scripts/Interfaces/IFlowchart.cs @@ -1,5 +1,7 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/ILocalization.cs b/Assets/Fungus/Scripts/Interfaces/ILocalization.cs index 0c03c30a..bbc5cd71 100644 --- a/Assets/Fungus/Scripts/Interfaces/ILocalization.cs +++ b/Assets/Fungus/Scripts/Interfaces/ILocalization.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs index ae3a445c..9d000f89 100644 --- a/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/IMenuDialog.cs @@ -1,4 +1,7 @@ -using UnityEngine.UI; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine.UI; using MoonSharp.Interpreter; using System.Collections; diff --git a/Assets/Fungus/Scripts/Interfaces/IMusicController.cs b/Assets/Fungus/Scripts/Interfaces/IMusicController.cs index 2ee37d7d..92735861 100644 --- a/Assets/Fungus/Scripts/Interfaces/IMusicController.cs +++ b/Assets/Fungus/Scripts/Interfaces/IMusicController.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs b/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs index 966ef404..512fab1c 100644 --- a/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs +++ b/Assets/Fungus/Scripts/Interfaces/IPortraitController.cs @@ -1,4 +1,6 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using MoonSharp.Interpreter; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs index c37aecb7..a6882b36 100644 --- a/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs +++ b/Assets/Fungus/Scripts/Interfaces/ISayDialog.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IStage.cs b/Assets/Fungus/Scripts/Interfaces/IStage.cs index e9e689b8..cb554b1c 100644 --- a/Assets/Fungus/Scripts/Interfaces/IStage.cs +++ b/Assets/Fungus/Scripts/Interfaces/IStage.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using UnityEngine.UI; using System.Collections.Generic; diff --git a/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs b/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs index 8df9dc67..8337b300 100644 --- a/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs +++ b/Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs @@ -1,5 +1,6 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + using System.Collections.Generic; namespace Fungus diff --git a/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs b/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs index 2f736011..6f9e9188 100644 --- a/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs +++ b/Assets/Fungus/Scripts/Interfaces/IUpdateable.cs @@ -1,5 +1,5 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IVariable.cs b/Assets/Fungus/Scripts/Interfaces/IVariable.cs index 72da5ff6..86dec752 100644 --- a/Assets/Fungus/Scripts/Interfaces/IVariable.cs +++ b/Assets/Fungus/Scripts/Interfaces/IVariable.cs @@ -1,7 +1,17 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { + /// + /// Scope types for Variables. + /// + public enum VariableScope + { + Private, + Public + } + /// /// A Fungus variable that can be used with Commands. /// diff --git a/Assets/Fungus/Scripts/Interfaces/IView.cs b/Assets/Fungus/Scripts/Interfaces/IView.cs index 2992af36..a1e55e97 100644 --- a/Assets/Fungus/Scripts/Interfaces/IView.cs +++ b/Assets/Fungus/Scripts/Interfaces/IView.cs @@ -1,5 +1,7 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; namespace Fungus { diff --git a/Assets/Fungus/Scripts/Interfaces/IWriter.cs b/Assets/Fungus/Scripts/Interfaces/IWriter.cs index 77b283c9..c74ab264 100644 --- a/Assets/Fungus/Scripts/Interfaces/IWriter.cs +++ b/Assets/Fungus/Scripts/Interfaces/IWriter.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections; namespace Fungus diff --git a/Assets/Fungus/Scripts/Utils/ConversationManager.cs b/Assets/Fungus/Scripts/Utils/ConversationManager.cs index 42437fab..d5fb1477 100644 --- a/Assets/Fungus/Scripts/Utils/ConversationManager.cs +++ b/Assets/Fungus/Scripts/Utils/ConversationManager.cs @@ -1,4 +1,7 @@ -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using UnityEngine; diff --git a/Assets/Fungus/Scripts/Utils/FungusConstants.cs b/Assets/Fungus/Scripts/Utils/FungusConstants.cs index d53dffb2..e4bd43b6 100644 --- a/Assets/Fungus/Scripts/Utils/FungusConstants.cs +++ b/Assets/Fungus/Scripts/Utils/FungusConstants.cs @@ -1,4 +1,7 @@ -namespace Fungus +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +namespace Fungus { /// /// Global constants used in various parts of Fungus. diff --git a/Assets/Fungus/Scripts/Utils/PortraitUtils.cs b/Assets/Fungus/Scripts/Utils/PortraitUtils.cs index bea15496..54d5f1b8 100644 --- a/Assets/Fungus/Scripts/Utils/PortraitUtils.cs +++ b/Assets/Fungus/Scripts/Utils/PortraitUtils.cs @@ -1,4 +1,7 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using UnityEngine.UI; using MoonSharp.Interpreter; diff --git a/Assets/Fungus/Scripts/Utils/TextTagToken.cs b/Assets/Fungus/Scripts/Utils/TextTagToken.cs index 2d4b703c..06f93144 100644 --- a/Assets/Fungus/Scripts/Utils/TextTagToken.cs +++ b/Assets/Fungus/Scripts/Utils/TextTagToken.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using System.Collections.Generic; namespace Fungus { From 69d9d2e3c38c53616b2606eb651fe4336980b071 Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 19 Sep 2016 14:55:35 +0100 Subject: [PATCH 28/32] Reorganised FungusLua scripts to match main Fungus project --- .../FungusLua/Scripts/Components.meta | 9 +++++ .../{ => Components}/ExecuteHandler.cs | 32 +-------------- .../{ => Components}/ExecuteHandler.cs.meta | 0 .../Scripts/{ => Components}/InfoText.cs | 0 .../Scripts/{ => Components}/InfoText.cs.meta | 0 .../Scripts/{ => Components}/LuaBindings.cs | 0 .../{ => Components}/LuaBindings.cs.meta | 0 .../{ => Components}/LuaEnvironment.cs | 0 .../{ => Components}/LuaEnvironment.cs.meta | 0 .../Scripts/{ => Components}/LuaScript.cs | 0 .../{ => Components}/LuaScript.cs.meta | 0 .../Scripts/{ => Components}/LuaStore.cs | 0 .../Scripts/{ => Components}/LuaStore.cs.meta | 0 .../Scripts/{ => Components}/LuaUtils.cs | 0 .../Scripts/{ => Components}/LuaUtils.cs.meta | 0 .../Scripts/Editor/ExecuteHandlerEditor.cs | 10 ++--- .../Scripts/Interfaces/IExecuteHandler.cs | 39 +++++++++++++++++++ .../Interfaces/IExecuteHandler.cs.meta | 12 ++++++ .../{ => Interfaces}/IStringSubstituter.cs | 0 .../IStringSubstituter.cs.meta | 0 .../Thirdparty/FungusLua/Scripts/Utils.meta | 9 +++++ .../Scripts/{ => Utils}/FungusPrefs.cs | 0 .../Scripts/{ => Utils}/FungusPrefs.cs.meta | 0 .../Scripts/{ => Utils}/PODTypeFactory.cs | 0 .../{ => Utils}/PODTypeFactory.cs.meta | 0 .../Scripts/{ => Utils}/StringSubstituter.cs | 0 .../{ => Utils}/StringSubstituter.cs.meta | 0 27 files changed, 75 insertions(+), 36 deletions(-) create mode 100644 Assets/Fungus/Thirdparty/FungusLua/Scripts/Components.meta rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/ExecuteHandler.cs (88%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/ExecuteHandler.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/InfoText.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/InfoText.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaBindings.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaBindings.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaEnvironment.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaEnvironment.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaScript.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaScript.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaStore.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaStore.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaUtils.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Components}/LuaUtils.cs.meta (100%) create mode 100644 Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs create mode 100644 Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs.meta rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Interfaces}/IStringSubstituter.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Interfaces}/IStringSubstituter.cs.meta (100%) create mode 100644 Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils.meta rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Utils}/FungusPrefs.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Utils}/FungusPrefs.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Utils}/PODTypeFactory.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Utils}/PODTypeFactory.cs.meta (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Utils}/StringSubstituter.cs (100%) rename Assets/Fungus/Thirdparty/FungusLua/Scripts/{ => Utils}/StringSubstituter.cs.meta (100%) diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components.meta new file mode 100644 index 00000000..a607faba --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 32aa86341f1dc41fa834e5e2e82d4ee6 +folderAsset: yes +timeCreated: 1474292879 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs similarity index 88% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs index 545f4b6a..db0c03e1 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs @@ -15,38 +15,8 @@ namespace Fungus /// /// Executes an LuaScript component in the same gameobject when a condition occurs. /// - public class ExecuteHandler : MonoBehaviour, IExecuteHandlerConfigurator + public class ExecuteHandler : MonoBehaviour, IExecuteHandler, IExecuteHandlerConfigurator { - [Flags] - public enum ExecuteMethod - { - AfterPeriodOfTime = 1 << 0, - Start = 1 << 1, - Update = 1 << 2, - FixedUpdate = 1 << 3, - LateUpdate = 1 << 4, - OnDestroy = 1 << 5, - OnEnable = 1 << 6, - OnDisable = 1 << 7, - OnControllerColliderHit = 1 << 8, - OnParticleCollision = 1 << 9, - OnJointBreak = 1 << 10, - OnBecameInvisible = 1 << 11, - OnBecameVisible = 1 << 12, - OnTriggerEnter = 1 << 13, - OnTriggerExit = 1 << 14, - OnTriggerStay = 1 << 15, - OnCollisionEnter = 1 << 16, - OnCollisionExit = 1 << 17, - OnCollisionStay = 1 << 18, - OnTriggerEnter2D = 1 << 19, - OnTriggerExit2D = 1 << 20, - OnTriggerStay2D = 1 << 21, - OnCollisionEnter2D = 1 << 22, - OnCollisionExit2D = 1 << 23, - OnCollisionStay2D = 1 << 24, - } - [SerializeField] protected float executeAfterTime = 1f; public virtual float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } } diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/InfoText.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs index 0b04044d..27ad3ba5 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs @@ -37,17 +37,17 @@ namespace Fungus var executeHandler = (ExecuteHandler)target; EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(new GUIContent("On Event")); - executeHandler.ExecuteMethods = (ExecuteHandler.ExecuteMethod)EditorGUILayout.EnumMaskField(executeHandler.ExecuteMethods, - EditorStyles.popup, - GUILayout.ExpandWidth(false)); + executeHandler.ExecuteMethods = (ExecuteMethod)EditorGUILayout.EnumMaskField(executeHandler.ExecuteMethods, + EditorStyles.popup, + GUILayout.ExpandWidth(false)); EditorGUILayout.EndHorizontal(); - if (executeHandler.IsExecuteMethodSelected(ExecuteHandler.ExecuteMethod.AfterPeriodOfTime)) + if (executeHandler.IsExecuteMethodSelected(ExecuteMethod.AfterPeriodOfTime)) { DrawOptionsForAfterPeriodOfTime(executeHandler); } - if (executeHandler.IsExecuteMethodSelected(ExecuteHandler.ExecuteMethod.Update)) + if (executeHandler.IsExecuteMethodSelected(ExecuteMethod.Update)) { DrawOptionsForOnUpdate(executeHandler); } diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs new file mode 100644 index 00000000..3af36203 --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs @@ -0,0 +1,39 @@ +using System; + +namespace Fungus +{ + [Flags] + public enum ExecuteMethod + { + AfterPeriodOfTime = 1 << 0, + Start = 1 << 1, + Update = 1 << 2, + FixedUpdate = 1 << 3, + LateUpdate = 1 << 4, + OnDestroy = 1 << 5, + OnEnable = 1 << 6, + OnDisable = 1 << 7, + OnControllerColliderHit = 1 << 8, + OnParticleCollision = 1 << 9, + OnJointBreak = 1 << 10, + OnBecameInvisible = 1 << 11, + OnBecameVisible = 1 << 12, + OnTriggerEnter = 1 << 13, + OnTriggerExit = 1 << 14, + OnTriggerStay = 1 << 15, + OnCollisionEnter = 1 << 16, + OnCollisionExit = 1 << 17, + OnCollisionStay = 1 << 18, + OnTriggerEnter2D = 1 << 19, + OnTriggerExit2D = 1 << 20, + OnTriggerStay2D = 1 << 21, + OnCollisionEnter2D = 1 << 22, + OnCollisionExit2D = 1 << 23, + OnCollisionStay2D = 1 << 24, + } + + public interface IExecuteHandler + { + + } +} \ No newline at end of file diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs.meta new file mode 100644 index 00000000..5f5b1391 --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 44e1eeb74f6a64c64af0891af83e1db1 +timeCreated: 1474293118 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/IStringSubstituter.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils.meta new file mode 100644 index 00000000..7302e59a --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3305df777ff8d4b8ebdd1d764bb49da3 +folderAsset: yes +timeCreated: 1474292903 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/FungusPrefs.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/PODTypeFactory.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs.meta similarity index 100% rename from Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs.meta rename to Assets/Fungus/Thirdparty/FungusLua/Scripts/Utils/StringSubstituter.cs.meta From 1118be781d2738d81bd0b8ed958a3e85b08d6f3d Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 19 Sep 2016 15:19:22 +0100 Subject: [PATCH 29/32] Refactored ExecuteHandler to use IExecuteHandler interface --- .../Scripts/Components/ExecuteHandler.cs | 146 ++++++++---------- .../Scripts/Interfaces/IExecuteHandler.cs | 59 ++++++- 2 files changed, 123 insertions(+), 82 deletions(-) diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs index db0c03e1..bf4f8a2e 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/ExecuteHandler.cs @@ -18,33 +18,26 @@ namespace Fungus public class ExecuteHandler : MonoBehaviour, IExecuteHandler, IExecuteHandlerConfigurator { [SerializeField] protected float executeAfterTime = 1f; - public virtual float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } } [SerializeField] protected bool repeatExecuteTime = true; - public virtual bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } } [SerializeField] protected float repeatEveryTime = 1f; - public virtual float RepeatEveryTime { get { return repeatEveryTime; } set { repeatEveryTime = value; } } [SerializeField] protected int executeAfterFrames = 1; - public virtual int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } } [SerializeField] protected bool repeatExecuteFrame = true; - public virtual bool RepeatExecuteFrame { get { return repeatExecuteFrame; } set { repeatExecuteFrame = value; } } [SerializeField] protected int repeatEveryFrame = 1; - public virtual int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } } [SerializeField] protected ExecuteMethod executeMethods = ExecuteMethod.Start; - public virtual ExecuteMethod ExecuteMethods { get { return executeMethods; } set { executeMethods = value; } } [Tooltip("Name of the method on a component in this gameobject to call when executing.")] [SerializeField] protected string executeMethodName = "OnExecute"; - private int m_ExecuteOnFrame; + protected int m_ExecuteOnFrame; // Recursively build the full hierarchy path to this game object - private static string GetPath(Transform current) + protected static string GetPath(Transform current) { if (current.parent == null) { @@ -53,7 +46,7 @@ namespace Fungus return GetPath(current.parent) + "." + current.name; } - public void Start() + protected void Start() { Execute(ExecuteMethod.Start); @@ -67,7 +60,7 @@ namespace Fungus } } - public IEnumerator ExecutePeriodically() + protected IEnumerator ExecutePeriodically() { yield return new WaitForSeconds(executeAfterTime); Execute(ExecuteMethod.AfterPeriodOfTime); @@ -78,7 +71,7 @@ namespace Fungus } } - public bool ShouldExecuteOnFrame() + protected bool ShouldExecuteOnFrame() { if (Time.frameCount > m_ExecuteOnFrame) { @@ -91,22 +84,22 @@ namespace Fungus return false; } - public void OnDisable() + protected void OnDisable() { Execute(ExecuteMethod.OnDisable); } - public void OnEnable() + protected void OnEnable() { Execute(ExecuteMethod.OnEnable); } - public void OnDestroy() + protected void OnDestroy() { Execute(ExecuteMethod.OnDestroy); } - public void Update() + protected void Update() { if (IsExecuteMethodSelected(ExecuteMethod.Update) && ShouldExecuteOnFrame()) { @@ -114,102 +107,102 @@ namespace Fungus } } - public void FixedUpdate() + protected void FixedUpdate() { Execute(ExecuteMethod.FixedUpdate); } - public void LateUpdate() + protected void LateUpdate() { Execute(ExecuteMethod.LateUpdate); } - public void OnControllerColliderHit() + protected void OnControllerColliderHit() { Execute(ExecuteMethod.OnControllerColliderHit); } - public void OnParticleCollision() + protected void OnParticleCollision() { Execute(ExecuteMethod.OnParticleCollision); } - public void OnJointBreak() + protected void OnJointBreak() { Execute(ExecuteMethod.OnJointBreak); } - public void OnBecameInvisible() + protected void OnBecameInvisible() { Execute(ExecuteMethod.OnBecameInvisible); } - public void OnBecameVisible() + protected void OnBecameVisible() { Execute(ExecuteMethod.OnBecameVisible); } - public void OnTriggerEnter() + protected void OnTriggerEnter() { Execute(ExecuteMethod.OnTriggerEnter); } - public void OnTriggerExit() + protected void OnTriggerExit() { Execute(ExecuteMethod.OnTriggerExit); } - public void OnTriggerStay() + protected void OnTriggerStay() { Execute(ExecuteMethod.OnTriggerStay); } - public void OnCollisionEnter() + protected void OnCollisionEnter() { Execute(ExecuteMethod.OnCollisionEnter); } - public void OnCollisionExit() + protected void OnCollisionExit() { Execute(ExecuteMethod.OnCollisionExit); } - public void OnCollisionStay() + protected void OnCollisionStay() { Execute(ExecuteMethod.OnCollisionStay); } - public void OnTriggerEnter2D() + protected void OnTriggerEnter2D() { Execute(ExecuteMethod.OnTriggerEnter2D); } - public void OnTriggerExit2D() + protected void OnTriggerExit2D() { Execute(ExecuteMethod.OnTriggerExit2D); } - public void OnTriggerStay2D() + protected void OnTriggerStay2D() { Execute(ExecuteMethod.OnTriggerStay2D); } - public void OnCollisionEnter2D() + protected void OnCollisionEnter2D() { Execute(ExecuteMethod.OnCollisionEnter2D); } - public void OnCollisionExit2D() + protected void OnCollisionExit2D() { Execute(ExecuteMethod.OnCollisionExit2D); } - public void OnCollisionStay2D() + protected void OnCollisionStay2D() { Execute(ExecuteMethod.OnCollisionStay2D); } - private void Execute(ExecuteMethod executeMethod) + protected void Execute(ExecuteMethod executeMethod) { if (IsExecuteMethodSelected(executeMethod)) { @@ -217,15 +210,45 @@ namespace Fungus } } - public bool IsExecuteMethodSelected(ExecuteMethod method) + #region AssertionComponentConfigurator + + public int UpdateExecuteStartOnFrame { set { executeAfterFrames = value; } } + + public int UpdateExecuteRepeatFrequency { set { repeatEveryFrame = value; } } + + public bool UpdateExecuteRepeat { set { repeatExecuteFrame = value; } } + + public float TimeExecuteStartAfter { set { executeAfterTime = value; } } + + public float TimeExecuteRepeatFrequency { set { repeatEveryTime = value; } } + + public bool TimeExecuteRepeat { set { repeatExecuteTime = value; } } + + public ExecuteHandler Component { get { return this; } } + + #endregion + + #region IExecuteHandler implementation + + public virtual float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } } + + public virtual bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } } + + public virtual float RepeatEveryTime { get { return repeatEveryTime; } set { repeatEveryTime = value; } } + + public virtual int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } } + + public virtual bool RepeatExecuteFrame { get { return repeatExecuteFrame; } set { repeatExecuteFrame = value; } } + + public virtual int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } } + + public virtual ExecuteMethod ExecuteMethods { get { return executeMethods; } set { executeMethods = value; } } + + public virtual bool IsExecuteMethodSelected(ExecuteMethod method) { return method == (executeMethods & method); } - /// - /// Execute the Lua script immediately. - /// This is the function to call if you want to trigger execution from an external script. - /// public virtual void Execute() { // Call any OnExecute methods in components on this gameobject @@ -234,46 +257,7 @@ namespace Fungus SendMessage(executeMethodName, SendMessageOptions.DontRequireReceiver); } } - - #region AssertionComponentConfigurator - public int UpdateExecuteStartOnFrame { set { executeAfterFrames = value; } } - public int UpdateExecuteRepeatFrequency { set { repeatEveryFrame = value; } } - public bool UpdateExecuteRepeat { set { repeatExecuteFrame = value; } } - public float TimeExecuteStartAfter { set { executeAfterTime = value; } } - public float TimeExecuteRepeatFrequency { set { repeatEveryTime = value; } } - public bool TimeExecuteRepeat { set { repeatExecuteTime = value; } } - public ExecuteHandler Component { get { return this; } } - #endregion - } - public interface IExecuteHandlerConfigurator - { - /// - /// If the assertion is evaluated in Update, after how many frame should the evaluation start. Defult is 1 (first frame) - /// - int UpdateExecuteStartOnFrame { set; } - /// - /// If the assertion is evaluated in Update and UpdateExecuteRepeat is true, how many frame should pass between evaluations - /// - int UpdateExecuteRepeatFrequency { set; } - /// - /// If the assertion is evaluated in Update, should the evaluation be repeated after UpdateExecuteRepeatFrequency frames - /// - bool UpdateExecuteRepeat { set; } - - /// - /// If the assertion is evaluated after a period of time, after how many seconds the first evaluation should be done - /// - float TimeExecuteStartAfter { set; } - /// - /// If the assertion is evaluated after a period of time and TimeExecuteRepeat is true, after how many seconds should the next evaluation happen - /// - float TimeExecuteRepeatFrequency { set; } - /// - /// If the assertion is evaluated after a period, should the evaluation happen again after TimeExecuteRepeatFrequency seconds - /// - bool TimeExecuteRepeat { set; } - - ExecuteHandler Component { get; } + #endregion } } diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs index 3af36203..146026f5 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs @@ -32,8 +32,65 @@ namespace Fungus OnCollisionStay2D = 1 << 24, } + /// + /// Executes an LuaScript component in the same gameobject when a condition occurs. + /// public interface IExecuteHandler { - + float ExecuteAfterTime { get; set; } + + bool RepeatExecuteTime { get; set; } + + float RepeatEveryTime { get; set; } + + int ExecuteAfterFrames { get; set; } + + bool RepeatExecuteFrame { get; set; } + + int RepeatEveryFrame { get; set; } + + ExecuteMethod ExecuteMethods { get; set; } + + /// + /// Returns true if the specified execute method option has been enabled. + /// + bool IsExecuteMethodSelected(ExecuteMethod method); + + /// + /// Execute the Lua script immediately. + /// This is the function to call if you want to trigger execution from an external script. + /// + void Execute(); + } + + public interface IExecuteHandlerConfigurator + { + /// + /// If the assertion is evaluated in Update, after how many frame should the evaluation start. Defult is 1 (first frame) + /// + int UpdateExecuteStartOnFrame { set; } + /// + /// If the assertion is evaluated in Update and UpdateExecuteRepeat is true, how many frame should pass between evaluations + /// + int UpdateExecuteRepeatFrequency { set; } + /// + /// If the assertion is evaluated in Update, should the evaluation be repeated after UpdateExecuteRepeatFrequency frames + /// + bool UpdateExecuteRepeat { set; } + + /// + /// If the assertion is evaluated after a period of time, after how many seconds the first evaluation should be done + /// + float TimeExecuteStartAfter { set; } + /// + /// If the assertion is evaluated after a period of time and TimeExecuteRepeat is true, after how many seconds should the next evaluation happen + /// + float TimeExecuteRepeatFrequency { set; } + /// + /// If the assertion is evaluated after a period, should the evaluation happen again after TimeExecuteRepeatFrequency seconds + /// + bool TimeExecuteRepeat { set; } + + ExecuteHandler Component { get; } } } \ No newline at end of file From 066bb719a9144c32a81767b6dc921801aa17955f Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 19 Sep 2016 15:40:51 +0100 Subject: [PATCH 30/32] Refactored FungusLua classes to match layout in main Fungus project. --- .../Scripts/Components/LuaBindings.cs | 36 +++++-------------- .../Scripts/Components/LuaEnvironment.cs | 22 ++---------- .../Components/LuaEnvironmentInitializer.cs | 23 ++++++++++++ .../LuaEnvironmentInitializer.cs.meta | 12 +++++++ .../FungusLua/Scripts/Components/LuaScript.cs | 3 -- .../FungusLua/Scripts/Components/LuaStore.cs | 3 ++ .../FungusLua/Scripts/Components/LuaUtils.cs | 24 +++---------- .../Scripts/Editor/LuaBindingsEditor.cs | 4 +-- .../Scripts/Interfaces/IExecuteHandler.cs | 5 ++- .../Scripts/Interfaces/ILuaBindings.cs | 24 +++++++++++-- .../Scripts/Interfaces/ILuaEnvironment.cs | 5 ++- .../Scripts/Interfaces/ILuaScript.cs | 3 +- .../FungusLua/Scripts/Interfaces/ILuaStore.cs | 5 ++- .../FungusLua/Scripts/Interfaces/ILuaUtils.cs | 20 ++++++++++- .../Scripts/Interfaces/IStringSubstituter.cs | 5 ++- 15 files changed, 114 insertions(+), 80 deletions(-) create mode 100644 Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs create mode 100644 Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs.meta diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs index 9013ea6e..cad1e5ef 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaBindings.cs @@ -2,7 +2,6 @@ // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) using UnityEngine; -using System; using System.Collections.Generic; using MoonSharp.Interpreter; @@ -15,10 +14,9 @@ namespace Fungus /// public abstract class LuaBindingsBase : MonoBehaviour, ILuaBindings { - /// - /// Add all declared bindings to the globals table. - /// public abstract void AddBindings(ILuaEnvironment luaEnv); + + public abstract List BoundObjects { get; } } /// @@ -27,26 +25,12 @@ namespace Fungus [ExecuteInEditMode] public class LuaBindings : LuaBindingsBase { - /// - /// Represents a single Unity object (+ optional component) bound to a string key. - /// - [Serializable] - public class BoundObject - { - public string key; - public UnityEngine.Object obj; - public Component component; - } - [Tooltip("Add bindings to every Lua Environment in the scene. If false, only add bindings to a specific Lua Environment.")] [SerializeField] protected bool allEnvironments = true; [Tooltip("The specific LuaEnvironment to register the bindings in.")] [SerializeField] protected LuaEnvironment luaEnvironment; - /// - /// Name of global table variable to store bindings in. If left blank then each binding will be added as a global variable. - /// [Tooltip("Name of global table variable to store bindings in. If left blank then each binding will be added as a global variable.")] [SerializeField] protected string tableName = ""; @@ -56,19 +40,12 @@ namespace Fungus [HideInInspector] [SerializeField] protected List boundTypes = new List(); - /// - /// The list of Unity objects to be bound for access in Lua. - /// [Tooltip("The list of Unity objects to be bound to make them accessible in Lua script.")] [SerializeField] protected List boundObjects = new List(); - public virtual List BoundObjects { get { return boundObjects; } } [Tooltip("Show inherited public members.")] [SerializeField] protected bool showInherited; - /// - /// Always ensure there is at least one row in the bound objects list. - /// protected virtual void Update() { // Add in a single empty line at start @@ -78,9 +55,8 @@ namespace Fungus } } - /// - /// Add all declared bindings to the globals table. - /// + #region ILuaBindings implementation + public override void AddBindings(ILuaEnvironment luaEnv) { if (!allEnvironments && @@ -170,5 +146,9 @@ namespace Fungus } } } + + public override List BoundObjects { get { return boundObjects; } } + + #endregion } } \ No newline at end of file diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs index 66c87f53..65a3a707 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironment.cs @@ -18,22 +18,6 @@ namespace Fungus /// public class LuaEnvironment : MonoBehaviour, ILuaEnvironment { - /// - /// Helper class used to extend the initialization behavior of LuaEnvironment. - /// - public abstract class Initializer : MonoBehaviour - { - /// - /// Called when the LuaEnvironment is initializing. - /// - public abstract void Initialize(); - - /// - /// Applies transformations to the input script prior to execution. - /// - public abstract string PreprocessScript(string input); - } - /// /// Custom file loader for MoonSharp that loads in all Lua scripts in the project. /// Scripts must be placed in a Resources/Lua directory. @@ -308,8 +292,8 @@ namespace Fungus InitLuaScriptFiles(); // Initialize any attached initializer components (e.g. LuaUtils) - Initializer[] initializers = GetComponents(); - foreach (Initializer initializer in initializers) + LuaEnvironmentInitializer[] initializers = GetComponents(); + foreach (LuaEnvironmentInitializer initializer in initializers) { initializer.Initialize(); } @@ -329,7 +313,7 @@ namespace Fungus InitEnvironment(); string processedString; - Initializer initializer = GetComponent(); + var initializer = GetComponent(); if (initializer != null) { processedString = initializer.PreprocessScript(luaString); diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs new file mode 100644 index 00000000..61fa5c61 --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs @@ -0,0 +1,23 @@ +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; + +namespace Fungus +{ + /// + /// Helper class used to extend the initialization behavior of LuaEnvironment. + /// + public abstract class LuaEnvironmentInitializer : MonoBehaviour + { + /// + /// Called when the LuaEnvironment is initializing. + /// + public abstract void Initialize(); + + /// + /// Applies transformations to the input script prior to execution. + /// + public abstract string PreprocessScript(string input); + } +} \ No newline at end of file diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs.meta b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs.meta new file mode 100644 index 00000000..c4572c4f --- /dev/null +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaEnvironmentInitializer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d585353af4b94484eb72d5bb5fd00c4d +timeCreated: 1474295608 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs index 4f6e1e37..2b1e5a78 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaScript.cs @@ -1,9 +1,6 @@ // This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) -// Adapted from the Unity Test Tools project (MIT license) -// https://bitbucket.org/Unity-Technologies/unitytesttools/src/a30d562427e9/Assets/UnityTestTools/ - using UnityEngine; using MoonSharp.Interpreter; using Debug = UnityEngine.Debug; diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs index caf36b4a..0fafc89b 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaStore.cs @@ -3,6 +3,7 @@ using UnityEngine; using MoonSharp.Interpreter; +using System.Collections.Generic; namespace Fungus { @@ -93,6 +94,8 @@ namespace Fungus } } + public override List BoundObjects { get { return null; } } + #endregion #region ILuaStore implementation diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs index 06825c6d..2a6824cd 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs @@ -15,28 +15,13 @@ namespace Fungus /// /// A collection of utilites to use in Lua for common Unity / Fungus tasks. /// - public class LuaUtils : LuaEnvironment.Initializer, ISubstitutionHandler, ILuaUtils + public class LuaUtils : LuaEnvironmentInitializer, ISubstitutionHandler, ILuaUtils { - public enum FungusModuleOptions - { - UseGlobalVariables, // Fungus helper items will be available as global variables. - UseFungusVariable, // Fungus helper items will be available in the 'fungus' global variable. - NoFungusModule // The fungus helper module will not be loaded. - } - - /// - /// Controls if the fungus utilities are accessed from globals (e.g. say) or via a fungus variable (e.g. fungus.say)" - /// You can also choose to disable loading the fungus module if it's not required by your script. - /// - [Tooltip("Controls if the fungus utilities are accessed from globals (e.g. say) or via a fungus variable (e.g. fungus.say)")] + [Tooltip("Controls if the fungus utilities are accessed from globals (e.g. say) or via a fungus variable (e.g. fungus.say). You can also choose to disable loading the fungus module if it's not required by your script.")] [SerializeField] protected FungusModuleOptions fungusModule = FungusModuleOptions.UseGlobalVariables; - /// - /// The currently selected language in the string table. Affects variable substitution. - /// [Tooltip("The currently selected language in the string table. Affects variable substitution.")] [SerializeField] protected string activeLanguage = "en"; - public virtual string ActiveLanguage { get { return activeLanguage; } set { activeLanguage = value; } } /// /// Lua script file which defines the global string table used for localisation. @@ -298,9 +283,6 @@ namespace Fungus InitBindings(); } - /// - /// Called by LuaEnvironment prior to executing a script. - /// public override string PreprocessScript(string input) { return input; @@ -310,6 +292,8 @@ namespace Fungus #region ILuaUtils implementation + public virtual string ActiveLanguage { get { return activeLanguage; } set { activeLanguage = value; } } + public virtual string GetString(string key) { if (stringTable != null) diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs index 5a1b0b2e..863c41af 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs @@ -201,7 +201,7 @@ namespace Fungus details.Add(""); LuaBindings luaBindings = target as LuaBindings; - foreach (LuaBindings.BoundObject boundObject in luaBindings.BoundObjects) + foreach (BoundObject boundObject in luaBindings.BoundObjects) { UnityEngine.Object inspectObject = boundObject.obj; if (boundObject.component != null) @@ -408,7 +408,7 @@ namespace Fungus // Use a temp HashSet to store the list of types. // The final list is stored as a list of type strings. HashSet typeSet = new HashSet(); - foreach (LuaBindings.BoundObject boundObject in luaBindings.BoundObjects) + foreach (BoundObject boundObject in luaBindings.BoundObjects) { if (boundObject.obj == null) { diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs index 146026f5..d282b010 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IExecuteHandler.cs @@ -1,4 +1,7 @@ -using System; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using System; namespace Fungus { diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaBindings.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaBindings.cs index 7dc112bc..a862fd47 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaBindings.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaBindings.cs @@ -1,8 +1,23 @@ -using UnityEngine; -using System.Collections; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; +using System; +using System.Collections.Generic; namespace Fungus { + /// + /// Represents a single Unity object (+ optional component) bound to a string key. + /// + [Serializable] + public class BoundObject + { + public string key; + public UnityEngine.Object obj; + public Component component; + } + /// /// Binds objects to identifiers in a Lua Environment. /// @@ -12,5 +27,10 @@ namespace Fungus /// Add all declared bindings to the globals table. /// void AddBindings(ILuaEnvironment luaEnv); + + /// + /// The list of objects to be bound to Lua. + /// + List BoundObjects { get; } } } \ No newline at end of file diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaEnvironment.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaEnvironment.cs index bfe8596e..172947e1 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaEnvironment.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaEnvironment.cs @@ -1,4 +1,7 @@ -using MoonSharp.Interpreter; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using MoonSharp.Interpreter; namespace Fungus { diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaScript.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaScript.cs index cf031c40..7fd82517 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaScript.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaScript.cs @@ -1,4 +1,5 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) namespace Fungus { diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaStore.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaStore.cs index 7d2a1ad3..2888adff 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaStore.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaStore.cs @@ -1,4 +1,7 @@ -using MoonSharp.Interpreter; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using MoonSharp.Interpreter; namespace Fungus { diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaUtils.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaUtils.cs index 0055cee8..0908842c 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaUtils.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/ILuaUtils.cs @@ -1,11 +1,29 @@ -using UnityEngine; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; using System.Collections; using System.Text; namespace Fungus { + /// + /// Options for using the Lua FungusModule. + /// + public enum FungusModuleOptions + { + UseGlobalVariables, // Fungus helper items will be available as global variables. + UseFungusVariable, // Fungus helper items will be available in the 'fungus' global variable. + NoFungusModule // The fungus helper module will not be loaded. + } + public interface ILuaUtils { + /// + /// The currently selected language in the string table. Affects variable substitution. + /// + string ActiveLanguage { get; set; } + /// /// Returns a string from the string table for this key. /// The string returned depends on the active language. diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs index 26b2deb4..696b4a79 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Interfaces/IStringSubstituter.cs @@ -1,4 +1,7 @@ -using System.Text; +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using System.Text; namespace Fungus { From 02a71f7a38129280e06e756609fa37c16bcf5e8b Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 19 Sep 2016 17:03:23 +0100 Subject: [PATCH 31/32] Updated project settings for Unity 5.4.1 --- ProjectSettings/ProjectSettings.asset | 43 ++------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index c4884f20..9ed24b4d 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -181,8 +181,8 @@ PlayerSettings: m_Icons: - serializedVersion: 2 m_Icon: {fileID: 2800000, guid: 6dce816d2c9914696b4c538a8cfb2726, type: 3} - m_Width: 128 - m_Height: 128 + m_Width: 0 + m_Height: 0 m_BuildTargetBatching: - m_BuildTarget: Android m_StaticBatching: 1 @@ -500,44 +500,7 @@ PlayerSettings: WebGL::emscriptenArgs: WebGL::template: APPLICATION:Default additionalIl2CppArgs::additionalIl2CppArgs: - vectorPropertyNames: - - Android::VR::enabledDevices - - Metro::VR::enabledDevices - - N3DS::VR::enabledDevices - - PS3::VR::enabledDevices - - PS4::VR::enabledDevices - - PSM::VR::enabledDevices - - PSP2::VR::enabledDevices - - SamsungTV::VR::enabledDevices - - Standalone::VR::enabledDevices - - Tizen::VR::enabledDevices - - WebGL::VR::enabledDevices - - WebPlayer::VR::enabledDevices - - WiiU::VR::enabledDevices - - Xbox360::VR::enabledDevices - - XboxOne::VR::enabledDevices - - iOS::VR::enabledDevices - - tvOS::VR::enabledDevices - Android::VR::enabledDevices: - - Oculus - Metro::VR::enabledDevices: [] - N3DS::VR::enabledDevices: [] - PS3::VR::enabledDevices: [] - PS4::VR::enabledDevices: - - PlayStationVR - PSM::VR::enabledDevices: [] - PSP2::VR::enabledDevices: [] - SamsungTV::VR::enabledDevices: [] - Standalone::VR::enabledDevices: - - Oculus - Tizen::VR::enabledDevices: [] - WebGL::VR::enabledDevices: [] - WebPlayer::VR::enabledDevices: [] - WiiU::VR::enabledDevices: [] - Xbox360::VR::enabledDevices: [] - XboxOne::VR::enabledDevices: [] - iOS::VR::enabledDevices: [] - tvOS::VR::enabledDevices: [] + vectorPropertyNames: [] cloudProjectId: projectName: organizationId: From eff7734a997ca08a1a6e8f74e24ef88fdc4b5f23 Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 19 Sep 2016 17:14:50 +0100 Subject: [PATCH 32/32] Fixed portrait not being set --- .../Narrative/StageAndPortraits.unity | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Assets/FungusExamples/FungusLua/Narrative/StageAndPortraits.unity b/Assets/FungusExamples/FungusLua/Narrative/StageAndPortraits.unity index 8c08e474..d8ad3e2c 100644 --- a/Assets/FungusExamples/FungusLua/Narrative/StageAndPortraits.unity +++ b/Assets/FungusExamples/FungusLua/Narrative/StageAndPortraits.unity @@ -13,7 +13,7 @@ SceneSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 6 + serializedVersion: 7 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -37,12 +37,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 6 + serializedVersion: 7 m_GIWorkflowMode: 1 - m_LightmapsMode: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -53,17 +53,22 @@ LightmapSettings: m_EnableBakedLightmaps: 0 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: - serializedVersion: 3 + serializedVersion: 4 m_Resolution: 2 m_BakeResolution: 40 m_TextureWidth: 1024 m_TextureHeight: 1024 + m_AO: 0 m_AOMaxDistance: 1 - m_Padding: 2 m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 m_TextureCompression: 1 + m_DirectLightInLightProbes: 1 m_FinalGather: 0 + m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 1024 m_ReflectionCompression: 2 m_LightingDataAsset: {fileID: 0} @@ -266,7 +271,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: itemId: 4 - errorMessage: indentLevel: 0 luaEnvironment: {fileID: 0} luaFile: {fileID: 0} @@ -417,14 +421,14 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: itemId: 3 - errorMessage: indentLevel: 0 luaEnvironment: {fileID: 0} luaFile: {fileID: 0} luaScript: '-- Shows how to use stage.show with named arguments - stage.show{character=watson, fromPosition="offscreen right", toPosition="right"} + stage.show{character=watson, portrait="annoyed", fromPosition="offscreen right", + toPosition="right"} stage.show{character=sherlock, portrait="angry"} @@ -450,7 +454,7 @@ MonoBehaviour: returnVariable: {fileID: 0} --- !u!114 &574033274 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 574033265} @@ -460,7 +464,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: itemId: 8 - errorMessage: indentLevel: 0 _duration: floatRef: {fileID: 0} @@ -513,7 +516,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 22488902, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} propertyPath: m_RootOrder - value: 10 + value: 9 objectReference: {fileID: 0} - target: {fileID: 22488902, guid: 8a005a9e0713f4cc1b5ad29fb07657d3, type: 2} propertyPath: m_AnchoredPosition.x @@ -617,12 +620,12 @@ MonoBehaviour: - UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - Fungus.Character, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - UnityEngine.Sprite, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - UnityEngine.Color, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - UnityEngine.AudioClip, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + - UnityEngine.Sprite, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - Fungus.FacingDirection, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - Fungus.PortraitState, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - Fungus.SayDialog, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + - Fungus.ISayDialog, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - Fungus.Stage, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - UnityEngine.Canvas, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - LeanTweenType, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null @@ -900,7 +903,6 @@ MonoBehaviour: nameText: Watson nameColor: {r: 1, g: 1, b: 1, a: 1} soundEffect: {fileID: 0} - profileSprite: {fileID: 21300000, guid: a92b08a118b7d46f59dd091acb2e4102, type: 3} portraits: - {fileID: 21300000, guid: a92b08a118b7d46f59dd091acb2e4102, type: 3} - {fileID: 21300000, guid: 03bc547cc0049594bae51f00903eedef, type: 3} @@ -951,7 +953,6 @@ MonoBehaviour: nameText: Sherlock nameColor: {r: 1, g: 1, b: 1, a: 1} soundEffect: {fileID: 0} - profileSprite: {fileID: 21300000, guid: 8f5b5b110e73a414eb229eeead86200f, type: 3} portraits: - {fileID: 21300000, guid: 8f5b5b110e73a414eb229eeead86200f, type: 3} - {fileID: 21300000, guid: c779e34c6eb8e45da98c70cf2802a54c, type: 3}