Exemplo n.º 1
0
 private void Start()
 {
     sourceRect.width  = targetTexture.width;
     sourceRect.height = targetTexture.height;
     x                         = Mathf.FloorToInt(sourceRect.x);
     y                         = Mathf.FloorToInt(sourceRect.y);
     width                     = Mathf.FloorToInt(sourceRect.width);
     height                    = Mathf.FloorToInt(sourceRect.height);
     targetTexture2D           = new Texture2D(width, height);
     startNodeMarkerLoc        = Vector3Int.zero;
     endNodeMarkerLoc          = Vector3Int.zero;
     pathDataManager           = FindObjectOfType <PathDataManager>();
     pathDataManager.WorldSize = new Vector2Int(width, height);
     // set all variables
     Render();
     // render it after procgen has occured
     ProcGen();
     //generate the pathdata nodes
 }
Exemplo n.º 2
0
 private void Start()
 {
     CharacterRB = GetComponent <Rigidbody>();
     Pathfinding = FindObjectOfType <PathFinding>();
     PDM         = FindObjectOfType <PathDataManager>();
 }
Exemplo n.º 3
0
    //variables

    // Start is called before the first frame update
    private void Start()
    {
        PDM = FindObjectOfType <PathDataManager>();
        //assign pdm to pathdatamanger
    }
Exemplo n.º 4
0
 private void Start()
 {
     renderer = GetComponent <Renderer>();
     PDM      = FindObjectOfType <PathDataManager>();
     //CoalatePerlinNoise();
 }
Exemplo n.º 5
0
 private void Start()
 {
     PDM = FindObjectOfType <PathDataManager>();
 }