Example #1
0
 public RelationshipExecutor(SpawnedPuzzleItem item1, SpawnedPuzzleItem item2, Room room, ProcGame game)
 {
     _item1 = item1;
     _item2 = item2;
     _currentRoom = room;
     _game = game;
 }
Example #2
0
 public RelationshipExecutor(SpawnedPuzzleItem item1, SpawnedPuzzleItem item2, Room room, ProcGame game)
 {
     _item1       = item1;
     _item2       = item2;
     _currentRoom = room;
     _game        = game;
 }
Example #3
0
    // Use this for initialization
    void Start()
    {
        // If we're generating from a seed
        if (seedGenerate)
        {
            Random.seed = _currentSeed;
        }
        _currentSeed = Random.seed;
        Random.seed  = _currentSeed;

        _instance = this;

        _inventory = (GameObject.Find("inventory") as GameObject).GetComponent <Inventory>();

        _audioSource = GetComponent <AudioSource>();

        _floorSprite = GetComponentInChildren <tk2dSprite>();

        _popupText = (Instantiate(popupTextPrefab) as GameObject).GetComponent <tk2dTextMesh>();
        _popupText.transform.parent = transform;
        _popupText.gameObject.SetActive(false);

        _piecesToRemove  = new List <GridPiece>();
        _piecesToDestroy = new List <GridPiece>();

        _gridWidth  = Globals.ROOM_WIDTH;
        _gridHeight = Globals.ROOM_HEIGHT;


        _currentGame = new ProcGame();

        _currentRoom          = _currentGame.startRoom;
        _player               = _currentGame.player;
        _floorSprite.spriteId = _floorSprite.GetSpriteIdByName(_currentRoom.floorTilesName);
        _gridPieces           = _currentRoom.gridPieces;
        foreach (GridPiece piece in _gridPieces)
        {
            piece.gameObject.SetActive(true);
        }

        // Begin the game
        addPlayerText("Hungry....");
    }
Example #4
0
    // Use this for initialization
    void Start()
    {
        // If we're generating from a seed
        if (seedGenerate)
            Random.seed = _currentSeed;
        _currentSeed = Random.seed;
        Random.seed = _currentSeed;

        _instance = this;

        _inventory = (GameObject.Find("inventory") as GameObject).GetComponent<Inventory>();

        _audioSource = GetComponent<AudioSource>();

        _floorSprite = GetComponentInChildren<tk2dSprite>();

        _popupText = (Instantiate(popupTextPrefab) as GameObject).GetComponent<tk2dTextMesh>();
        _popupText.transform.parent = transform;
        _popupText.gameObject.SetActive(false);

        _piecesToRemove = new List<GridPiece>();
        _piecesToDestroy = new List<GridPiece>();

        _gridWidth = Globals.ROOM_WIDTH;
        _gridHeight = Globals.ROOM_HEIGHT;

        _currentGame = new ProcGame();

        _currentRoom = _currentGame.startRoom;
        _player = _currentGame.player;
        _floorSprite.spriteId = _floorSprite.GetSpriteIdByName(_currentRoom.floorTilesName);
        _gridPieces = _currentRoom.gridPieces;
        foreach (GridPiece piece in _gridPieces) {
            piece.gameObject.SetActive(true);
        }

        // Begin the game
        addPlayerText("Hungry....");
    }