Exemplo n.º 1
0
 public virtual void Setup(AP_Room r, DD_GenObstacle g, GiveEnemy e)
 {
     obstacleGenerator = g;
     enemyGenerator    = e;
     room    = r;
     rows    = r.GetSize() - 3;                      // -3 accomodates an inset such that objects are generated at least 1 unit away from the room's walls
     columns = rows;
 }
Exemplo n.º 2
0
    protected Vector3 offset = Vector2.zero;                                                            // offset of pouplating objects to match big room

    public override void Setup(AP_Room r, DD_GenObstacle g, GiveEnemy e)
    {
        obstacleGenerator = g;
        enemyGenerator    = e;
        room = r;
        int newSize = 2 * r.GetSize() - 4; // to get inset from sides of new large room

        rows    = newSize;                 //r.GetSize () - 3;
        columns = rows;
        float offsetMod = r.GetSize() / 2f;

        Debug.Log("OFFSET MOD FOR LARGE ROOM IS " + offsetMod);
        offset = new Vector2(offsetMod, offsetMod);
        if (FindObjectsOfType <AP_BigRoomPopulator> ().Length == 1)
        {
            handleBoss = true;
        }
    }
Exemplo n.º 3
0
 /*void Update()
  * {
  *      if (Input.GetKeyDown (KeyCode.Space))
  *              SetupDoors ();
  *      else if (Input.GetKeyUp (KeyCode.Space))
  *              BreakBlocks ();
  * }*/
 public void SetupDoors()
 {
     doorBlocks.Clear();
     for (int i = 0; i < 4; i++)
     {
         if (room.IsRoomConnectedInDir(dirs [i]))
         {
             BlockDoor(dirs [i], room.GetSize());
         }
     }
 }