Commit 1a741171 authored by 18김민수's avatar 18김민수

Added Log-scale Slider (See Assets/Scenes/KevinWorkingScene)

parent d689c27e
This diff is collapsed.
fileFormatVersion: 2
guid: 933eee57fb3b6c14caeeb469b8cdb266
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LogScaleSlider : MonoBehaviour
{
[SerializeField]
Text text;
Scrollbar slider;
// Start is called before the first frame update
void Start()
{
slider = GetComponent<Scrollbar>();
}
public float GetLogScaleValue()
{
return (-1) * Mathf.Pow(10, slider.value * (-5)) + 1;
}
public void UpdateLogScaleText()
{
text.text = GetLogScaleValue() + "c";
}
}
fileFormatVersion: 2
guid: 3324966264de6184c9021ed0b258b7d7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment