-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcameracode.cs
62 lines (49 loc) · 1.33 KB
/
cameracode.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class cameracode : maincode
{
public Camera cencam1;
public Camera leftcam1;
public Camera rightcam1;
public Camera cencam2;
public Camera leftcam2;
public Camera rightcam2;
/* GameObject leftcam1;
GameObject rightcam1;
GameObject cencam2;
GameObject leftcam2;
GameObject rightcam2;*/
// Use this for initialization
void Start()
{
/* cencam1 = GameObject.FindWithTag("cen1");
leftcam1 = GameObject.FindWithTag("left1");
rightcam1 = GameObject.FindWithTag("right1");
cencam2 = GameObject.FindWithTag("cen2");
leftcam2 = GameObject.FindWithTag("left2");
rightcam2 = GameObject.FindWithTag("right2");*/
}
// Update is called once per frame
void FixedUpdate()
{
if (WIN)
{
cencam1.depth = 0;
leftcam1.depth = 0;
rightcam1.depth = 0;
cencam2.depth = 1;
leftcam2.depth = 1;
rightcam2.depth = 1;
}
else
{
cencam1.depth = 1;
leftcam1.depth = 1;
rightcam1.depth = 1;
cencam2.depth = 0;
leftcam2.depth = 0;
rightcam2.depth = 0;
}
}
}