Skip to content
Snippets Groups Projects
Commit be3a17ba authored by Guillaume Meinesz's avatar Guillaume Meinesz
Browse files

cheat code RAZ progression utilisateur

parent 2801b310
No related branches found
No related tags found
No related merge requests found
Showing with 415 additions and 287 deletions
......@@ -24,7 +24,6 @@ public class EvaluluScript_SendTracesFromHMSceneStart : MonoBehaviour
private string pathDirectoryArchiveAncien;
private string currentlySentFilePath = "";
private string currentlySentTemporaryFilePath = "";
public HM_PluginController hmPluginController;
private bool terminateSceneAFterTransfert = false;
public mainManager mM;
......@@ -73,13 +72,13 @@ public class EvaluluScript_SendTracesFromHMSceneStart : MonoBehaviour
{
foreach (string teacheraccount in successSynchroAccount)
{
//Debug.LogError("account in successSynchroAccount = " + account);
Debug.LogError("account in successSynchroAccount = " + teacheraccount);
List<HM_ChildUser> childUsers = HM_PluginController.GetAllActiveChildsOfTeacher(teacheraccount);
if (childUsers != null)
{
foreach (HM_ChildUser child in childUsers)
{
//Debug.Log("userIconID="+child.userIconID+ " loginCode="+ child.loginCode+ " userID="+ child.userID);
Debug.Log("userIconID="+child.userIconID+ " loginCode="+ child.loginCode+ " userID="+ child.userID);
//si besoin a c'est l'UUID qui est aussi renvoy par la fonction "GetMainUserID" (au o tu l'utilisais pour identifier les lves, permettra du coup de faire le lien)
foreach (string filePath in savedFilesWaitingToBeUploaded_temp)
{
......@@ -102,8 +101,8 @@ public class EvaluluScript_SendTracesFromHMSceneStart : MonoBehaviour
aaa.teachercode = teacherCode;
aaa.usericonID = child.userIconID.ToString();
aaa.usercode = logincodeuser;
//Debug.LogError("bingo");
//Debug.Log($"Fichier : {filePath}, teacherCode : {teacherCode}, userIconID : {usericonID}");
Debug.LogError("bingo");
Debug.Log($"Fichier : {filePath}, teacherCode : {teacherCode}, userIconID : {usericonID}");
savedFilesWaitingToBeUploaded.Add(aaa);
}
}
......
......@@ -244,7 +244,7 @@ public class GD_manager : MonoBehaviour
switch (mM.current_step)
{
case -1:
mM.texteCheat.text += "\npret";
//mM.texteCheat.text += "\npret";
bool uneImageExiste = mM.executeAsset(mM.i.pret, null, true);
mM.executeAsset(mM.i.pret, mM.flecheReadyDisplayed, false);
break;
......@@ -255,7 +255,7 @@ public class GD_manager : MonoBehaviour
}
if (!mM.sessionConsignebeenPlayed)
{
mM.texteCheat.text += " /lancement session";
mM.texteCheat.text += " /lancement session N°"+(mM.currentSession+1).ToString();
mM.sessionConsignebeenPlayed = true;
if(mM.executeAsset(mM.s.consigne, null, true))
{
......@@ -283,14 +283,14 @@ public class GD_manager : MonoBehaviour
if (!mM.epreuveConsignebeenPlayed)
{
//Debug.Log("on joue la consigne d'epreuve qui n'a encore jamais été jouée");
mM.texteCheat.text += " /Epreuve id=" + mM.e.id;
mM.texteCheat.text += " /Epreuve N°" + (mM.currentEpreuve + 1).ToString() + "/" + mM.s.epreuves.Count.ToString()+" id=" + mM.e.id;
mM.epreuveConsignebeenPlayed = true;
mM.executeAsset(mM.e.consigne, mM.playSteps,false); // consigne de l'épreuve (absente du déroulement)
}
else { playswitch = true; }
break;
case 2:
mM.texteCheat.text += " /Item id=" + mM.i.id + " type=" + mM.i.type;
mM.texteCheat.text += " /Item N°"+(mM.currentItem +1).ToString() + "/" + mM.e.items.Count.ToString() + " id=" + mM.i.id;
if (mM.executeAsset(mM.i.fond, null, true))
{
mM.posScript.currentlyInstanciatedprefabImagePrincipale.gameObject.SetActive(true);
......@@ -528,7 +528,7 @@ public class GD_manager : MonoBehaviour
}
Debug.Log(mM.current_step);
mM.texteCheat.text += "/" + mM.current_step;
//mM.texteCheat.text += "/" + mM.current_step;
mM.current_step++;
if (enditemToBeLaunched)
{
......
......@@ -7,7 +7,7 @@ public class GestionProgression : MonoBehaviour
{
public mainManager mM;
// Appeler cette fonction pour sauvegarder la progression
public void SauveProgression(int numeroSession3)
public void SauveProgression(int numeroSession3, bool forcezero = false)
{
// Crer un objet contenant les donnes sauvegarder, y compris le timestamp actuel
......@@ -25,6 +25,10 @@ public class GestionProgression : MonoBehaviour
{
dd.NumeroSession = numeroSession3;
}
if (forcezero)
{
dd.NumeroSession = 0;
}
}
}
if (!foundinside)
......
......@@ -81,7 +81,7 @@ public class NewSystemeDeTraces : MonoBehaviour
// Le fichier JSON existe, donc nous le lisons
jsonContents = File.ReadAllText(jsonFilePath);
mM.texteCheat.text += " un json existe deja length= " + jsonContents.Length;
//mM.texteCheat.text += " un json existe deja length= " + jsonContents.Length;
//Debug.Log("Contenu JSON existant : " + jsonContents);
}
else
......
......@@ -122,7 +122,7 @@ public class Positionnement : MonoBehaviour
float spriteHeight = imagePrincipaleSpriteRenderer.bounds.size.y;
// Obtenez la largeur du sprite
float spriteWidth = imagePrincipaleSpriteRenderer.bounds.size.x;
Debug.Log("spriteHeight=" + spriteHeight + "/ spriteWidth=" + spriteWidth);
//Debug.Log("spriteHeight=" + spriteHeight + "/ spriteWidth=" + spriteWidth);
float scaleFactorwidth = screenWidth / spriteWidth;
// Calculez le facteur d'chelle pour la hauteur
float scaleFactorHeight = (screenHeight * 0.5f) / spriteHeight;
......@@ -134,7 +134,7 @@ public class Positionnement : MonoBehaviour
Vector3 newPosition = new Vector3(0.0f, desiredYPosition, 1);
// Appliquez la nouvelle position
imagePrincipaleSpriteRenderer.transform.position = newPosition;
Debug.Log("scaleFactorHeight=" + scaleFactorHeight);
//Debug.Log("scaleFactorHeight=" + scaleFactorHeight);
imagePrincipaleSpriteRenderer.transform.localScale = new Vector3(scaleFactorHeight, scaleFactorHeight, 1.0f);
}
......@@ -248,7 +248,7 @@ public class Positionnement : MonoBehaviour
bt.boxcoll.size = bt.spriterenderer.bounds.size;
if (mM.e.modalite == "QCM" && (mM.posScript.currentlyInstanciatedprefabImagePrincipale == null || !mM.posScript.currentlyInstanciatedprefabImagePrincipale.gameObject.activeSelf))
{
Debug.Log("heeeeeeeeeeeeeeeeeeeerrrre longueurDeLenfiladeQCM=" + longueurDeLenfiladeQCM);
//Debug.Log("heeeeeeeeeeeeeeeeeeeerrrre longueurDeLenfiladeQCM=" + longueurDeLenfiladeQCM);
int multiplieurHeight = DetermineParite(indexBouton);
int multiplieurX = DetermineValeur(indexBouton);
spriteTransform.position = new Vector3(
......@@ -258,7 +258,7 @@ public class Positionnement : MonoBehaviour
}
else
{
Debug.Log("lllllllllllllll");
//Debug.Log("lllllllllllllll");
spriteTransform.position = new Vector3(
initialPosition.x + (spriteSpacingPercentage * screenWidth + spriteWidthBouton) * indexBouton,
initialPosition.y,
......
......@@ -17,20 +17,21 @@ public class QCM_manager : MonoBehaviour
switch (mM.current_step)
{
case -1:
mM.texteCheat.text += "\nPret";
//mM.texteCheat.text += "\nPret";
bool uneImageExiste = mM.executeAsset(mM.i.pret, null,true);
mM.executeAsset(mM.i.pret, mM.flecheReadyDisplayed,false);
break;
case 0:
Debug.Log("on destroy image principale");
//Debug.Log("on destroy image principale");
if (mM.posScript.currentlyInstanciatedprefabImagePrincipale != null)
{
Destroy(mM.posScript.currentlyInstanciatedprefabImagePrincipale.gameObject);
}
if (!mM.sessionConsignebeenPlayed)
{
mM.texteCheat.text += "\nSession";
//mM.texteCheat.text += "\nSession";
mM.sessionConsignebeenPlayed = true;
mM.texteCheat.text += " /lancement session N°" + (mM.currentSession+1).ToString();
if (mM.executeAsset(mM.s.consigne, null, true))
{
//Debug.Log("on refait apparaitre image principale de session");
......@@ -64,7 +65,7 @@ public class QCM_manager : MonoBehaviour
{
//Debug.Log("on joue la consigne d'epreuve qui n'a encore jamais été jouée");
mM.texteCheat.text += "\nEpreuve id=" + mM.e.id;
mM.texteCheat.text += "\nEpreuve N°"+(mM.currentEpreuve + 1).ToString() + "/" + mM.s.epreuves.Count.ToString() + " id=" + mM.e.id;
mM.epreuveConsignebeenPlayed = true;
if(mM.executeAsset(mM.e.consigne, mM.playSteps, false))
{
......@@ -77,7 +78,7 @@ public class QCM_manager : MonoBehaviour
break;
case 2:
mM.oreilleListen.SetActive(false);
mM.texteCheat.text += "\nItem id=" + mM.i.id + " type=" + mM.i.type;
mM.texteCheat.text += "\nItem N°"+(mM.currentItem+1).ToString() +"/"+mM.e.items.Count.ToString()+" id=" + mM.i.id + " type=" + mM.i.type;
if(mM.executeAsset(mM.i.fond, null, true))
{
mM.posScript.currentlyInstanciatedprefabImagePrincipale.gameObject.SetActive(true);
......@@ -207,7 +208,7 @@ public class QCM_manager : MonoBehaviour
}
mM.current_step++;
mM.texteCheat.text += "/" + mM.current_step;
//mM.texteCheat.text += "/" + mM.current_step;
if (enditemToBeLaunched)
{
playswitch = false;
......
......@@ -123,6 +123,140 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &139938495
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 139938496}
- component: {fileID: 139938498}
- component: {fileID: 139938497}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &139938496
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 139938495}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1495739194}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &139938497
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 139938495}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &139938498
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 139938495}
m_CullTransparentMesh: 1
--- !u!1 &170093758
GameObject:
m_ObjectHideFlags: 0
......@@ -308,6 +442,7 @@ RectTransform:
- {fileID: 1277173682}
- {fileID: 834236341}
- {fileID: 1079179181}
- {fileID: 1495739194}
m_Father: {fileID: 1312748374}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
......@@ -501,7 +636,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 34.45
m_fontSize: 38.1
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
......@@ -4312,7 +4447,7 @@ RectTransform:
m_Children: []
m_Father: {fileID: 234776228}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.55, y: 0.5}
m_AnchorMin: {x: 0.55, y: 0.45}
m_AnchorMax: {x: 0.95, y: 0.85}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
......@@ -4364,7 +4499,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 37.15
m_fontSize: 37.7
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
......@@ -4523,6 +4658,7 @@ MonoBehaviour:
oreilleListenScript: {fileID: 532516272}
gestionProg: {fileID: 761270584}
clefPourSauvegardeUtilisateur:
boutonDeconnexionText: {fileID: 1304225518}
texteFinSession: {fileID: 2130757248}
gameObjFin: {fileID: 234776227}
boutonSessionSuivante: {fileID: 834236340}
......@@ -5283,7 +5419,7 @@ GameObject:
- component: {fileID: 1304225519}
- component: {fileID: 1304225518}
m_Layer: 5
m_Name: Text (TMP)
m_Name: TextMesh_buttonDeconnexion
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -5357,7 +5493,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 39.35
m_fontSize: 42.45
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
......@@ -5611,7 +5747,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 34.4
m_fontSize: 38
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
......@@ -5692,6 +5828,139 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1495739193
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1495739194}
- component: {fileID: 1495739197}
- component: {fileID: 1495739196}
- component: {fileID: 1495739195}
m_Layer: 5
m_Name: ButtonRAZPlayerPrefForThisUser
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1495739194
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1495739193}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 139938496}
m_Father: {fileID: 234776228}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.85}
m_AnchorMax: {x: 0.15, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1495739195
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1495739193}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1495739196}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 761270576}
m_TargetAssemblyTypeName: mainManager, Assembly-CSharp
m_MethodName: boutonRAZPlayerprefsForthisuserClicked
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1495739196
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1495739193}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.011764706}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1495739197
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1495739193}
m_CullTransparentMesh: 1
--- !u!1 &1511890672
GameObject:
m_ObjectHideFlags: 0
......
......@@ -8,12 +8,12 @@ public class SplashScreenScript : MonoBehaviour
void Start()
{
timeElapsed = 0.0f;
timeToElapseBeforeNextScene = 1.0f;
timeToElapseBeforeNextScene = 0.5f;
Debug.LogError("splashscren");
//Session.saveNewTraces(updateVersionLuciole(), "S_SPlashScreen","Nav_Scenes","Ouverture");
}
private float timeElapsed = 0.0f;
public float timeToElapseBeforeNextScene = 1.0f;
public float timeToElapseBeforeNextScene = 0.5f;
public static bool mode_Plugin_HM = true;// mode plugin Humansmatter
[SerializeField] public string version_text;
......
......@@ -1309,7 +1309,7 @@ public class HM_PluginController : MonoBehaviour
public static void UploadTrace(string fileURL, System.Action<int, string> callback, string teacherCode = null, string userIconId = null, string userLoginCode = null)
{
Debug.Log("UploadTrace");
Debug.Log("UploadTrace teacherCode="+ teacherCode+ " userLoginCode="+ userLoginCode);
HM_Scripts.pluginController.StartPlugin();
HM_ReturnInfo returnInfo = new HM_ReturnInfo();
......
......@@ -67,7 +67,7 @@ public class mainManager : MonoBehaviour
// Vérifier si la clé existe dans le dictionnaire
clefPourSauvegardeUtilisateur = "gm2023";
clefPourSauvegardeUtilisateur = "gm2024E";
if (HM_DataController.currentTeacherAccount != null && HM_DataController.currentChildUser!=null)
{
......@@ -100,6 +100,10 @@ public class mainManager : MonoBehaviour
s = jsonStructureScript.data.sessions[currentSession];
currentEpreuve = s.epreuves.Count - 1;
e = s.epreuves[currentEpreuve];
if (e.nbItemsMax == 0 && e.items != null)
{
e.nbItemsMax = e.items.Count;
}
currentItem = e.items.Count - 1;
i = e.items[currentItem];
ouvrirMenu(false);
......@@ -110,6 +114,25 @@ public class mainManager : MonoBehaviour
}
}
private int compteurdeclickOnBoutonRAZ = 0;
public TextMeshProUGUI boutonDeconnexionText;
private bool deconnexionPlusRAZ;
public void boutonRAZPlayerprefsForthisuserClicked()
{
compteurdeclickOnBoutonRAZ++;
if (compteurdeclickOnBoutonRAZ >= 15 && compteurdeclickOnBoutonRAZ<20)
{
deconnexionPlusRAZ = true;
boutonDeconnexionText.text = "Déconnecter + RAZ progression";
boutonDeconnexion.SetActive(true);
}
else if (compteurdeclickOnBoutonRAZ >= 20)
{
deconnexionPlusRAZ = false;
boutonDeconnexionText.text = "Déconnecter l'utilisateur sans RAZ progression";
}
}
private void resetClasse()
{
actionUtilisateurStartTimeItem = 0.0f;
......@@ -266,7 +289,7 @@ public class mainManager : MonoBehaviour
{
if(fromcode || (!fromcode && !gameObjFin.activeSelf))
{
Debug.Log("flecheReadyBeenClicked");
//Debug.Log("flecheReadyBeenClicked");
playerTurn = false;
playSteps();
}
......@@ -293,6 +316,10 @@ public class mainManager : MonoBehaviour
s = jsonStructureScript.data.sessions[currentSession];
e = s.epreuves[currentEpreuve];
if (e.nbItemsMax == 0 && e.items != null)
{
e.nbItemsMax = e.items.Count;
}
if (!epreuveitemscurrentSet)
{
......@@ -309,11 +336,7 @@ public class mainManager : MonoBehaviour
epreuvesitemsCurrent = ShuffleList(epreuvesitemsCurrent);
}
epreuveitemscurrentSet = true;
if (e.nbItemsMax == 0)
{
e.nbItemsMax = e.items.Count;
}
}
......@@ -352,22 +375,26 @@ public class mainManager : MonoBehaviour
public void endItem()
{
Debug.Log("endItem");
if (posScript.currentlyInstanciatedImageEpreuveCentered != null)
{
Destroy(posScript.currentlyInstanciatedImageEpreuveCentered.gameObject);
}
Resources.UnloadUnusedAssets();
if (epreuvesitemsCurrent == null || (currentItem >= epreuvesitemsCurrent.Count - 1) ||(currentItem>=e.nbItemsMax-1) )
if (epreuvesitemsCurrent == null || (epreuvesitemsCurrent!=null && currentItem >= epreuvesitemsCurrent.Count - 1) ||(e!=null && currentItem>=e.nbItemsMax-1) )
{
Debug.Log("pas d'autre item dans cette epreuve currentItem=" + currentItem + " epreuvesitemsCurrent.Count= " + epreuvesitemsCurrent.Count);
// pas d'autre liste d'items dans cette epreuve
// on regarde s'il y a une autre epreuve dans la m�me session � lancer
if (currentEpreuve >= s.epreuves.Count - 1)
if (s!=null && currentEpreuve >= s.epreuves.Count - 1)
{
//pas d'autre epreuve dans cette session, on clot la session
Debug.Log("pas d'autre epreuve dans cette session, on clot la session currentEpreuve="+ currentEpreuve+ " s.epreuves.Count="+ s.epreuves.Count);
ouvrirMenu(true);
}
else
{
Debug.Log("il y a une autre epreuve dans cette session, on la lance");
currentItem = 0;
currentEpreuve++;
epreuveConsignebeenPlayed = false;
......@@ -380,7 +407,7 @@ public class mainManager : MonoBehaviour
else
{
// il y a une autre liste d'items dans cette epreuve, on la charge
//Debug.LogError("reinit with new item");
Debug.LogError("reinit with new item");
currentItem++;
i = epreuvesitemsCurrent[currentItem];
//Debug.Log("i=" + i+ " currentItem="+ currentItem+ " current_step="+ current_step);
......@@ -397,11 +424,11 @@ public class mainManager : MonoBehaviour
if(current_step >= 5)
{
actionUtilisateurStartTimeItem_Reveil = actionUtilisateurStartTimeItem = Time.time;
texteCheat.text += "/GOPLAY";
//texteCheat.text += "/GOPLAY";
}
else
{
texteCheat.text += "/GOINTERACT";
//texteCheat.text += "/GOINTERACT";
}
}
......@@ -518,7 +545,7 @@ public class mainManager : MonoBehaviour
public void makeEachChoiceClignoteOneAfterTheOther()
{
Debug.Log("makeEachChoiceClignoteOneAfterTheOther");
//Debug.Log("makeEachChoiceClignoteOneAfterTheOther");
if (currentChoix > 0)
{
list_choix_associed_with_prefabs[currentChoix - 1].boutonqcmAssocied.stopClignote();
......@@ -526,7 +553,7 @@ public class mainManager : MonoBehaviour
if (currentChoix >= list_choix_associed_with_prefabs.Count)
{
Debug.Log("all choix were read");
//Debug.Log("all choix were read");
currentChoix = 0;
playSteps();
}
......@@ -657,50 +684,59 @@ public class mainManager : MonoBehaviour
Debug.Log("ouvrirMenu");
boutonDeconnexion.SetActive(false);
boutonSessionSuivante.SetActive(false);
if (findesession)
{
boutonSessionEnCours.SetActive(false);
}
else
{
int sessionActuelle = currentSession + 1;
BoutonsessionActuelleTexte.text = "Retour session en cours " + sessionActuelle.ToString() + "/" + jsonStructureScript.data.sessions.Count.ToString();
infoSessionItemEnCours.text = "Session\nN°"+sessionActuelle.ToString() + "/" + jsonStructureScript.data.sessions.Count.ToString();
compteurdeclickOnBoutonRAZ = 0;
boutonDeconnexionText.text = "Déconnecter l'utilisateur";
deconnexionPlusRAZ = false;
int sessionActuelle = currentSession + 1;
BoutonsessionActuelleTexte.text = "Retour session en cours " + sessionActuelle.ToString() + "/" + jsonStructureScript.data.sessions.Count.ToString();
infoSessionItemEnCours.text = "Session\nN°" + sessionActuelle.ToString() + "/" + jsonStructureScript.data.sessions.Count.ToString();
int nbItemsPasses = 0;
bool nbitempassesReached = false;
int nbItemsTotauxDansCetteSession = 0;
int nbItemsPasses = 0;
bool nbitempassesReached = false;
int nbItemsTotauxDansCetteSession = 0;
foreach (Epreuve epp in s.epreuves)
foreach (Epreuve epp in s.epreuves)
{
foreach (EpreuveItem eii in epp.items)
{
foreach (EpreuveItem eii in epp.items)
{
if (!nbitempassesReached)
{
nbItemsPasses++;
}
nbItemsTotauxDansCetteSession++;
if (eii == i)
{
nbitempassesReached = true;
}
if (!nbitempassesReached)
{
nbItemsPasses++;
}
nbItemsTotauxDansCetteSession++;
if (eii == i)
{
nbitempassesReached = true;
}
}
int maxsession = jsonStructureScript.data.sessions.Count - 1;
int maxepreuve = jsonStructureScript.data.sessions[maxsession].epreuves.Count-1;
int maxitem = jsonStructureScript.data.sessions[maxsession].epreuves[maxepreuve].items.Count-1;
}
int maxsession = jsonStructureScript.data.sessions.Count - 1;
int maxepreuve = jsonStructureScript.data.sessions[maxsession].epreuves.Count - 1;
int maxitem = jsonStructureScript.data.sessions[maxsession].epreuves[maxepreuve].items.Count - 1;
Debug.Log("nbItemsPasses = " + nbItemsPasses + " nbItemsTotauxDansCetteSession=" + nbItemsTotauxDansCetteSession + " i.id=" + i.id+" e.id="+e.id);
infoSessionItemEnCours.text += "\n\nQuestion\nN°" + nbItemsPasses.ToString() + "/" + nbItemsTotauxDansCetteSession.ToString();
if (i == jsonStructureScript.data.sessions[maxsession].epreuves[maxepreuve].items[maxitem])
{
infoSessionItemEnCours.text += "\n\nFIN";
}
Debug.Log("nbItemsPasses = " + nbItemsPasses + " nbItemsTotauxDansCetteSession=" + nbItemsTotauxDansCetteSession + " i.id=" + i.id + " e.id=" + e.id);
infoSessionItemEnCours.text += "\n\nQuestion\nN°" + nbItemsPasses.ToString() + "/" + nbItemsTotauxDansCetteSession.ToString();
if (i == jsonStructureScript.data.sessions[maxsession].epreuves[maxepreuve].items[maxitem])
{
infoSessionItemEnCours.text += "\n\nFIN d'EVALULU";
}
else if (findesession)
{
infoSessionItemEnCours.text += "\n\nFIN de session N°"+sessionActuelle.ToString() + "/" + jsonStructureScript.data.sessions.Count.ToString();
}
if (findesession)
{
boutonSessionEnCours.SetActive(false);
}
else
{
boutonSessionEnCours.SetActive(true);
}
gameObjFin.SetActive(true);
......@@ -712,7 +748,6 @@ public class mainManager : MonoBehaviour
gestionProg.SauveProgression(futuresession);
texteFinSession.text = "Fin de session. Envoi des traces au serveur en cours...";
newSystemeDeTraces.sendThisUserTracesToHMPlugin(true);
}
else
{
......@@ -773,9 +808,15 @@ public class mainManager : MonoBehaviour
public IEnumerator terminateScene()
{
if (deconnexionPlusRAZ)
{
gestionProg.SauveProgression(0, true);
}
Time.timeScale = 1.0f;
Debug.Log("terminateScene");
yield return new WaitForSecondsRealtime(1.0f);
texteFinSession.text = "Deconnexion en cours";
yield return new WaitForSecondsRealtime(1.5f);
SceneManager.LoadScene("Scenes/SplashScreen");
}
......
......@@ -14,7 +14,4 @@ EditorBuildSettings:
- enabled: 1
path: Assets/Scenes/MainScene.unity
guid: af50cb8e93ed4675807e50f4641fc9b9
- enabled: 1
path: Assets/Scenes/FinScreen.unity
guid: 1e69761888eb64842a76c10483e2cf60
m_configObjects: {}
......@@ -48,6 +48,7 @@ PlayerSettings:
defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0
m_ActiveColorSpace: 1
unsupportedMSAAFallback: 0
m_SpriteBatchVertexThreshold: 300
m_MTRendering: 1
mipStripping: 0
......@@ -135,7 +136,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 1.11
bundleVersion: 1.12
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
......@@ -147,6 +148,7 @@ PlayerSettings:
isWsaHolographicRemotingEnabled: 0
enableFrameTimingStats: 0
enableOpenGLProfilerGPURecorders: 1
allowHDRDisplaySupport: 0
useHDRDisplay: 0
hdrBitDepth: 0
m_ColorGamuts: 00000000
......@@ -164,7 +166,7 @@ PlayerSettings:
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 1
AndroidBundleVersionCode: 3
AndroidBundleVersionCode: 4
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
......@@ -459,7 +461,7 @@ PlayerSettings:
switchSocketConcurrencyLimit: 14
switchScreenResolutionBehavior: 2
switchUseCPUProfiler: 0
switchUseGOLDLinker: 0
switchEnableFileSystemTrace: 0
switchLTOSetting: 0
switchApplicationID: 0x01004b9000490000
switchNSODependencies:
......@@ -589,7 +591,6 @@ PlayerSettings:
switchSocketBufferEfficiency: 4
switchSocketInitializeEnabled: 1
switchNetworkInterfaceManagerInitializeEnabled: 1
switchPlayerConnectionEnabled: 1
switchUseNewStyleFilepaths: 0
switchUseLegacyFmodPriorities: 0
switchUseMicroSleepForYield: 1
......
......@@ -27,10 +27,10 @@ EditorUserSettings:
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
flags: 0
RecentlyUsedSceneGuid-7:
value: 52045152560d5d025858542140750e44404f4d2b74797431292b1f66b1e5373c
value: 025701560657515e545d0926447508454e474f2f797820647b7d4c35e1b93661
flags: 0
RecentlyUsedSceneGuid-8:
value: 025701560657515e545d0926447508454e474f2f797820647b7d4c35e1b93661
value: 52045152560d5d025858542140750e44404f4d2b74797431292b1f66b1e5373c
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment