Mercurial > hg > Game > Games
comparison Orchestland/Assets/LeapMotion/Widgets/Scripts/DemoScripts/SliderDemoGraphics.cs @ 1:f7675884f2a1
Add Orchestland project
author | Daiki OYAKAWA <e135764@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2015 23:09:20 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:347d21cdfc22 | 1:f7675884f2a1 |
---|---|
1 using UnityEngine; | |
2 using System.Collections; | |
3 | |
4 public class SliderDemoGraphics : MonoBehaviour | |
5 { | |
6 public void SetActive(bool status) | |
7 { | |
8 Renderer[] renderers = GetComponentsInChildren<Renderer>(); | |
9 foreach (Renderer renderer in renderers) | |
10 { | |
11 renderer.enabled = status; | |
12 } | |
13 } | |
14 | |
15 public void SetBloomGain(float gain) | |
16 { | |
17 Renderer[] renderers = GetComponentsInChildren<Renderer>(); | |
18 foreach (Renderer renderer in renderers) | |
19 { | |
20 renderer.material.SetFloat("_Gain", gain); | |
21 } | |
22 } | |
23 | |
24 public void SetColor(Color color) | |
25 { | |
26 Renderer[] renderers = GetComponentsInChildren<Renderer>(); | |
27 foreach (Renderer renderer in renderers) | |
28 { | |
29 renderer.material.color = color; | |
30 } | |
31 } | |
32 } |