-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNavBar.cs
105 lines (81 loc) · 2.21 KB
/
NavBar.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NavBar : MonoBehaviour
{
public GameObject B1On;
public GameObject B1Off;
public GameObject B2On;
public GameObject B2Off;
public GameObject B3On;
public GameObject B3Off;
public GameObject MapScreen;
public GameObject OrdersScreen;
public GameObject ProfileScreen;
public GameObject SafetyWarning;
public GameObject Cam1;
public GameObject[] MapObj;
public GameObject LocationManager;
private void Start()
{
SafetyWarning.SetActive(true);
mapSelected();
}
public void mapSelected()
{
B1Off.SetActive(false);
B1On.SetActive(true);
B2Off.SetActive(true);
B2On.SetActive(false);
B3Off.SetActive(true);
B3On.SetActive(false);
MapScreen.SetActive(true);
OrdersScreen.SetActive(false);
ProfileScreen.SetActive(false);
Cam1.SetActive(false);
for (int i = 0; i < MapObj.Length; i++)
{
MapObj[i].SetActive(true);
}
}
public void ordersSelected()
{
B1Off.SetActive(true);
B1On.SetActive(false);
B2Off.SetActive(false);
B2On.SetActive(true);
B3Off.SetActive(true);
B3On.SetActive(false);
MapScreen.SetActive(false);
OrdersScreen.SetActive(true);
ProfileScreen.SetActive(false);
Cam1.SetActive(true);
if(LocationManager.activeSelf)
{
for (int i = 0; i < MapObj.Length; i++)
{
MapObj[i].SetActive(false);
}
}
}
public void profileSelected()
{
B1Off.SetActive(true);
B1On.SetActive(false);
B2Off.SetActive(true);
B2On.SetActive(false);
B3Off.SetActive(false);
B3On.SetActive(true);
MapScreen.SetActive(false);
OrdersScreen.SetActive(false);
ProfileScreen.SetActive(true);
Cam1.SetActive(true);
if(LocationManager.activeSelf)
{
for (int i = 0; i < MapObj.Length; i++)
{
MapObj[i].SetActive(false);
}
}
}
}