From 0e5bffef34f36700b650f06f7a7a44d0ebb9cd22 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 19 Aug 2014 17:00:24 +0100 Subject: [PATCH] Removed old command system --- Assets/Fungus/Scripts/AnimationListener.cs | 2 + Assets/Fungus/Scripts/Button.cs | 2 + Assets/Fungus/Scripts/CommandQueue.cs | 85 --- Assets/Fungus/Scripts/CommandQueue.cs.meta | 8 - Assets/Fungus/Scripts/Commands.meta | 5 - .../Fungus/Scripts/Commands/CameraCommands.cs | 289 -------- .../Scripts/Commands/CameraCommands.cs.meta | 8 - .../Fungus/Scripts/Commands/DialogCommands.cs | 64 -- .../Scripts/Commands/DialogCommands.cs.meta | 8 - .../Fungus/Scripts/Commands/GameCommands.cs | 180 ----- .../Scripts/Commands/GameCommands.cs.meta | 8 - .../Fungus/Scripts/Commands/SpriteCommands.cs | 119 ---- .../Scripts/Commands/SpriteCommands.cs.meta | 8 - Assets/Fungus/Scripts/Dialog.cs | 19 +- Assets/Fungus/Scripts/Game.cs | 18 +- Assets/Fungus/Scripts/GameController.cs | 630 ------------------ Assets/Fungus/Scripts/GameController.cs.meta | 8 - Assets/Fungus/Scripts/Room.cs | 4 +- Assets/Fungus/Scripts/SceneLoader.cs | 2 +- Assets/Shuttle/ShuttleGame.unity | Bin 89036 -> 87772 bytes 20 files changed, 11 insertions(+), 1456 deletions(-) delete mode 100644 Assets/Fungus/Scripts/CommandQueue.cs delete mode 100644 Assets/Fungus/Scripts/CommandQueue.cs.meta delete mode 100644 Assets/Fungus/Scripts/Commands.meta delete mode 100644 Assets/Fungus/Scripts/Commands/CameraCommands.cs delete mode 100644 Assets/Fungus/Scripts/Commands/CameraCommands.cs.meta delete mode 100644 Assets/Fungus/Scripts/Commands/DialogCommands.cs delete mode 100644 Assets/Fungus/Scripts/Commands/DialogCommands.cs.meta delete mode 100644 Assets/Fungus/Scripts/Commands/GameCommands.cs delete mode 100644 Assets/Fungus/Scripts/Commands/GameCommands.cs.meta delete mode 100644 Assets/Fungus/Scripts/Commands/SpriteCommands.cs delete mode 100644 Assets/Fungus/Scripts/Commands/SpriteCommands.cs.meta delete mode 100644 Assets/Fungus/Scripts/GameController.cs delete mode 100644 Assets/Fungus/Scripts/GameController.cs.meta diff --git a/Assets/Fungus/Scripts/AnimationListener.cs b/Assets/Fungus/Scripts/AnimationListener.cs index 828c6e54..f9b44226 100644 --- a/Assets/Fungus/Scripts/AnimationListener.cs +++ b/Assets/Fungus/Scripts/AnimationListener.cs @@ -25,8 +25,10 @@ namespace Fungus return; } + /* CommandQueue commandQueue = Game.GetInstance().commandQueue; commandQueue.CallCommandMethod(room.gameObject, methodName); + */ } } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Button.cs b/Assets/Fungus/Scripts/Button.cs index e68dddbc..c140e121 100644 --- a/Assets/Fungus/Scripts/Button.cs +++ b/Assets/Fungus/Scripts/Button.cs @@ -144,8 +144,10 @@ namespace Fungus AudioSource.PlayClipAtPoint(clickSound, Vector3.zero); } + /* CommandQueue commandQueue = Game.GetInstance().commandQueue; commandQueue.CallCommandMethod(buttonAction); + */ } } } \ No newline at end of file diff --git a/Assets/Fungus/Scripts/CommandQueue.cs b/Assets/Fungus/Scripts/CommandQueue.cs deleted file mode 100644 index c11324c6..00000000 --- a/Assets/Fungus/Scripts/CommandQueue.cs +++ /dev/null @@ -1,85 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Fungus -{ - /** - * Manages a sequential list of commands. - * When a command completes, the next command is popped from the queue and exectuted. - */ - public class CommandQueue : MonoBehaviour - { - /** - * Base class for commands used with the CommandQueue. - */ - public abstract class Command - { - public abstract void Execute(CommandQueue commandQueue, Action onComplete); - } - - List commandList = new List(); - - /** - * Adds a command to the queue for later execution - * @param command A command object to add to the queue - */ - public virtual void AddCommand(Command command) - { - commandList.Add(command); - } - - /** - * Clears all queued commands from the list - */ - public virtual void Clear() - { - commandList.Clear(); - } - - /** - * Executes the first command in the queue. - * When this command completes, the next command in the queue is executed. - */ - public virtual void Execute() - { - if (commandList.Count == 0) - { - return; - } - - Command command = commandList[0]; - - command.Execute(this, delegate { - commandList.RemoveAt(0); - Execute(); - }); - } - - /** - * Calls a named method on a game object to populate the command queue. - * The command queue is then executed. - */ - public void CallCommandMethod(GameObject target, string methodName) - { - Clear(); - target.SendMessage(methodName, SendMessageOptions.DontRequireReceiver); - Execute(); - } - - /** - * Calls an Action delegate method to populate the command queue. - * The command queue is then executed. - */ - public void CallCommandMethod(Action method) - { - Clear(); - if (method != null) - { - method(); - } - Execute(); - } - } -} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/CommandQueue.cs.meta b/Assets/Fungus/Scripts/CommandQueue.cs.meta deleted file mode 100644 index dff861e3..00000000 --- a/Assets/Fungus/Scripts/CommandQueue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6727650fe2095478c9d180eac7ba0d2f -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Scripts/Commands.meta b/Assets/Fungus/Scripts/Commands.meta deleted file mode 100644 index e1cc88b9..00000000 --- a/Assets/Fungus/Scripts/Commands.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: ed31c7843a16b49bb918643ab98b7f67 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Fungus/Scripts/Commands/CameraCommands.cs b/Assets/Fungus/Scripts/Commands/CameraCommands.cs deleted file mode 100644 index c2fe261d..00000000 --- a/Assets/Fungus/Scripts/Commands/CameraCommands.cs +++ /dev/null @@ -1,289 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; - -namespace Fungus -{ - /** - * Command classes have their own namespace to prevent them popping up in code completion. - */ - namespace Command - { - /** - * Sets the currently active view immediately. - * The main camera snaps to the active view. - */ - public class SetView : CommandQueue.Command - { - View view; - - public SetView(View _view) - { - if (_view == null) - { - Debug.LogError("View must not be null"); - } - - view = _view; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - game.cameraController.PanToPosition(view.transform.position, view.transform.rotation, view.viewSize, 0, null); - - if (onComplete != null) - { - onComplete(); - } - } - } - - /** - * Pans the camera to a target position & size over a period of time. - */ - public class PanToPosition : CommandQueue.Command - { - Vector3 targetPosition; - Quaternion targetRotation; - float targetSize; - float duration; - bool wait; - - public PanToPosition(Vector3 _targetPosition, Quaternion _targetRotation, float _targetSize, float _duration, bool _wait) - { - targetPosition = _targetPosition; - targetRotation = _targetRotation; - targetSize = _targetSize; - duration = _duration; - wait = _wait; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - if (wait) - { - game.waiting = true; - } - - game.cameraController.PanToPosition(targetPosition, targetRotation, targetSize, duration, delegate { - if (wait) - { - game.waiting = false; - if (onComplete != null) - { - onComplete(); - } - } - }); - - if (!wait) - { - if (onComplete != null) - { - onComplete(); - } - } - } - } - - /** - * Pans the camera through a sequence of views over a period of time. - */ - public class PanToPath : CommandQueue.Command - { - View[] views; - float duration; - - public PanToPath(View[] _views, float _duration) - { - if (_views.Length == 0) - { - Debug.LogError("View list must not be empty."); - return; - } - - views = _views; - duration = _duration; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - game.waiting = true; - - game.cameraController.PanToPath(views, duration, delegate { - - if (views.Length > 0) - { - game.waiting = false; - } - - if (onComplete != null) - { - onComplete(); - } - }); - } - } - - /** - * Fades the camera to a view over a period of time. - */ - public class FadeToView : CommandQueue.Command - { - View view; - float duration; - - public FadeToView(View _view, float _duration) - { - if (_view == null) - { - Debug.LogError("View must not be null."); - return; - } - - view = _view; - duration = _duration; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - game.waiting = true; - - game.cameraController.FadeToView(view, duration, delegate { - - game.waiting = false; - - if (onComplete != null) - { - onComplete(); - } - }); - } - } - - /** - * Switches on swipe panning mode. - * This allows the player to swipe the screen to pan around a region defined by 2 views. - */ - public class StartSwipePan : CommandQueue.Command - { - View viewA; - View viewB; - float duration; - - public StartSwipePan(View _viewA, View _viewB, float _duration) - { - if (_viewA == null || - _viewB == null) - { - Debug.LogError("Views must not be null."); - return; - } - - viewA = _viewA; - viewB = _viewB; - duration = _duration; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - game.waiting = true; - - game.cameraController.StartSwipePan(viewA, viewB, duration, delegate { - - game.waiting = false; - - if (onComplete != null) - { - onComplete(); - } - }); - } - } - - /** - * Switches off pan-to-swipe mode. - */ - public class StopSwipePan : CommandQueue.Command - { - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - game.cameraController.StopSwipePan(); - - if (onComplete != null) - { - onComplete(); - } - } - } - - /** - * Stores the current camera position - */ - public class StoreView : CommandQueue.Command - { - string viewName; - - public StoreView(string _viewName) - { - viewName = _viewName; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - game.cameraController.StoreView(viewName); - - if (onComplete != null) - { - onComplete(); - } - } - } - - /** - * Pans the camera to a view over a period of time. - */ - public class PanToStoredView : CommandQueue.Command - { - float duration; - string viewName; - - public PanToStoredView(string _viewName, float _duration) - { - viewName = _viewName; - duration = _duration; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game game = Game.GetInstance(); - - game.waiting = true; - - game.cameraController.PanToStoredView(viewName, duration, delegate { - - game.waiting = false; - - if (onComplete != null) - { - onComplete(); - } - }); - } - } - } -} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/CameraCommands.cs.meta b/Assets/Fungus/Scripts/Commands/CameraCommands.cs.meta deleted file mode 100644 index e78de55a..00000000 --- a/Assets/Fungus/Scripts/Commands/CameraCommands.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 48a11d9857cef47caad512a6e89998d3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Scripts/Commands/DialogCommands.cs b/Assets/Fungus/Scripts/Commands/DialogCommands.cs deleted file mode 100644 index ff4eed62..00000000 --- a/Assets/Fungus/Scripts/Commands/DialogCommands.cs +++ /dev/null @@ -1,64 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using Fungus.Script; - -namespace Fungus -{ - /** - * Command classes have their own namespace to prevent them popping up in code completion. - */ - namespace Command - { - /** - * Writes story text to the page. - * A continue icon is displayed when the text has fully appeared. - */ - public class Say : CommandQueue.Command - { - string sayText; - - public Say(string _sayText) - { - sayText = _sayText; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - string subbedText = GlobalVariables.SubstituteStrings(sayText); - - IDialog sayDialog = Game.GetInstance().GetDialog(); - sayDialog.Say(subbedText, onComplete); - } - } - - /** - * Adds an option button to the current list of options. - * Use the Choose command to display added options. - */ - public class AddOption : CommandQueue.Command - { - string optionText; - Action optionAction; - - public AddOption(string _optionText, Action _optionAction) - { - optionText = _optionText; - optionAction = _optionAction; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - IDialog characterDialog = Game.GetInstance().GetDialog(); - - string subbedText = GlobalVariables.FormatLinkText(GlobalVariables.SubstituteStrings(optionText)); - characterDialog.AddOption(subbedText, optionAction); - - if (onComplete != null) - { - onComplete(); - } - } - } - } -} diff --git a/Assets/Fungus/Scripts/Commands/DialogCommands.cs.meta b/Assets/Fungus/Scripts/Commands/DialogCommands.cs.meta deleted file mode 100644 index 3ef1615f..00000000 --- a/Assets/Fungus/Scripts/Commands/DialogCommands.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0e6a6caa973fb4fd784890f53106004d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Scripts/Commands/GameCommands.cs b/Assets/Fungus/Scripts/Commands/GameCommands.cs deleted file mode 100644 index 5755543b..00000000 --- a/Assets/Fungus/Scripts/Commands/GameCommands.cs +++ /dev/null @@ -1,180 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; - -namespace Fungus -{ - /** - * Command classes have their own namespace to prevent them popping up in code completion. - */ - namespace Command - { - /** - * Call a delegate method on execution. - * This command can be used to schedule arbitrary script code. - */ - public class Call : CommandQueue.Command - { - Action onExecute; - - public Call(Action callAction) - { - if (callAction == null) - { - Debug.LogError("Action must not be null."); - return; - } - - onExecute = callAction; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - if (onExecute != null) - onExecute(); - - if (onComplete != null) - onComplete(); - } - } - - /** - * Wait for a period of time. - */ - public class Wait : CommandQueue.Command - { - float duration; - - public Wait(float _duration) - { - duration = _duration; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game.GetInstance().waiting = true; - commandQueue.StartCoroutine(WaitCoroutine(duration, onComplete)); - } - - IEnumerator WaitCoroutine(float duration, Action onComplete) - { - yield return new WaitForSeconds(duration); - if (onComplete != null) - { - Game.GetInstance().waiting = false; - onComplete(); - } - } - } - - /** - * Wait for a player tap/click/key press - */ - public class WaitForInput : CommandQueue.Command - { - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - Game.GetInstance().waiting = true; - commandQueue.StartCoroutine(WaitCoroutine(onComplete)); - } - - IEnumerator WaitCoroutine(Action onComplete) - { - while (true) - { - if (Input.GetMouseButtonDown(0) || Input.anyKeyDown) - { - break; - } - yield return null; - } - - if (onComplete != null) - { - Game.GetInstance().waiting = false; - onComplete(); - } - } - } - - /** - * Changes the active room to a different room - */ - public class MoveToRoom : CommandQueue.Command - { - Action onExecute; - - public MoveToRoom(Room room) - { - if (room == null) - { - Debug.LogError("Room must not be null."); - return; - } - - onExecute = delegate { - Game game = Game.GetInstance(); - game.waiting = true; - - // Fade out screen - game.cameraController.Fade(0f, game.roomFadeDuration / 2f, delegate { - - game.activeRoom = room; - - // Notify room script that the Room is being entered - // Calling private method on Room to hide implementation - game.activeRoom.gameObject.SendMessage("Enter"); - - // Fade in screen - game.cameraController.Fade(1f, game.roomFadeDuration / 2f, delegate { - game.waiting = false; - }); - }); - }; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - if (onExecute != null) - onExecute(); - - // This command resets the command queue so no need to call onComplete - } - } - - /** - * Switches to a different scene. - */ - public class MoveToScene : CommandQueue.Command - { - Action onExecute; - - public MoveToScene(string sceneName) - { - if (sceneName == "") - { - Debug.LogError("Scene name must not be empty"); - return; - } - - onExecute = delegate { - Game game = Game.GetInstance(); - game.waiting = true; - - // Fade out screen - game.cameraController.Fade(0f, game.roomFadeDuration / 2f, delegate { - Game.GetInstance().LoadScene(sceneName, true); - }); - }; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - if (onExecute != null) - onExecute(); - - // This command resets the command queue so no need to call onComplete - } - } - } -} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/GameCommands.cs.meta b/Assets/Fungus/Scripts/Commands/GameCommands.cs.meta deleted file mode 100644 index d7aeee10..00000000 --- a/Assets/Fungus/Scripts/Commands/GameCommands.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 83105d98d4aed45f9b25b7ba66e83a29 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Scripts/Commands/SpriteCommands.cs b/Assets/Fungus/Scripts/Commands/SpriteCommands.cs deleted file mode 100644 index 0a71f7f1..00000000 --- a/Assets/Fungus/Scripts/Commands/SpriteCommands.cs +++ /dev/null @@ -1,119 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; - -namespace Fungus -{ - /** - * Command classes have their own namespace to prevent them popping up in code completion. - */ - namespace Command - { - /** - * Fades a sprite to a given alpha value over a period of time - */ - public class FadeSprite : CommandQueue.Command - { - SpriteRenderer spriteRenderer; - Color targetColor; - float fadeDuration; - Vector2 slideOffset = Vector2.zero; - - public FadeSprite(SpriteRenderer _spriteRenderer, - Color _targetColor, - float _fadeDuration, - Vector2 _slideOffset) - { - if (_spriteRenderer == null) - { - Debug.LogError("Sprite renderer must not be null."); - return; - } - - spriteRenderer = _spriteRenderer; - targetColor = _targetColor; - fadeDuration = _fadeDuration; - slideOffset = _slideOffset; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - SpriteFader.FadeSprite(spriteRenderer, targetColor, fadeDuration, slideOffset); - - // Fade is asynchronous, but command completes immediately. - // If you need to wait for the fade to complete, just use an additional Wait() command - if (onComplete != null) - { - onComplete(); - } - } - } - - /** - * Sets an animator trigger to change the animator state for an animated sprite - */ - public class SetAnimatorTrigger : CommandQueue.Command - { - Animator animator; - string triggerName; - - public SetAnimatorTrigger(Animator _animator, - string _triggerName) - { - if (_animator == null) - { - Debug.LogError("Animator must not be null."); - return; - } - - animator = _animator; - triggerName = _triggerName; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - animator.SetTrigger(triggerName); - - if (onComplete != null) - { - onComplete(); - } - } - } - - /** - * Display a button and set the method to be called when player clicks. - */ - public class ShowButton : CommandQueue.Command - { - Button button; - bool visible; - Action buttonAction; - - public ShowButton(Button _button, - bool _visible, - Action _buttonAction) - { - if (_button == null) - { - Debug.LogError("Button must not be null."); - return; - } - - button = _button; - visible = _visible; - buttonAction = _buttonAction; - } - - public override void Execute(CommandQueue commandQueue, Action onComplete) - { - button.Show(visible, buttonAction); - - if (onComplete != null) - { - onComplete(); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/SpriteCommands.cs.meta b/Assets/Fungus/Scripts/Commands/SpriteCommands.cs.meta deleted file mode 100644 index 3a21518c..00000000 --- a/Assets/Fungus/Scripts/Commands/SpriteCommands.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bb89d5e15bc734221b9d8fe9ae8e8153 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Scripts/Dialog.cs b/Assets/Fungus/Scripts/Dialog.cs index f0815f10..2cfd24a3 100644 --- a/Assets/Fungus/Scripts/Dialog.cs +++ b/Assets/Fungus/Scripts/Dialog.cs @@ -347,7 +347,6 @@ namespace Fungus Action deferredAction; Action continueAction; - bool executeAsCommand; float continueTimer; bool instantCompleteText; @@ -678,12 +677,10 @@ namespace Fungus if (options[i].optionAction == null) { deferredAction = DoNullAction; - executeAsCommand = false; } else { deferredAction = options[i].optionAction; - executeAsCommand = true; } } @@ -799,12 +796,10 @@ namespace Fungus if (continueAction == null) { deferredAction = DoNullAction; - executeAsCommand = false; } else { deferredAction = continueAction; - executeAsCommand = false; } } @@ -814,7 +809,6 @@ namespace Fungus timeoutTimer == 0) { deferredAction = timeoutAction; - executeAsCommand = true; } } @@ -835,18 +829,7 @@ namespace Fungus timeoutTimer = 0; timeoutAnimationIndex = 0; - if (executeAsCommand) - { - executeAsCommand = false; - - // Execute next command - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.CallCommandMethod(tempAction); - } - else - { - tempAction(); - } + tempAction(); } } } diff --git a/Assets/Fungus/Scripts/Game.cs b/Assets/Fungus/Scripts/Game.cs index d2275f9c..1f15a683 100644 --- a/Assets/Fungus/Scripts/Game.cs +++ b/Assets/Fungus/Scripts/Game.cs @@ -16,9 +16,8 @@ namespace Fungus * Manages global game state and movement between rooms. */ [RequireComponent(typeof(Dialog))] - [RequireComponent(typeof(CommandQueue))] [RequireComponent(typeof(CameraController))] - public class Game : GameController + public class Game : MonoBehaviour { /** * The currently active Room. @@ -65,9 +64,6 @@ namespace Fungus [Tooltip("Loading image displayed when loading a scene using MoveToScene() command.")] public Texture2D loadingImage; - [HideInInspector] - public CommandQueue commandQueue; - [HideInInspector] public CameraController cameraController; @@ -102,8 +98,8 @@ namespace Fungus { // Acquire references to required components - commandQueue = gameObject.GetComponent(); cameraController = gameObject.GetComponent(); + // Auto-hide buttons should be visible at start of game autoHideButtonTimer = autoHideButtonDuration; @@ -113,14 +109,6 @@ namespace Fungus // Pick first room found if none is specified activeRoom = GameObject.FindObjectOfType(typeof(Room)) as Room; } - - if (activeRoom != null) - { - // Move to the active room - commandQueue.Clear(); - commandQueue.AddCommand(new Command.MoveToRoom(activeRoom)); - commandQueue.Execute(); - } } public virtual void Update() @@ -200,7 +188,7 @@ namespace Fungus string sceneName = GlobalVariables.GetString("_scene"); if (sceneName.Length > 0) { - MoveToScene(sceneName); + // MoveToScene(sceneName); } } } diff --git a/Assets/Fungus/Scripts/GameController.cs b/Assets/Fungus/Scripts/GameController.cs deleted file mode 100644 index 741a98e7..00000000 --- a/Assets/Fungus/Scripts/GameController.cs +++ /dev/null @@ -1,630 +0,0 @@ -using UnityEngine; -using System; -using System.Collections; -using Fungus.Script; - -namespace Fungus -{ - /** - * This class gives easy static access to every scripting command available in Fungus. - */ - public class GameController : MonoBehaviour - { - #region Game Methods - - /** - * Clears the command queue. - */ - public static void Clear() - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.Clear(); - } - - /** - * Executes the commadns in the command queue. - */ - public static void Execute() - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.Execute (); - } - - /** - * Transitions from the current Room to another Room. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param room The Room to transition to. - */ - public static void MoveToRoom(Room room) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.MoveToRoom(room)); - } - - /** - * Transitions to a different scene. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param sceneName The name of the scene to transition to. - */ - public static void MoveToScene(string sceneName) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.MoveToScene(sceneName)); - } - - /** - * Wait for a period of time before executing the next command. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param duration The wait duration in seconds - */ - public static void Wait(float duration) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Wait(duration)); - } - - /** - * Wait until player taps, clicks or presses a key before executing the next command. - * This method returns immediately but it queues an asynchronous command for later execution. - */ - public static void WaitForInput() - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.WaitForInput()); - } - - /** - * Call a delegate method provided by the client. - * Used to queue the execution of arbitrary code as part of a command sequeunce. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param callAction The Action delegate method to be called when the command executes. - */ - public static void Call(Action callAction) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(callAction)); - } - - /** - * Save the current game state to persistant storage. - * @param saveName The name of the saved game data. - */ - public static void Save(string saveName = "_fungus") - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - Game.GetInstance().SaveGame(saveName); - })); - } - - /** - * Load the current game state from persistant storage. - * @param saveName The name of the saved game data. - */ - public static void Load(string saveName = "_fungus") - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - Game.GetInstance().LoadGame(saveName); - })); - } - - #endregion - #region View Methods - - /** - * Sets the currently active View immediately. - * The main camera snaps to the new active View. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param view The View object to make active - */ - public static void SetView(View view) - { - PanToView(view, 0); - } - - /** - * Pans the camera to the target View over a period of time. - * The pan starts at the current camera position and performs a smoothed linear pan to the target View. - * Command execution blocks until the pan completes. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param targetView The View to pan the camera to. - * @param duration The length of time in seconds needed to complete the pan. - * @param wait Wait for pan to finish before executing next command. - */ - public static void PanToView(View targetView, float duration, bool wait = true) - { - PanToPosition(targetView.transform.position, targetView.transform.rotation, targetView.viewSize, duration, wait); - } - - /** - * Pans the camera to the target position and size over a period of time. - * The pan starts at the current camera position and performs a smoothed linear pan to the target. - * Command execution blocks until the pan completes. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param targetPosition The position to pan the camera to. - * @param targetRotation The rotation to pan the camera to. - * @param targetSize The orthographic size to pan the camera to. - * @param duration The length of time in seconds needed to complete the pan. - * @param wait Wait for pan to finish before executing next command. - */ - public static void PanToPosition(Vector3 targetPosition, Quaternion targetRotation, float targetSize, float duration, bool wait) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.PanToPosition(targetPosition, targetRotation, targetSize, duration, wait)); - } - - /** - * Fades out the current camera View, and fades in again using the target View. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param targetView The View object to fade to. - * @param duration The length of time in seconds needed to complete the pan. - */ - public static void FadeToView(View targetView, float duration) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.FadeToView(targetView, duration)); - } - - /** - * Activates swipe panning mode. - * The camera first pans to the nearest point between the two views over a period of time. - * The player can then pan around the rectangular area defined between viewA & viewB. - * Swipe panning remains active until a StopSwipePan, SetView, PanToView, FadeToPath or FadeToView command is executed. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param viewA View object which defines one extreme of the pan area. - * @param viewB View object which defines the other extreme of the pan area. - */ - public static void StartSwipePan(View viewA, View viewB, float duration = 1f) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.StartSwipePan(viewA, viewB, duration)); - } - - /** - * Deactivates swipe panning mode. - * This method returns immediately but it queues an asynchronous command for later execution. - */ - public static void StopSwipePan() - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.StopSwipePan()); - } - - /** - * Stores the current camera view using a name. - * You can later use PanToStoredView() to pan back to this stored position by name. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param viewName Name to associate with the stored camera view. - */ - public static void StoreView(string viewName = "") - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.StoreView(viewName)); - } - - /** - * Moves camera from the current position to a previously stored view over a period of time. - * @param duration Time needed for pan to complete. - * @param viewName Name of a camera view that was previously stored using StoreView(). - */ - public static void PanToStoredView(float duration, string viewName = "") - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.PanToStoredView(viewName, duration)); - } - - /** - * Applies a random shake to the camera. - * @param x Horizontal shake amount in world units. - * @param x Vertical shake amount in world units. - * @param duration Length of time for shake effect to last. - */ - public static void ShakeCamera(float x, float y, float duration) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - iTween.ShakePosition(Camera.main.gameObject, new Vector3(x, y, 0), duration); - })); - } - - #endregion - #region Dialog Methods - - /** - * Sets the Dialog object to use for displaying story text and options. - */ - public static void SetDialog(Dialog dialog) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - Game.GetInstance().dialog = dialog; - })); - } - - /** - * Sets the active Character within the current active Dialog. - * Each character has a distinct name, color & image. - */ - public static void SetCharacter(string characterID) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - Dialog dialog = Game.GetInstance().dialog; - if (dialog != null) - { - dialog.SetCharacter(characterID); - } - })); - } - - /** - * Writes story text to the dialog. - * A 'continue' button is displayed when the text has fully appeared. - * Command execution halts until the user chooses to continue. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param storyText The text to be written to the dialog. - */ - public static void Say(string storyText) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Say(storyText)); - } - - /** - * Adds an option to the current list of player options. - * Use the Choose() method to display previously added options. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param optionText The text to be displayed for this option - * @param optionAction The Action delegate method to be called when the player selects the option - */ - public static void AddOption(string optionText, Action optionAction) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.AddOption(optionText, optionAction)); - } - - /** - * Adds an option with no action to the current list of player options. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param optionText The text to be displayed for this option - * @param optionAction The Action delegate method to be called when the player selects the option - */ - public static void AddOption(string optionText) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.AddOption(optionText, delegate {})); - } - - /** - * Sets a time limit for choosing from a list of options. - * The timer will activate the next time a Say() command is executed that displays options. - */ - public static void SetTimeout(float timeoutDuration, Action timeoutAction) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call( delegate { - IDialog dialog = Game.GetInstance().GetDialog(); - if (dialog != null) - { - dialog.SetTimeout(timeoutDuration, timeoutAction); - } - })); - } - - #endregion - #region State Methods - - /** - * Sets a globally accessible boolean variable. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param key The name of the boolean variable to set - * @param value The boolean value to set - */ - public static void SetBoolean(string key, bool value) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - GlobalVariables.SetBoolean(key, value); - })); - } - - /** - * Sets a globally accessible integer variable. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param key The name of the integer variable to set - * @param value The integer value to set - */ - public static void SetInteger(string key, int value) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - GlobalVariables.SetInteger(key, value); - })); - } - - /** - * Sets a globally accessible float variable. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param key The name of the float variable to set - * @param value The flaot value to set - */ - public static void SetFloat(string key, float value) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - GlobalVariables.SetFloat(key, value); - })); - } - - /** - * Sets a globally accessible string variable. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param key The name of the variable to set - * @param value The string variable to set - */ - public static void SetString(string key, string value) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - GlobalVariables.SetString(key, value); - })); - } - - /** - * Adds a delta amount to the named integer variable. - * @param key The name of the integer variable to set. - * @param delta The delta value to add to the variable. - */ - public static void AddInteger(string key, int delta) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - int value = GlobalVariables.GetInteger(key); - GlobalVariables.SetInteger(key, value + delta); - })); - } - - /** - * Multiplies the named integer variable. - * @param key The name of the integer variable to set. - * @param multiplier The multiplier to multiply the integer variable by. - */ - public static void MultiplyInteger(string key, int multiplier) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - int value = GlobalVariables.GetInteger(key); - GlobalVariables.SetInteger(key, value * multiplier); - })); - } - - /** - * Adds a delta amount to the named float variable. - * @param key The name of the float variable to set. - * @param delta The delta value to add to the variable. - */ - public static void AddFloat(string key, float delta) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - float value = GlobalVariables.GetFloat(key); - GlobalVariables.SetFloat(key, value + delta); - })); - } - - /** - * Multiplies the named float variable. - * @param key The name of the float variable to set. - * @param multiplier The multiplier to multiply the float variable by. - */ - public static void MultiplyFloat(string key, float multiplier) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - float value = GlobalVariables.GetFloat(key); - GlobalVariables.SetFloat(key, value * multiplier); - })); - } - - /** - * Toggles the state of a boolean variable. - * @param The name of the boolean variable to toggle. - */ - public static void ToggleBoolean(string key) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - bool value = GlobalVariables.GetBoolean(key); - GlobalVariables.SetBoolean(key, !value); - })); - } - - #endregion - #region Sprite Methods - - /** - * Makes a sprite completely transparent immediately. - * This changes the alpha component of the sprite renderer color to 0. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param spriteRenderer The sprite to be modified - */ - public static void HideSprite(SpriteRenderer spriteRenderer) - { - FadeSprite(spriteRenderer, 0, 0, Vector2.zero); - } - - /** - * Makes a sprite completely opaque immediately. - * This changes the alpha component of the sprite renderer color to 1. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param spriteRenderer The sprite to be modified - */ - public static void ShowSprite(SpriteRenderer spriteRenderer) - { - FadeSprite(spriteRenderer, 1, 0, Vector2.zero); - } - - /** - * Shows or hides a sprite immediately, depending on the visible parameter. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param spriteRenderer The sprite to be modified - * @param visible Shows the sprite when true, hides the sprite when false. - */ - public static void ShowSprite(SpriteRenderer spriteRenderer, bool visible) - { - if (visible) - { - ShowSprite(spriteRenderer); - } - else - { - HideSprite(spriteRenderer); - } - } - - /** - * Fades the transparency of a sprite over a period of time. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param spriteRenderer The sprite to be modified - * @param targetAlpha The final required transparency value [0..1] - * @param duration The duration of the fade transition in seconds - */ - public static void FadeSprite(SpriteRenderer spriteRenderer, float targetAlpha, float duration) - { - FadeSprite(spriteRenderer, targetAlpha, duration, Vector2.zero); - } - - /** - * Fades the transparency of a sprite over a period of time, and applies a sliding motion to the sprite's position. - * The sprite starts at a position calculated by adding the current sprite position + the slide offset. - * The sprite then smoothly moves from this starting position to the original position of the sprite. - * Automatically adds a SpriteFader component to the sprite object to perform the transition. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param spriteRenderer The sprite to be modified - * @param targetAlpha The final required transparency value [0..1] - * @param duration The duration of the fade transition in seconds - * @param slideOffset Offset to the starting position for the slide effect. - */ - public static void FadeSprite(SpriteRenderer spriteRenderer, float targetAlpha, float duration, Vector2 slideOffset) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - Color color = spriteRenderer.color; - color.a = targetAlpha; - commandQueue.AddCommand(new Command.FadeSprite(spriteRenderer, color, duration, slideOffset)); - } - - /** - * Displays a button sprite object and sets the action callback method for the button. - * If no Collider2D already exists on the object, then a BoxCollider2D is automatically added. - * Use HideButton() to make the sprite invisible and non-clickable again. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param button The button component of the sprite object to be shown. - * @param buttonAction The Action delegate method to be called when the player clicks on the button - */ - public static void ShowButton(Button button, Action buttonAction) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.ShowButton(button, true, buttonAction)); - } - - /** - * Hides the button sprite and makes it stop behaving as a clickable button. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param spriteRenderer The sprite to be made non-clickable - */ - public static void HideButton(Button button) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.ShowButton(button, false, null)); - } - - /** - * Sets an animator trigger to change the animation state for an animated sprite. - * This is the primary method of controlling Unity animations from a Fungus command sequence. - * This method returns immediately but it queues an asynchronous command for later execution. - * @param animator The sprite to be made non-clickable - * @param triggerName Name of a trigger parameter in the animator controller - */ - public static void SetAnimatorTrigger(Animator animator, string triggerName) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.SetAnimatorTrigger(animator, triggerName)); - } - - #endregion - #region Audio Methods - - /** - * Plays game music using an audio clip. - * One music clip may be played at a time. - * @param musicClip The music clip to play - */ - public static void PlayMusic(AudioClip musicClip) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - MusicManager.GetInstance().PlayMusic(musicClip); - })); - } - - /** - * Stops playing game music. - */ - public static void StopMusic() - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - MusicManager.GetInstance().StopMusic(); - })); - } - - /** - * Sets the game music volume immediately. - * @param volume The new music volume value [0..1] - */ - public static void SetMusicVolume(float volume) - { - SetMusicVolume(volume, 0f); - } - - /** - * Fades the game music volume to required level over a period of time. - * @param volume The new music volume value [0..1] - * @param duration The length of time in seconds needed to complete the volume change. - */ - public static void SetMusicVolume(float volume, float duration) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - MusicManager.GetInstance().SetMusicVolume(volume, duration); - })); - } - - /** - * Plays a sound effect once. - * Multiple sound effects can be played at the same time. - * @param soundClip The sound effect clip to play - */ - public static void PlaySound(AudioClip soundClip) - { - PlaySound(soundClip, 1f); - } - - /** - * Plays a sound effect once, at the specified volume. - * Multiple sound effects can be played at the same time. - * @param soundClip The sound effect clip to play - * @param volume The volume level of the sound effect - */ - public static void PlaySound(AudioClip soundClip, float volume) - { - CommandQueue commandQueue = Game.GetInstance().commandQueue; - commandQueue.AddCommand(new Command.Call(delegate { - MusicManager.GetInstance().PlaySound(soundClip, volume); - })); - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/GameController.cs.meta b/Assets/Fungus/Scripts/GameController.cs.meta deleted file mode 100644 index b1cb2f05..00000000 --- a/Assets/Fungus/Scripts/GameController.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4341f88125d5c4fe1b941bd614ae342d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Fungus/Scripts/Room.cs b/Assets/Fungus/Scripts/Room.cs index 8067d081..32efa9d9 100644 --- a/Assets/Fungus/Scripts/Room.cs +++ b/Assets/Fungus/Scripts/Room.cs @@ -13,7 +13,7 @@ namespace Fungus * The OnEnter() method is called when the player enters the room. * The GameController base class provides easy access to all Fungus functionality. */ - public abstract class Room : GameController + public abstract class Room : UnityEngine.MonoBehaviour { string GetVisitVariableKey() { @@ -158,7 +158,7 @@ namespace Fungus // Rooms may have multiple child views and page. // It is the responsibility of the client room script to set the desired active view & page in the OnEnter method. - game.commandQueue.CallCommandMethod(game.activeRoom.gameObject, "OnEnter"); + // game.commandQueue.CallCommandMethod(game.activeRoom.gameObject, "OnEnter"); // Increment visit count for this Room int visitCount = GetVisitCount(); diff --git a/Assets/Fungus/Scripts/SceneLoader.cs b/Assets/Fungus/Scripts/SceneLoader.cs index f3c636de..9eb0b9f6 100644 --- a/Assets/Fungus/Scripts/SceneLoader.cs +++ b/Assets/Fungus/Scripts/SceneLoader.cs @@ -82,7 +82,7 @@ namespace Fungus Game game = Game.GetInstance(); if (game != null) { - Game.Save(); + // Game.Save(); } } diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index dd4583266be51b7a6ffc28ebb21c473d6cbe3fa7..2fd8b83fcbcee2eacf2de9d920215bee4acfa284 100644 GIT binary patch delta 3819 zcmZA3eNYtV9S88|2OJ#nh2!;31#$=i-ti_Po^Z-3m;f3*kr0eVj)8Cl!on(?e=E(L zvJLHiE>7C9)E<}}_&8d!T4SX5mRy!{lkI_yrGv53$qaj-Dd*$pfH&*!6u4t~JBDT> z-Od`Mvg}!@+is_%z>xiVwB&x%5LlaE93}nRmMeAG4oY28?6Q-shhIK?><}Xq%$KsV zlcjs7?14dhRf81xg*~wH^mzk43e21e$t4c=wztyX0-t{jdpGBhDXUQ77=rVI|3o{n*IZ_po@vZj42E;HFb_;jMj7zPXSbgm*5%q^rc7>ulx zT@;qAr9fNw9Lx(-_nn(6-!ZDo&BLsP+T4Sk z`=0T20O3z7go($b^j&~iN*TMPvege9?h)AHt;V%%n03AS z5##>n0R2EQL**G~cQ(3>W%#JW#JeF{j<5}k-N%WNTLWVo@g>Cd2lAwIVQsKl*nQdZ zV1qi#hlPAPTnltL7^_irw!wN}>H+PrahOw;D}b3cX{`|EhN;IZg85-C^z|t-ECx=< zs8|WiQlTAi9jqB9IxD$SF`zD2RsLGT1Z)U7<+q7@` z!ItIwJ7MZCTnlU*Ci*Hxev^4^e}1(#_XeyBrq22NKlipw=z`~AB{kaMC-G-mdSL3p zpTZ_}xxkeNEspKl+!a_KOkMbB_ZOb&?b!e70gnM)Picd6lePL`?NL8`M)%#@)oQHM z7I_}#fvJns+Ma!JSeL7Vnd+4sp1-(dD=(aTu??u6%qrN(Vla~XNqygsEISx8swQ*o z_O&+aGupnR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