cvpidzzs
ashley
Warszawa, Poland
:furryTigra:
:furryTigra:
Currently Offline
Don Niklaas Jan 31 @ 11:40am 
⣿⣿⣿⣿⣷⡘⣿⣿⣿⣦⡀
⣿⣿⣿⣿⣿⣷⣌⢻⣿⣿⣷⣄⠀⠀⢀⣤⣶⣿⣿⣿⣷⣦⣄
⣿⣿⣿⣿⣿⣿⣿⣦⡙⢿⣿⣿⣿⣦⣙⠻⠿⣿⣿⣿⣿⣿⣿⣦
⢹⣿⣿⣿⣿⣿⣿⣿⣿⣦⡙⠻⣿⣿⣿⣿⣶⣦⣬⣭⣉⡙⢿⣿
⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⢉⡛⠿⢿⣿⣿⣿⣿⣿⠀⡿
⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿+rep⠻⣷⣶⣤⣬⣭⣍⣥⠞⠁
⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠉⠛⠛⠛⠋⣡⣴⣶⣦⣄⡀
⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⢰⡿⢋⣥⣤⡍⢻⣆
⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⢛⣥⣿⣿⣿⠟⣸⣿⣆
⠀⠀⠀⠀⠀⠈⣿⣿⡿⠿⠿⠿⣿⠀⠀⠀⠀⣀⣠⣶⣿⣿⣿⡿⢋⣼⣿⣿⣿⣦
⠀⠀⠀⠀⠀⠀⢸⠃⣶⣿⣷⣶⣶⣶⣶⣾⣿⣿⣿⣿⡿⠟⣡⣶⣿⣿⣿⣿⣿⣿⣷⣄⡀
⠀⠀⠀⠀⠀⠀⢸⣧⡙⠻⠿⠿⠿⠿⠿⠿⠿⠛⠋⠁⠀⠈⠛⠻⠛⠻⣿⣿⣿⣿⣿⣿⣿⣦
cvpidzzs Jan 26 @ 5:39am 
    /*----------------- helper functions ---------------- */
    int GenerateRdNum(int max)
    {
        int rdNum = rd.Range(0, max);
 
 
        return rdNum;
    }
 
 
    /*----------------- I don´t like regions ---------------- */
}
cvpidzzs Jan 26 @ 5:38am 
int rdDirection = Random.Range(0, 4);      
        Debug.Log("diraction: " + rdDirection);
        newPos = tile.transform.position;
        if (rdDirection == 0)
        {
            newPos.z += distTile2Tile;
        }
        else if (rdDirection == 1)
        {
            newPos.x += distTile2Tile;
        }
        else if (rdDirection == 2)
        {

newPos.z -= distTile2Tile;
        }
        else if (rdDirection == 3)
        {
            newPos.x -= distTile2Tile;
        }
 
        tile = Instantiate(floorTile, new Vector3(0, 0, 0), Quaternion.identity, mapCont.transform);
       
    }
  
cvpidzzs Jan 26 @ 5:38am 
      case 0:
                newPos.z += distTile2Tile;
                break;
            case 1:
                newPos.x += distTile2Tile;
                break;
            case 2:
                newPos.z -= distTile2Tile;
                break;
            case 3:
                newPos.x -= distTile2Tile;
                break;

   }
 
        tile = Instantiate(floorTile, new Vector3(0, 0, 0), Quaternion.identity, mapCont.transform);
        
    }
 
    void createTile(int nums)
    {
        nums--;
        if (nums < 0)
        {
            return;
        }
 
       
cvpidzzs Jan 26 @ 5:38am 
    {
       tile = Instantiate(floorTile, new Vector3(0, 0, 0), Quaternion.identity, mapCont.transform);
       for (int i = 0; i < 10; i++)
       {
          CreateTile();
          
       }
       // CreateTile(10);
    }
 
    
    void CreateTile() 
    {
       // int rdDirection = Random.Range(0,4);
        int rdDirection = GenerateRdNum(4);
        Debug.Log("diraction: " + rdDirection);
        newPos = tile.transform.position;
        switch (rdDirection)
        {
      

           
cvpidzzs Jan 26 @ 5:32am 
using UnityEngine;
using rd = UnityEngine.Random;
 
public class Generator : MonoBehaviour 

    [SerializeField] GameObject floorTile;
    [SerializeField] int maxFloorTilles;
    // [SerializeField] GameObject wallTile;
    [SerializeField] float distTile2Tile;
    [SerializeField] GameObject mapCont;
    GameObject tile;
    Vector3 newPos = Vector3.zero;
 
 
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    void Start()
    {