Esempio n. 1
0
 public void CreateStage(int stageNo)
 {
     EntityManager.Clear();
     TaskManager.CloseAllTask();
     BezierStage.InitializeStage(stageNo);
     entityCreator.CreateEntitys(stageNo);
     CreateStageLayer(stageNo);
     CreateHints(stageNo);
 }
Esempio n. 2
0
        public void InitializeStage(int stageNo)
        {
            //初期化ルート
            List <List <Vector2> > bezierPoints = BezierStage.InitializeStage(Parameter.StageNo);

            for (int i = 0; i < bezierPoints.Count; i++)
            {
                for (int j = 0; j < bezierPoints[i].Count; j++)
                {
                    CreatObjectFromData(eObjectType.BezierStage, bezierPoints[i][j], i);
                }
            }
            bezierManager.SetBezierPoints(bezierPoints);


            //初期化実体
            entitysList.Clear();
            CSVReader.Read("EntityPositionData_S" + stageNo);
            List <string[]> result = CSVReader.GetData();

            for (int i = 0; i < result.Count; i++)
            {
                Vector2     position = new Vector2(int.Parse(result[i][1]), int.Parse(result[i][2]));
                eObjectType type     = typeChange[result[i][0]];
                entitysList.Add(new Object(result[i][0], position, 50, type));
            }


            //初期化ヒント
            hintsList.Clear();
            CSVReader.Read("HintsData_S" + stageNo);
            result = CSVReader.GetData();

            for (int i = 0; i < result.Count; i++)
            {
                Hint    hint   = new Hint(new Vector2(int.Parse(result[i][1]), int.Parse(result[i][2])), Hint.NameToType(result[i][0]));
                Vector2 center = new Vector2(int.Parse(result[i][3]), int.Parse(result[i][4]));
                Vector2 size   = new Vector2(int.Parse(result[i][5]), int.Parse(result[i][6]));

                hint.SetLeft(center - size / 2);
                hint.SetRight(center + size / 2);
                hintsList.Add(new List <Object>());
                int lastOne = hintsList.Count - 1;
                hintsList[lastOne].Add(hint);
                hintsList[lastOne].Add(hint.GetLeftTop());
                hintsList[lastOne].Add(hint.GetRightBottom());
            }
        }