Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class GUIController : MonoBehaviour
- {
- private CameraController CamController;
- void Start()
- {
- CamController = GetComponent<CameraController>();
- }
- void OnEnable()
- {
- GUIButton.ButtonCallEvent += ButtonCall;
- }
- void OnDisable()
- {
- GUIButton.ButtonCallEvent -= ButtonCall;
- }
- void ButtonCall(int id)
- {
- switch (id)
- {
- case 1:
- CamController.SetCamera(1);
- break;
- case 2:
- CamController.SetCamera(1);
- break;
- case 3:
- CamController.SetCamera(3);
- break;
- case 4:
- CamController.SetCamera(2);
- break;
- case 5:
- CamController.SetCamera(0);
- break;
- case 6:
- CamController.SetCamera(4);
- break;
- case 7:
- Application.Quit();
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment