Ejemplo n.º 1
0
 void Start()
 {
     i = i ?? this;
     stageGenerator = GetComponent <StageGenerator>();
     stageGenerator.Generate();
     //stages = Resources.LoadAll("Stages", typeof(GameObject)).Cast<GameObject>().ToArray();
     //Variables.lastStageIndex = stages.Length - 1;
     //Instantiate(stages[Variables.currentStageIndex], Vector3.zero, Quaternion.identity);
 }
Ejemplo n.º 2
0
 private void Start()
 {
     // クラスを代入
     difficulty     = GetComponent <Difficulty>();
     stageGenerator = GetComponent <StageGenerator>();
     cameraMover    = GetComponent <CameraMover>();
     playerMover    = player.GetComponent <PlayerMover>();
     soundEffecter  = GameObject.FindWithTag("SoundEffect").GetComponent <SoundEffecter>();
     // ゲームステージを生成
     stageGenerator.Generate();
     // 前回から継続してるなら、UI消してスタート
     if (isContinue)
     {
         titleUI.TitleFalse();
         StartGame();
     }
 }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        if (SpawnPositions.Count == 0)
        {
            SpawnPositions.Add(transform);
        }
        uiController = GameObject.Find("Canvas").GetComponent <UIController>();
        List <GameObject> a = new List <GameObject>();

        if (generator != null)
        {
            targetObjects.AddRange(generator.Generate());
        }
        foreach (var i in targetObjects)
        {
            a.Add(i.savingObject);
        }
        uiController.setTargetPointer(a);
    }