Ejemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            calculScoreScript      = GameObject.Find("_manager").GetComponent <CalculScore>();
            saveContentScript      = GameObject.Find("_manager").GetComponent <SaveContentBetweenScenesScript>();
            scriptLoopPrefabFigure = GameObject.Find("Xtra_330").GetComponent <LoopPrefabFigure>();
            numberStage            = 0;
            numberFigure           = 0;
            actualFigure           = 0;

            plane        = GameObject.FindWithTag("planeGeneratorFigure");
            alreadyPlace = false;
            futureFigure = 0;
            // scriptArrayFigure = gameObject.GetComponent<FigureChoice>();



            // scriptArrayFigure.setTravelingVariable();
            // figure = scriptArrayFigure.travelingFigureArray;
            //figure[scriptArrayFigure.travelingLevelFigure, i]
            if (!alreadyPlace)
            {
                placePlane();
            }
            int v = 0;

            while (v < 10)
            {
                Debug.Log("figureNumberTabSave: " + saveContentScript.figureNumberTabSave[v]);
                //  saveContentScript.figureNumberTabSave[actualFigure] = saveContentScript.figureNumberTabSave[actualFigure] + 1;
                v++;
            }
        }
Ejemplo n.º 2
0
        public void SetCheckPointEnd()
        {
            //plane =  GameObject.FindWithTag("plane");
            //  scriptPrefab = plane.GetComponent<LoopPrefabFigure>();
            scriptPrefab = GameObject.Find("Xtra_330").GetComponent <LoopPrefabFigure>();
            FigureTest   = GameObject.FindGameObjectWithTag("onGoingFigure");

            //if (gameObject.transform.name == "loopCollider(Clone)")
            if (FigureTest.transform.name == "loopCollider(Clone)")
            {
                nbrCheckpoint = 11;

                scriptPrefab.checkPointEnd = 11;
                Debug.Log("checkPointEnd : " + scriptPrefab.checkPointEnd);
            }

            // else if (gameObject.transform.name == "slopeCollider(Clone)")
            else if (FigureTest.transform.name == "slopeCollider(Clone)")
            {
                nbrCheckpoint = 5;
                scriptPrefab.checkPointEnd = 5;
                Debug.Log("checkPointEnd : " + scriptPrefab.checkPointEnd);
            }
            else if (FigureTest.transform.name == "ligneDroite(Clone)" || FigureTest.transform.name == "slalom(Clone)")
            {
                // Debug.Log("checkPointEnd" + scriptPrefab.checkPointEnd);
                nbrCheckpoint = 3;
                scriptPrefab.checkPointEnd = 3;
                Debug.Log("checkPointEnd : " + scriptPrefab.checkPointEnd);
            }
            else
            {
                Debug.Log("error");
                scriptPrefab.checkPointEnd = 5;
                Debug.Log("checkPointEnd : " + scriptPrefab.checkPointEnd);
            }
        }