Ejemplo n.º 1
0
    private void GenerateRoom(Vector3 pos)
    {
        //Send signal to room of where the exit needs to go ==============
        PlaceExitEvent peei = new PlaceExitEvent();

        peei.newLocation = newRoomDirection;
        peei.FireEvent();
        //================================================================
        //Reseed the random number generator every time we have to place  room
        rng.Seed = OS.GetTicksMsec();
        //Instance the room and set the room spatial to it so we can edit the spawn position of the room
        room = (Spatial)roomScene.Instance();
        //Set the position of hte room
        room.Transform = new Transform(room.Transform.basis, pos);
        //Add the room to the room list
        roomList.Add(room);
        //Set the room as a child of the map builder
        AddChild(room);
    }