void Start() { noiseForm = GetComponent<NoiseForm>(); if (noiseForm == null) { Debug.LogError("RandomTextureGenerator with no NoiseForm"); } }
void Start() { noiseForm = GetComponent <NoiseForm>(); if (noiseForm == null) { Debug.LogError("RandomTextureGenerator with no NoiseForm"); } }
public override Texture2D GenerateTexture() { noiseForm = GetComponent<NoiseForm>(); if (noiseForm == null) { Debug.LogError("GameOfLifeTextureGenerator with no NoiseForm"); } boardWidth = (int)noiseForm.cellsPerTile.x; boardHeight = (int)noiseForm.cellsPerTile.y; current = new bool[boardHeight, boardWidth]; next = new bool[boardHeight, boardWidth]; texture = new Texture2D(boardWidth, boardHeight, TextureFormat.RGBAFloat, false); texture.filterMode = FilterMode.Point; StartCoroutine("UpdateBoard"); StartCoroutine("ResetBoard"); return texture; }
public override Texture2D GenerateTexture() { noiseForm = GetComponent <NoiseForm>(); if (noiseForm == null) { Debug.LogError("GameOfLifeTextureGenerator with no NoiseForm"); } boardWidth = (int)noiseForm.cellsPerTile.x; boardHeight = (int)noiseForm.cellsPerTile.y; current = new bool[boardHeight, boardWidth]; next = new bool[boardHeight, boardWidth]; texture = new Texture2D(boardWidth, boardHeight, TextureFormat.RGBAFloat, false); texture.filterMode = FilterMode.Point; StartCoroutine("UpdateBoard"); StartCoroutine("ResetBoard"); return(texture); }