Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (9)
Showing
with 1494 additions and 241 deletions
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &625262611286937654
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7880584362641886927}
- component: {fileID: 114736490466060796}
m_Layer: 0
m_Name: Runner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7880584362641886927
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 625262611286937654}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 117.85736, y: 2.7792358, z: 82.664764}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 7450415508252682683}
- {fileID: 8674158381984612206}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114736490466060796
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 625262611286937654}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cf1ed6e0202793488b285ce66b95cc8, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &915889190875002457
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8674158381984612206}
- component: {fileID: 1774386687331026366}
- component: {fileID: 9149670456554055795}
- component: {fileID: 8730312896995346045}
m_Layer: 0
m_Name: Cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8674158381984612206
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 915889190875002457}
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_Children: []
m_Father: {fileID: 7880584362641886927}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1774386687331026366
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 915889190875002457}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &9149670456554055795
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 915889190875002457}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 24f0563fef1133141bb3fbf8d396a44b, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!136 &8730312896995346045
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 915889190875002457}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!1 &7386495333654814808
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7450415508252682683}
- component: {fileID: 3481524135186394163}
- component: {fileID: 331940685426315474}
- component: {fileID: 5146914991577904448}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7450415508252682683
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7386495333654814808}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.274, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7880584362641886927}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3481524135186394163
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7386495333654814808}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &331940685426315474
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7386495333654814808}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 3bcf7eea616b30749a4e57ca3684feb3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!135 &5146914991577904448
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7386495333654814808}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
fileFormatVersion: 2
guid: 4256cfb91b73ae34aab9be42e6a067de
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections.Generic;
using UnityEngine;
public class Runners : MonoBehaviour
{
public float speed = 10f;
private Transform target;
private int waypointIndex = 0;
void Start()
{
target = WaypointsFactory.getInstance().getWp()[0];
float vitesse = (float.Parse(RunnersFactory.getInstance().getRandom().Next(75, 125).ToString()) / 100f) * 10f;
speed = vitesse;
}
private void Update()
{
Vector3 dir = target.position - transform.position;
transform.Translate(dir.normalized * speed * Time.deltaTime, Space.World);
if (Vector3.Distance(transform.position, target.position) <= 0.3f) //Marge d'erreur
{
GetNextWaypoint();
}
}
private void GetNextWaypoint()
{
if (waypointIndex >= WaypointsFactory.getInstance().getWp().Count - 1)
{
Destroy(gameObject);
return;
}
waypointIndex++;
target = WaypointsFactory.getInstance().getWp()[waypointIndex];
}
}
fileFormatVersion: 2
guid: 0cf1ed6e0202793488b285ce66b95cc8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RunnersFactory : MonoBehaviour
{
public int nbJoueur;
public Transform parent;
public Runners copy;
private System.Random rdn;
private static RunnersFactory instance;
void Start()
{
instance = this;
rdn = new System.Random();
for (int i = 0; i<nbJoueur; i++)
{
Instantiate(copy,
new Vector3(WaypointsFactory.getInstance().getWp()[0].transform.position.x,
WaypointsFactory.getInstance().getWp()[0].transform.position.y,
WaypointsFactory.getInstance().getWp()[0].transform.position.z),
new Quaternion(0, 0, 0, 0), parent);
}
}
public System.Random getRandom()
{
return rdn;
}
public static RunnersFactory getInstance()
{
return instance;
}
}
fileFormatVersion: 2
guid: 7e94988962f28d44cb28d67668b8f1ad
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -1278,6 +1278,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2049136973}
- component: {fileID: 2049136974}
- component: {fileID: 2049136972}
m_Layer: 5
m_Name: SceneChanger
......@@ -1317,3 +1318,15 @@ RectTransform:
m_AnchoredPosition: {x: 458, y: 174.5}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2049136974
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2049136971}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a7edb75851d32e34d95d4cab1584002c, type: 3}
m_Name:
m_EditorClassIdentifier:
......@@ -1434,6 +1434,52 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1440548237}
m_CullTransparentMesh: 0
--- !u!1 &1468520958
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1468520960}
- component: {fileID: 1468520959}
m_Layer: 0
m_Name: Sportifs
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1468520959
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1468520958}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7e94988962f28d44cb28d67668b8f1ad, type: 3}
m_Name:
m_EditorClassIdentifier:
nbJoueur: 25
parent: {fileID: 1468520960}
copy: {fileID: 114736490466060796, guid: 4256cfb91b73ae34aab9be42e6a067de, type: 3}
--- !u!4 &1468520960
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1468520958}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 117.85736, y: 2.7792358, z: 82.664764}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1756448748
GameObject:
m_ObjectHideFlags: 0
......
......@@ -125,7 +125,7 @@ GameObject:
- component: {fileID: 31888323}
- component: {fileID: 31888322}
m_Layer: 5
m_Name: Button (1)
m_Name: ButtonAppear
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -148,8 +148,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -60}
m_SizeDelta: {x: 160, y: 53.64884}
m_AnchoredPosition: {x: -0.000015259, y: -43}
m_SizeDelta: {x: 254.77808, y: 128.67554}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &31888322
MonoBehaviour:
......@@ -202,6 +202,17 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 976072095}
m_MethodName: changeButtonsProperty
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 &31888323
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -1409,6 +1420,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
Canvas: {fileID: 1135662969}
Button: {fileID: 31888320}
--- !u!4 &976072096
Transform:
m_ObjectHideFlags: 0
......@@ -2344,7 +2356,9 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Button
m_text: 'Appear
'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
......@@ -2413,9 +2427,9 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 1834486501}
characterCount: 6
characterCount: 7
spriteCount: 0
spaceCount: 0
spaceCount: 1
wordCount: 1
linkCount: 0
lineCount: 1
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ExitScene : MonoBehaviour
{
// Start is called before the first frame update
public void Exit()
{
Application.Quit();
}
}
fileFormatVersion: 2
guid: a7edb75851d32e34d95d4cab1584002c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mapbox.Unity.Map;
using Mapbox.Examples;
......
......@@ -8,7 +8,7 @@ public class MenuToggle : MonoBehaviour
{
public GameObject Canvas;
public GameObject Button;
void Start()
{
Canvas.gameObject.SetActive(false);
......@@ -17,6 +17,11 @@ public class MenuToggle : MonoBehaviour
{
Canvas.gameObject.SetActive(true);
}
public void changeButtonsProperty()
{
Button.gameObject.SetActive(false);
}
}
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System;
using UnityEngine;
using Mapbox.Utils;
public class RouteTracer : MonoBehaviour
{
......@@ -51,8 +52,15 @@ public class RouteTracer : MonoBehaviour
DrawLine(objA.transform.position, objB.transform.position, Color.cyan, 1f);
}
//Recalculer les position relative entre les 2 objets
GameObject.Find("Player").transform.position =
new Vector3(
(float)((GameObject.FindGameObjectWithTag("start_wp").transform.position.x + GameObject.FindGameObjectWithTag("end_wp").transform.position.x) / 2d),
GameObject.Find("Player").transform.position.y,
(float)((GameObject.FindGameObjectWithTag("start_wp").transform.position.z + GameObject.FindGameObjectWithTag("end_wp").transform.position.z) / 2d)
);
GameObject.Find("Sportifs").GetComponent<RunnersFactory>().enabled = true;
}
void DrawLine(Vector3 start, Vector3 end, Color color, float width)
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneChanger : MonoBehaviour
{
public void LoadScene(string sceneName)
{
SceneManager.LoadScene(sceneName);
}
}
fileFormatVersion: 2
guid: d275982db560c1a49843462e3730a0e3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -8,7 +8,7 @@ public class ChangePlus : MonoBehaviour
{
public static float moins;
public void changePlus(string word)
{
......
This diff is collapsed.