コード例 #1
0
    void Start()
    {
        LevelRandomizer tmp = GetComponent <LevelRandomizer>();

        xOffset = tmp.xOffset;
        yOffset = tmp.yOffset;
        //print("offsets " + xOffset + " " + yOffset);
        daLight = GetComponent <WarningLightManager>();

        Init(tmp.startX, tmp.startY, tmp.startZ, tmp.xTileSize, tmp.yTileSize, tmp.WarnForXManyFrames);
    }
コード例 #2
0
    void Start()
    {
        ship            = GameObject.FindGameObjectWithTag("Ship").GetComponent <Ship>();
        levelRandomizer = GameObject.FindGameObjectWithTag("SystemManager").GetComponent <LevelRandomizer>();
        cameraScript    = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraScript>();
        timeManager     = GameObject.FindGameObjectWithTag("SystemManager").GetComponent <TimeManager>();
        continuesGUI    = GameObject.FindGameObjectWithTag("ContinuesGUI").GetComponent <Text>();
        gameOverSplash  = GameObject.FindGameObjectWithTag("GameOverSplash");
        finalRangeGUI   = GameObject.FindGameObjectWithTag("FinalRangeGUI").GetComponent <Text>();

        gameOverSplash.SetActive(false);
        UpdateContinuesGUI();
    }
コード例 #3
0
    // Start is called before the first frame update
    void Start()
    {
        WarningLight.SetActive(false);
        DisabledRoomLight.SetActive(false);
        ActiveDisabledLights = new List <DisabledLightNode>();


        LevelRandomizer tmp = GetComponent <LevelRandomizer>();

        warnFramesCount = tmp.WarnForXManyFrames;
        if (warnFramesCount == 0)
        {
            warnFramesCount++;
        }
    }
コード例 #4
0
    void Start()
    {
        LevelRandomizer tmp = GetComponent <LevelRandomizer>();

        warnFramesCount = tmp.WarnForXManyFrames;
        if (warnFramesCount == 0)
        {
            warnFramesCount++;
        }

        WarningLightManager tmp2 = GetComponent <WarningLightManager>();

        WarningLight = tmp2.WarningLight;
        wMax         = tmp2.wMax;
        wMin         = tmp2.wMin;
    }
コード例 #5
0
ファイル: LevelSpawner.cs プロジェクト: DanialVEVO/Gamelab2
 void Start()
 {
     blockCounter = 1;
     maxBlockAmount = Random.Range(4,6);
     randomLevelMizer = GetComponent<LevelRandomizer>();
     currentLevel = Instantiate(startLevel, new Vector3(0,0,0), transform.rotation) as GameObject;
     SetSpawn();
     StartCoroutine(SetLevel());
     if(player.GetComponent<TutorialCheck>().tutorialOn == true){
         afterSpecialLevel = afterStartLevel;
         player.GetComponent<TutorialCheck>().tutorialOn = false;
     }
 }
コード例 #6
0
    private void Start()
    {
        instance = this;
        LevelChunkSettings _lcs;
        float _addedHeight = 0f;
        int nOfChunks = 0;

        //		while(nOfChunks<chunksAtATime){
        //			_lcs = Instantiate(SortNewChunk()) as LevelChunkSettings;
        //			chunksLoaded.Add(_lcs);
        //			_lcs.transform.position = Vector3.up * _addedHeight;
        //			_lcs.transform.parent = transform;
        //			_addedHeight += _lcs.height;
        //			nOfChunks++;
        //		}
        while(nOfChunks<chunksAtATime){
            _lcs = Instantiate(initialChunks[nOfChunks]) as LevelChunkSettings;
            chunksLoaded.Add(_lcs);
            _lcs.transform.position = Vector3.up * _addedHeight;
            _lcs.transform.parent = transform;
            _addedHeight += _lcs.height;
            nOfChunks++;
        }
    }