Пример #1
0
 void Start()
 {
     Player = new GameObject[nbjoueurs];
     Terre = GetComponent<GenerationAleatoireTerrainScript>();
     CreationJoueur(); // fonction de création des joueurs
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        TerrainScript = GetComponent<GenerationAleatoireTerrainScript>();
        LongueurTerrain = TerrainScript.X;
        LargeurTerrain = TerrainScript.Y;
        positions = new List<Vector3>();

        CheckPoint1 = GameObject.Instantiate( Resources.LoadAssetAtPath("Assets/Prefabs/CameraCheckpoint.prefab", typeof(GameObject)) ) as GameObject;
        positions.Add(CheckPoint1.transform.position = new Vector3(0,10,0));
        CheckPoint2 = GameObject.Instantiate( Resources.LoadAssetAtPath("Assets/Prefabs/CameraCheckpoint.prefab", typeof(GameObject)) ) as GameObject;
        positions.Add(CheckPoint2.transform.position = new Vector3(LongueurTerrain,10,0));
        CheckPoint3 = GameObject.Instantiate( Resources.LoadAssetAtPath("Assets/Prefabs/CameraCheckpoint.prefab", typeof(GameObject)) ) as GameObject;
        positions.Add(CheckPoint3.transform.position = new Vector3(LongueurTerrain,10,LargeurTerrain));
        CheckPoint4 = GameObject.Instantiate( Resources.LoadAssetAtPath("Assets/Prefabs/CameraCheckpoint.prefab", typeof(GameObject)) ) as GameObject;
        positions.Add(CheckPoint4.transform.position = new Vector3(0,10,LargeurTerrain));

        transform.position = CheckPoint1.transform.position;
        transform.LookAt(new Vector3(LongueurTerrain/2, 0, LargeurTerrain/2));
        Step = 1;
    }
Пример #3
0
 void Start()
 {
     Terre = GetComponent<GenerationAleatoireTerrainScript>();
     CreationJoueur(); // fonction de création des joueurs
     compt = 0;
 }