Exemple #1
0
        private void Awake()
        {
            pixels        = new Color[width * height];
            texture       = PTUtils.CreateTexture(width, height, Color.clear);
            image.texture = texture;

            header = InstantiateControl <TextControl>(leftPanel);
            header.transform.SetAsFirstSibling();
            header.Initialize("Noise type:");

            InstantiateToggle(FastNoise.NoiseType.Perlin);
            InstantiateToggle(FastNoise.NoiseType.PerlinFractal);
            InstantiateToggle(FastNoise.NoiseType.Simplex);
            InstantiateToggle(FastNoise.NoiseType.SimplexFractal);
            InstantiateToggle(FastNoise.NoiseType.Cubic);
            InstantiateToggle(FastNoise.NoiseType.CubicFractal);
            InstantiateToggle(FastNoise.NoiseType.Value);
            InstantiateToggle(FastNoise.NoiseType.ValueFractal);
            InstantiateToggle(FastNoise.NoiseType.Cellular);
            InstantiateToggle(FastNoise.NoiseType.WhiteNoise);

            noise = new FastNoise();
            Generate();
            SetupSkyboxAndPalette();
        }
        private void SelectRuleset(RulesetName rulesetName)
        {
            config.ruleset = nameToRuleset[rulesetName];

            header.Initialize("Rulestring: " + config.ruleset);
        }