24 lines
396 B
C#
24 lines
396 B
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
using UnityEngine.UI;
|
|||
|
|
|
|||
|
|
public class SliderCol : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
Slider slider;
|
|||
|
|
|
|||
|
|
public float add;
|
|||
|
|
|
|||
|
|
// Start is called before the first frame update
|
|||
|
|
void Start()
|
|||
|
|
{
|
|||
|
|
slider = GetComponentInParent<Slider>();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void OnMouseDown()
|
|||
|
|
{
|
|||
|
|
slider.value += add;
|
|||
|
|
}
|
|||
|
|
}
|