comparison Orchestland/Assets/LeapMotion/Scripts/Utils/KeyToggleEnabled.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 using System.Collections.Generic;
4
5 public class KeyToggleEnabled : MonoBehaviour {
6 public List<GameObject> targets;
7 public KeyCode toggle = KeyCode.T;
8
9 // Update is called once per frame
10 void Update () {
11 if (Input.GetKeyDown (toggle)) {
12 foreach (GameObject target in targets) {
13 target.SetActive(!target.activeSelf);
14 }
15 }
16 }
17 }