Skip to content

Commit

Permalink
popup se il leap si disconnette
Browse files Browse the repository at this point in the history
  • Loading branch information
dvgniele committed Mar 2, 2021
1 parent 8eafe20 commit 189b949
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 25 deletions.
2 changes: 1 addition & 1 deletion MarcoSmiles/Assets/Own/Scenes/TrainingScene 1.unity
Original file line number Diff line number Diff line change
Expand Up @@ -6371,7 +6371,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1662408758
RectTransform:
m_ObjectHideFlags: 0
Expand Down
11 changes: 9 additions & 2 deletions MarcoSmiles/Assets/Own/Scripts/MS_LeapController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public class MS_LeapController : MonoBehaviour

bool connected = false;
bool notified = false;

bool prevState = false;
bool notConnectedShowed = true;

// Start is called before the first frame update
void Start()
Expand All @@ -32,6 +31,13 @@ void Start()
// Update is called once per frame
void Update()
{
if(controller.Devices.Count == 0 && !notConnectedShowed)
{
notified = false;
notConnectedShowed = true;
MS_LeapListener.Connected = false;
_GM.ShowConnectLeapPopup();
}

// ascolta ogni frame del leap motion
if (controller.Devices.Count > 0 && !connected)
Expand All @@ -43,6 +49,7 @@ void Update()
if (MS_LeapListener.Connected && !notified)
{
notified = true;
notConnectedShowed = false;
_GM.HideConnectLeapPopup();
}
}
Expand Down
15 changes: 0 additions & 15 deletions MarcoSmiles/Assets/Own/Scripts/TrainingScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,6 @@ private void DataSelector()

public async Task<bool> RemoveNote()
{
/*
Task delete = Task.Run(() =>
{
try
{
Task.WaitAny(FileUtils.DeleteRowsNote(currentNoteId));
return true;
}
catch { return false; }
});
return await Task.FromResult(true);
*/

await FileUtils.DeleteRowsNote(currentNoteId);
return true;
}
Expand Down
8 changes: 1 addition & 7 deletions MarcoSmiles/Assets/Own/Scripts/_GM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,6 @@ void Start()
}
void FixedUpdate()
{
StartCircleAnimation();



if (currSceneEnum == SceneEnum.Suonah)
{
if (isActive)
Expand Down Expand Up @@ -242,11 +238,9 @@ void FixedUpdate()
{
// Debug.Log(FileUtils.selectedDataset);


/*
if (LoadingCircle.activeSelf)
StartCircleAnimation();
*/


}
}
Expand Down

0 comments on commit 189b949

Please sign in to comment.