22 lines
495 B
C#
Executable File
22 lines
495 B
C#
Executable File
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class RightController : MonoBehaviour {
|
|
public GameObject banana;
|
|
public GameObject viveController;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
GetComponent<ViewFrustrumTrigger>().LeaveView += toggleBanana;
|
|
}
|
|
|
|
void toggleBanana() {
|
|
banana.SetActive(!banana.activeSelf);
|
|
viveController.SetActive(!viveController.activeSelf);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
}
|
|
}
|