|
@@ -34,7 +34,7 @@ public class PlayerController : MonoBehaviour
|
|
|
|
|
|
public GameObject DatePicker;
|
|
|
Camera camera;
|
|
|
- public Toggle projection;
|
|
|
+ //public Toggle projection;
|
|
|
|
|
|
|
|
|
//public GameObject LocationGameObject;
|
|
@@ -150,15 +150,6 @@ public class PlayerController : MonoBehaviour
|
|
|
ToggleDisappearance.interactable = false;
|
|
|
}
|
|
|
|
|
|
- if (projection.isOn)
|
|
|
- {
|
|
|
- camera.orthographic = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- camera.orthographic = false;
|
|
|
- }
|
|
|
-
|
|
|
if (users_load)
|
|
|
{
|
|
|
users_load = false;
|
|
@@ -427,34 +418,38 @@ public class PlayerController : MonoBehaviour
|
|
|
/// </summary>
|
|
|
public void MarkerMove()
|
|
|
{
|
|
|
+ if(users != null)
|
|
|
foreach (var u in users)
|
|
|
{
|
|
|
- if (u.Value.marker.activeSelf != u.Value.toggle.isOn) u.Value.marker.SetActive(u.Value.toggle.isOn);
|
|
|
-
|
|
|
- if (active_mode == Mode.RealTime && u.Value.toggle.isOn && !Workers.ContainsKey(u.Value.id))
|
|
|
+ if (u.Value != null)
|
|
|
{
|
|
|
- Debug.LogWarning($"send coord user {u.Value.id}");
|
|
|
- var index = company.locations_index[company.active_location];
|
|
|
- client.CoordinatesRequest(0, 0, 1, company.locations[index].id, u.Value.id);
|
|
|
+ if (u.Value.marker.activeSelf != u.Value.toggle.isOn) u.Value.marker.SetActive(u.Value.toggle.isOn);
|
|
|
|
|
|
- u.Value.toggle_user.SetActive(u.Value.online);
|
|
|
- }
|
|
|
+ if (active_mode == Mode.RealTime && u.Value.toggle.isOn && !Workers.ContainsKey(u.Value.id))
|
|
|
+ {
|
|
|
+ Debug.LogWarning($"send coord user {u.Value.id}");
|
|
|
+ var index = company.locations_index[company.active_location];
|
|
|
+ client.CoordinatesRequest(0, 0, 1, company.locations[index].id, u.Value.id);
|
|
|
|
|
|
- if (u.Value.toggle.isOn && Workers.ContainsKey(u.Value.id) && active_mode != Mode.Stop/*&& starting*/ /*&& end_send[m.value.acc_id]*/)
|
|
|
- {
|
|
|
- StartingAccPositiong(u.Value);
|
|
|
+ u.Value.toggle_user.SetActive(u.Value.online);
|
|
|
+ }
|
|
|
|
|
|
- if (active_mode == Mode.History && !Workers.Any())
|
|
|
+ if (u.Value.toggle.isOn && Workers.ContainsKey(u.Value.id) && active_mode != Mode.Stop/*&& starting*/ /*&& end_send[m.value.acc_id]*/)
|
|
|
{
|
|
|
- //var temp = Workers.Values.Max(v => v.Count);
|
|
|
- //if (m.i == temp - 1 && moving[moving.Keys.Last()].step >= 1f)
|
|
|
- //{
|
|
|
- StopProgress();
|
|
|
- //}
|
|
|
- //if (active_mode == Mode.RealTime && moving[moving.Keys.Last()].index == 1)
|
|
|
- //{
|
|
|
- // starting = false;
|
|
|
- //}
|
|
|
+ StartingAccPositiong(u.Value);
|
|
|
+
|
|
|
+ if (active_mode == Mode.History && !Workers.Any())
|
|
|
+ {
|
|
|
+ //var temp = Workers.Values.Max(v => v.Count);
|
|
|
+ //if (m.i == temp - 1 && moving[moving.Keys.Last()].step >= 1f)
|
|
|
+ //{
|
|
|
+ StopProgress();
|
|
|
+ //}
|
|
|
+ //if (active_mode == Mode.RealTime && moving[moving.Keys.Last()].index == 1)
|
|
|
+ //{
|
|
|
+ // starting = false;
|
|
|
+ //}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|