Example #1
0
    protected override void Start()
    {
        base.Start();

        _outline.Color = 2;

        Initialize();
        GenerateMesh();
        _mesh = Combine();
        AutoWeld(_mesh, .01f, .02f);
        AddNoise();
        _vertexManager.Initialize();
        _zoneManager.Initialize();

        _originalVertices = _vertexManager.Vertices;
        _newVertices      = new Dictionary <Guid, Vector3>();

        for (int i = 0; i < _originalVertices.Length; i++)
        {
            _newVertices.Add(Utils.IntToGuid(i), _vertexManager.GetPosition(_originalVertices[i]));
        }
        _deformedVertices = new Dictionary <Guid, Vector3>();

        _objectGenerator.Generate();
    }