public override void Initialize() { _treeProfile = Content.Load <TreeProfile>("Trees/Graywood"); _tree = new SunlitSimpleTree(_treeProfile.GenerateSimpleTree()); _tree.Lighting = _sky; // Scale tree down to a desired height const int desiredHeight = 6; float treeModelHeight = _tree.TrunkMesh.BoundingSphere.Radius * 2; _scale = Matrix.CreateScale(desiredHeight / treeModelHeight); Position = _position; _wind = new WindStrengthSin(); _animator = new TreeWindAnimator(_wind); base.Initialize(); }
public override void Initialize() { _treeProfile = Content.Load<TreeProfile>("Trees/Graywood"); _tree = new SunlitSimpleTree(_treeProfile.GenerateSimpleTree()); _tree.Lighting = _sky; // Scale tree down to a desired height const int desiredHeight = 6; float treeModelHeight = _tree.TrunkMesh.BoundingSphere.Radius*2; _scale = Matrix.CreateScale(desiredHeight/treeModelHeight); Position = _position; _wind = new WindStrengthSin(); _animator = new TreeWindAnimator(_wind); base.Initialize(); }