Пример #1
0
 /// <param name="startPos">The bar's start position</param>
 /// <param name="endPos">The bar's end position</param>
 /// <param name="bar">The bar's script</param>
 /// <param name="rectTransform">The bars rectTransform</param>
 /// <param name="scriptToMonitor">The script to monitor</param>
 /// <param name="currentValue">The value the bar is monitoring</param>
 /// <param name="minValue">The minumum value of the range</param>
 /// <param name="maxValue">The maximum value of the range</param>
 /// <param name="canvasGroup">The object's canvas group</param>
 public ValueState(Vector3 startPos, Vector3 endPos, SAOBar bar, RectTransform rectTransform, MonoBehaviour scriptToMonitor, FieldInfo currentValue, FieldInfo minValue, CanvasGroup canvasGroup, bool useFill, Image fillImage)
     : base(startPos, endPos, bar, rectTransform, scriptToMonitor, canvasGroup)
 {
     this.currentValue = currentValue;
     this.minValue = minValue;
     this.maxValue = typeof(SAOBar).GetField("fixedMaxVal");
     this.fillImage = fillImage;
     this.useFill = useFill;
 }
Пример #2
0
 /// <param name="startPos">The bar's start position</param>
 /// <param name="endPos">The bar's end position</param>
 /// <param name="bar">The bar's script</param>
 /// <param name="rectTransform">The bar's rectTransform</param>
 /// <param name="scriptToMonitor">The script to monitor</param>
 /// <param name="canvasGroup">The bar's canvas group</param>
 public Bar(Vector3 startPos, Vector3 endPos, SAOBar bar, RectTransform rectTransform, MonoBehaviour scriptToMonitor, CanvasGroup canvasGroup)
 {
     this.startPos = startPos;
     this.endPos = endPos;
     this.bar = bar;
     this.rectTransform = rectTransform;
     this.progressing = false;
     this.scriptToMonitor = scriptToMonitor;
     this.canvasGroup = canvasGroup;
 }
Пример #3
0
    /// <param name="startPos">The bar's start position</param>
    /// <param name="endPos">The bar's end position</param>
    /// <param name="bar">The bar's script</param>
    /// <param name="scriptToMonitor">The script to monitor</param>
    /// <param name="rectTransform">The bars rectTransform</param>
    /// <param name="time">The time it takes for the bar to process</param>
    /// <param name="canvasGroup">The object's canvas group</param>
    public TimeState(Vector3 startPos, Vector3 endPos, SAOBar bar, MonoBehaviour scriptToMonitor, RectTransform rectTransform, FieldInfo time, CanvasGroup canvasGroup)
        : base(startPos, endPos, bar, rectTransform, scriptToMonitor, canvasGroup)
    {
        this.castTime = time;

        if (bar.startAtEnd)
        {
            rectTransform.position = endPos;
        }
    }
Пример #4
0
    public void OnEnable()
    {
        myScript = (SAOBar)target;

        directionIndex = serializedObject.FindProperty("directionIndex");

        timeIndex = serializedObject.FindProperty("timeIndex");
        autoReset = serializedObject.FindProperty("autoReset");
        startAtEnd = serializedObject.FindProperty("startAtEnd");

        minIndex = serializedObject.FindProperty("minIndex");
        maxIndex = serializedObject.FindProperty("maxIndex");
        currentIndex = serializedObject.FindProperty("currentIndex");
        enableLerp = serializedObject.FindProperty("enableLerp");
        enableFade = serializedObject.FindProperty("enableFade");
        fadeTime = serializedObject.FindProperty("fadeTime");
        useFill = serializedObject.FindProperty("useFill");

        toggleTime = serializedObject.FindProperty("toggleTime");
    }