public void OfflineSceneSwitch()
        {
            if (!courseData)
            {
                courseData = (CourseData)Resources.Load("Scriptable/SoloPlayData");
            }

            PlayCorseData.CourseData = courseData;

            PhotonNetwork.OfflineMode = true;
            PhotonNetwork.JoinRoom("Offline Room");
            Debug.Log("オフラインモードで開始");
            FadeManager.FadeOut(SceneNameString.InGame);
        }
示例#2
0
        private int MarkerNumberRandom; //コースの長さ
        // Start is called before the first frame update
        void Start()
        {
            MakerFactory          makerFactory = gameObject.AddComponent <MakerFactory>();
            CourseData            course       = GetComponent <CourseManager>().CourseData;
            List <MakerTransform> makerList    = course.makerTransformList;
            int maxMakerNum = makerList.Count;

            //最小値が3つ最大はマーカー座標の登録数(制限をかけるかも)
            MarkerNumberRandom = UnityEngine.Random.Range(3, makerList.Count);
            //Debug.Log("マーカー数 " + MarkerNumberRandom);

            //Randomにシャッフルして、上からMarkerNumberRandom分取り出す。
            var RandomList = Enumerable.Range(0, makerList.Count).OrderBy(n => Guid.NewGuid()).Take(MarkerNumberRandom).ToArray();

            //マーカーの順番の確認用

            for (int s = 0; s < RandomList.Length; s++)
            {
                //Debug.Log(RandomList[s]);
            }

            for (int i = 0; i < MarkerNumberRandom; i++)
            {
                GameObject obj;
                MakerNum++;
                bool isGoal = false;
                if (i == maxMakerNum - 1)
                {
                    obj = makerFactory.Create(true, makerList[i]);
                    //obj = makerFactory.Create(true, makerList[RandomList[i]]);

                    isGoal = true;
                }
                else
                {
                    obj = makerFactory.Create(false, makerList[i]);
                    //obj = makerFactory.Create(false, makerList[RandomList[i]]);
                }

                MakerObject maker = obj.GetComponent <MakerObject>();

                obj.name             = "Maker_" + MakerNum;
                obj.transform.parent = transform;

                maker.IsGoalMaker = isGoal;
                maker.MakerNumber = MakerNum;

                MakerObjectList.Add(MakerNum, obj.GetComponent <MakerObject>());
            }
        }
        private CourseData courseData = null; // 読み込むコースデータ

        public void TutorialSceneSeitch()
        {
            if (!courseData)
            {
                courseData = (CourseData)Resources.Load("Scriptable/TutorialPlayData");
            }

            PlayCorseData.CourseData = courseData;

            //PhotonNetwork.OfflineMode = true;
            //PhotonNetwork.JoinRoom("Offline Room");
            Debug.Log("チュートリアル開始");
            FadeManager.FadeOut(SceneNameString.InTutorial);
        }
示例#4
0
        private void Start()
        {
            WindFactory windFactory = gameObject.AddComponent <WindFactory>();
            CourseData  course      = GetComponent <CourseManager>().CourseData;
            int         maxWindNum  = course.windTransformList.Count;

            for (int i = 0, end = maxWindNum; i < end; i++)
            {
                WindNum++;
                GameObject obj = windFactory.Create();

                obj.transform.position = course.windTransformList[i].position;
                obj.transform.parent   = transform;
                obj.name = "WindObject_" + WindNum.ToString();

                WindObjectList.Add(WindNum, obj.GetComponent <WindObject>());
                WindObjectList[WindNum].SetWindSpeed(course.windTransformList[i].speed);
            }
        }