public void StartGeneration(char direction)
 {
     mapController          = GameObject.FindWithTag("GameController").GetComponent <MapController> ();
     mapControllerBackUpRef = GameObject.Find("MapController").GetComponent <MapController> ();
     playerBehavouir        = GameObject.FindWithTag("GameController").GetComponent <PlayerBehavouir> ();
     StartCoroutine(generateMapAsync(direction, new RoomInfo()));
 }
示例#2
0
    void Start()
    {
        CanvasController  = GameObject.Find("TextCanvas").GetComponent <CanvasController> ();
        mapController     = GameObject.FindWithTag("GameController").GetComponent <MapController> ();
        pBehavauir        = GameObject.FindWithTag("GameController").GetComponent <PlayerBehavouir> ();
        connectedToPuzzle = false;
//		connectedToStory = false;
        locked = true;
        setColor(Color.grey);
        state = GetComponent <objectState> ();
        StartCoroutine(connectToPuzzle());
    }
    void Start()
    {
        mapController   = GameObject.FindWithTag("GameController").GetComponent <MapController> ();
        playerBehavouir = GameObject.FindWithTag("GameController").GetComponent <PlayerBehavouir> ();
        int storyAmount = playerBehavouir.calculateStoryAmount();

        //	print (storyAmount);
        for (int i = 0; i < storyAmount; i++)
        {
            storySpawnables.Add("StoryObject");
        }
        //	print (storySpawnables.Count);
        originalSpawnablesLength = storySpawnables.Count;
        StartCoroutine(waitForSpawnPlacements());
    }
    void Start()
    {
        spawnedRooms.Add(GameObject.Find("StartRoom"));
        DontDestroyOnLoad(this);
        player          = GameObject.FindWithTag("Player");
        playerBehavouir = GetComponent <PlayerBehavouir> ();
        finalRoom       = false;
        desireCanvas    = GameObject.FindWithTag("desire");
        slytterSheets   = GetComponent <connect> ();

        try {
            print("using id from last scene");
            uniqueId = GameObject.FindWithTag("id").GetComponent <idGen> ().uniqueId;
        } catch {
            Debug.LogError("couldd not find id, generating new.");
            uniqueId = Random.Range(0, 1000000);
        }

        bakeQueue = new Queue <IEnumerator> ();
        StartCoroutine(serveBakeQueue());
        storyController = GameObject.FindWithTag("storyController").GetComponent <StoryController> ();
    }