Ejemplo n.º 1
0
        /// <summary>
        /// Sets the Random object up.
        /// </summary>
        private void SetupRandom()
        {
            if (!Enabled)
            {
                _random = null;

                return;
            }

            bool reset = false;

            reset |= _random == null;
            reset |= _previousSeed != Seed;
            reset |= _previousUseSpecifiedSeed != UseSpecificSeed;
            reset |= _previousMode != Mode;

            if (reset)
            {
                _random = GetRandom();

                _previousMode             = Mode;
                _previousUseSpecifiedSeed = UseSpecificSeed;
                _previousSeed             = Seed;
            }
        }
Ejemplo n.º 2
0
        public override void Initialize(AdvancedUtilities.Cameras.CameraController cameraController)
        {
            base.Initialize(cameraController);

            _previousUseSpecifiedSeed = UseSpecificSeed;
            _previousSeed             = Seed;
            _previousMode             = Mode;

            _random = null;
        }