From a8f9a29490e458cca9e74bf7789bf2a8aae86c68 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 1 Jul 2014 15:10:06 +0100 Subject: [PATCH] Added Range property annotations. --- Assets/Fungus/Scripts/Dialog.cs | 5 +++++ Assets/Fungus/Scripts/GUIButton.cs | 1 + Assets/Fungus/Scripts/Game.cs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Assets/Fungus/Scripts/Dialog.cs b/Assets/Fungus/Scripts/Dialog.cs index 14d7fc4b..d73f7a53 100644 --- a/Assets/Fungus/Scripts/Dialog.cs +++ b/Assets/Fungus/Scripts/Dialog.cs @@ -168,6 +168,7 @@ namespace Fungus /** * Writing speed for say text in Characters Per Second. */ + [Range(0, 1000)] public int writingSpeed = 100; /** @@ -193,12 +194,14 @@ namespace Fungus /** * Number of buttons to display in the same row when showing multiple options */ + [Range(0, 10)] public int buttonsPerRow = 2; /** * Minimum width of each button as a fraction of the screen width [0..1]. * This is useful to create a column of buttons with matching width. */ + [Range(0, 1)] public float minButtonWidth = 0; /** @@ -209,6 +212,7 @@ namespace Fungus /** * Scale of character image, specified as a fraction of current screen height [0..1]. */ + [Range(0, 1)] public float imageScale = 0.25f; /** @@ -219,6 +223,7 @@ namespace Fungus /** * Scale of timer image, specified as a fraction of current screen height [0..1]. */ + [Range(0, 1)] public float timerScale = 0.2f; /** diff --git a/Assets/Fungus/Scripts/GUIButton.cs b/Assets/Fungus/Scripts/GUIButton.cs index c5544944..3140b007 100644 --- a/Assets/Fungus/Scripts/GUIButton.cs +++ b/Assets/Fungus/Scripts/GUIButton.cs @@ -15,6 +15,7 @@ namespace Fungus public Texture2D texture; /// Fraction of screen height (for resolution independent sizing). + [Range(0, 1)] public float verticalScale = 0.2f; /// Texture position on screen in localized screen coords ([0..1], [0..1]) diff --git a/Assets/Fungus/Scripts/Game.cs b/Assets/Fungus/Scripts/Game.cs index b058ae3e..72ad9a14 100644 --- a/Assets/Fungus/Scripts/Game.cs +++ b/Assets/Fungus/Scripts/Game.cs @@ -34,16 +34,19 @@ namespace Fungus /** * Time for fade transition to complete when moving to a different Room. */ + [Range(0,5)] public float roomFadeDuration = 1f; /** * Time for fade transition to complete when hiding/showing buttons. */ + [Range(0,5)] public float buttonFadeDuration = 0.25f; /** * Time which must elapse before buttons will automatically hide. */ + [Range(0, 60)] public float autoHideButtonDuration = 5f; /**